diff --git a/thirdparty/metal-cpp/Foundation/Foundation.hpp b/thirdparty/metal-cpp/Foundation/Foundation.hpp index 31e8fb3cbb63..b69ce18576d4 100644 --- a/thirdparty/metal-cpp/Foundation/Foundation.hpp +++ b/thirdparty/metal-cpp/Foundation/Foundation.hpp @@ -1,27 +1,8 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/Foundation.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - +#include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" #include "NSArray.hpp" #include "NSAutoreleasePool.hpp" #include "NSBundle.hpp" @@ -33,9 +14,8 @@ #include "NSError.hpp" #include "NSLock.hpp" #include "NSNotification.hpp" -#include "NSNumber.hpp" +#include "NSObjCRuntime.hpp" #include "NSObject.hpp" -#include "NSPrivate.hpp" #include "NSProcessInfo.hpp" #include "NSRange.hpp" #include "NSSet.hpp" @@ -43,5 +23,4 @@ #include "NSString.hpp" #include "NSTypes.hpp" #include "NSURL.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +#include "NSValue.hpp" diff --git a/thirdparty/metal-cpp/Foundation/NSArray.hpp b/thirdparty/metal-cpp/Foundation/NSArray.hpp index ea04d1ea3db9..d66b049519a8 100644 --- a/thirdparty/metal-cpp/Foundation/NSArray.hpp +++ b/thirdparty/metal-cpp/Foundation/NSArray.hpp @@ -1,124 +1,102 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSArray.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - +#include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" #include "NSTypes.hpp" +#include "NSRange.hpp" #include "NSEnumerator.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS { + class Object; +} namespace NS { -class Array : public Copying + +_NS_OPTIONS(NS::UInteger, BinarySearchingOptions) { + BinarySearchingFirstEqual = (1UL << 8), + BinarySearchingLastEqual = (1UL << 9), + BinarySearchingInsertionIndex = (1UL << 10), +}; + + +class Array : public NS::SecureCoding { public: - static Array* array(); - static Array* array(const Object* pObject); - static Array* array(const Object* const* pObjects, UInteger count); - static Array* alloc(); + Array* init() const; - Array* init(); - Array* init(const Object* const* pObjects, UInteger count); - Array* init(const class Coder* pCoder); + static NS::Array* array(); + static NS::Array* array(NS::Object* anObject); + static NS::Array* array(const NS::Object* const * objects, NS::UInteger cnt); + NS::UInteger count() const; + NS::Array* init(const NS::Object* const * objects, NS::UInteger cnt); + NS::Array* init(void* coder); template - _Object* object(UInteger index) const; - UInteger count() const; - Enumerator* objectEnumerator() const; -}; -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- + _Object* object(NS::UInteger index); + template + Enumerator<_Object>* objectEnumerator(); -_NS_INLINE NS::Array* NS::Array::array() -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSArray), _NS_PRIVATE_SEL(array)); -} +}; -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +} // namespace NS -_NS_INLINE NS::Array* NS::Array::array(const Object* pObject) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSArray), _NS_PRIVATE_SEL(arrayWithObject_), pObject); -} +// --- Class symbols + inline implementations --- -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +extern "C" void *OBJC_CLASS_$_NSArray; -_NS_INLINE NS::Array* NS::Array::array(const Object* const* pObjects, UInteger count) +_NS_INLINE NS::Array* NS::Array::alloc() { - return Object::sendMessage(_NS_PRIVATE_CLS(NSArray), _NS_PRIVATE_SEL(arrayWithObjects_count_), pObjects, count); + return _NS_msg_NS__Arrayp_alloc((const void*)&OBJC_CLASS_$_NSArray, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Array* NS::Array::alloc() +_NS_INLINE NS::Array* NS::Array::init() const { - return NS::Object::alloc(_NS_PRIVATE_CLS(NSArray)); + return _NS_msg_NS__Arrayp_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Array* NS::Array::init() +_NS_INLINE NS::Array* NS::Array::array() { - return NS::Object::init(); + return _NS_msg_NS__Arrayp_array((const void*)&OBJC_CLASS_$_NSArray, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Array* NS::Array::init(const Object* const* pObjects, UInteger count) +_NS_INLINE NS::Array* NS::Array::array(NS::Object* anObject) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithObjects_count_), pObjects, count); + return _NS_msg_NS__Arrayp_arrayWithObject__NS__Objectp((const void*)&OBJC_CLASS_$_NSArray, nullptr, anObject); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Array* NS::Array::init(const class Coder* pCoder) +_NS_INLINE NS::Array* NS::Array::array(const NS::Object* const * objects, NS::UInteger cnt) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithCoder_), pCoder); + return _NS_msg_NS__Arrayp_arrayWithObjects_count__constNS__Objectpconstp_NS__UInteger((const void*)&OBJC_CLASS_$_NSArray, nullptr, objects, cnt); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::UInteger NS::Array::count() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(count)); + return _NS_msg_NS__UInteger_count((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - template -_NS_INLINE _Object* NS::Array::object(UInteger index) const +_NS_INLINE _Object* NS::Array::object(NS::UInteger index) { - return Object::sendMessage<_Object*>(this, _NS_PRIVATE_SEL(objectAtIndex_), index); + return reinterpret_cast<_Object*>(_NS_msg_NS__Objectp_objectAtIndex__NS__UInteger((const void*)this, nullptr, index)); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_NS_INLINE NS::Array* NS::Array::init(const NS::Object* const * objects, NS::UInteger cnt) +{ + return _NS_msg_NS__Arrayp_initWithObjects_count__constNS__Objectpconstp_NS__UInteger((const void*)this, nullptr, objects, cnt); +} -_NS_INLINE NS::Enumerator* NS::Array::objectEnumerator() const +_NS_INLINE NS::Array* NS::Array::init(void* coder) { - return NS::Object::sendMessage*>(this, _NS_PRIVATE_SEL(objectEnumerator)); + return _NS_msg_NS__Arrayp_initWithCoder__voidp((const void*)this, nullptr, coder); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +template +_NS_INLINE NS::Enumerator<_Object>* NS::Array::objectEnumerator() +{ + return reinterpret_cast*>(_NS_msg_NS__EnumeratorLNS__ObjectGp_objectEnumerator((const void*)this, nullptr)); +} diff --git a/thirdparty/metal-cpp/Foundation/NSAutoreleasePool.hpp b/thirdparty/metal-cpp/Foundation/NSAutoreleasePool.hpp index 6d01a465ffc2..1f676cd9f0f4 100644 --- a/thirdparty/metal-cpp/Foundation/NSAutoreleasePool.hpp +++ b/thirdparty/metal-cpp/Foundation/NSAutoreleasePool.hpp @@ -1,83 +1,54 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSAutoreleasePool.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" -#include "NSPrivate.hpp" #include "NSTypes.hpp" +#include "NSRange.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS { + class Object; +} namespace NS { -class AutoreleasePool : public Object + +class AutoreleasePool : public NS::Referencing { public: static AutoreleasePool* alloc(); - AutoreleasePool* init(); + AutoreleasePool* init() const; - void drain(); + static void addObject(NS::Object* anObject); - void addObject(Object* pObject); + void drain(); - static void showPools(); }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +} // namespace NS -_NS_INLINE NS::AutoreleasePool* NS::AutoreleasePool::alloc() -{ - return NS::Object::alloc(_NS_PRIVATE_CLS(NSAutoreleasePool)); -} +// --- Class symbols + inline implementations --- -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +extern "C" void *OBJC_CLASS_$_NSAutoreleasePool; -_NS_INLINE NS::AutoreleasePool* NS::AutoreleasePool::init() +_NS_INLINE NS::AutoreleasePool* NS::AutoreleasePool::alloc() { - return NS::Object::init(); + return _NS_msg_NS__AutoreleasePoolp_alloc((const void*)&OBJC_CLASS_$_NSAutoreleasePool, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::AutoreleasePool::drain() +_NS_INLINE NS::AutoreleasePool* NS::AutoreleasePool::init() const { - Object::sendMessage(this, _NS_PRIVATE_SEL(drain)); + return _NS_msg_NS__AutoreleasePoolp_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::AutoreleasePool::addObject(Object* pObject) +_NS_INLINE void NS::AutoreleasePool::addObject(NS::Object* anObject) { - Object::sendMessage(this, _NS_PRIVATE_SEL(addObject_), pObject); + _NS_msg_v_addObject__NS__Objectp((const void*)&OBJC_CLASS_$_NSAutoreleasePool, nullptr, anObject); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::AutoreleasePool::showPools() +_NS_INLINE void NS::AutoreleasePool::drain() { - Object::sendMessage(_NS_PRIVATE_CLS(NSAutoreleasePool), _NS_PRIVATE_SEL(showPools)); + _NS_msg_v_drain((const void*)this, nullptr); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/Foundation/NSBlocks.hpp b/thirdparty/metal-cpp/Foundation/NSBlocks.hpp new file mode 100644 index 000000000000..143731eca581 --- /dev/null +++ b/thirdparty/metal-cpp/Foundation/NSBlocks.hpp @@ -0,0 +1,68 @@ +#pragma once + +#include "NSDefines.hpp" +#include "NSObjCRuntime.hpp" +#include "NSTypes.hpp" +#include "NSRange.hpp" + +#include + +namespace NS { + +class Error; +class Notification; +class Object; +class String; + +using EnumerateObjectsBlock = void (^)(NS::Object*, NS::UInteger, bool*); +using EnumerateObjectsFunction = std::function; + +using IndexOfObjectPassingTestBlock = bool (^)(NS::Object*, NS::UInteger, bool*); +using IndexOfObjectPassingTestFunction = std::function; + +using DifferenceFromArrayBlock = bool (^)(NS::Object*, NS::Object*); +using DifferenceFromArrayFunction = std::function; + +using BeginAccessingResourcesBlock = void (^)(NS::Error*); +using BeginAccessingResourcesFunction = std::function; + +using ConditionallyBeginAccessingResourcesBlock = void (^)(bool); +using ConditionallyBeginAccessingResourcesFunction = std::function; + +using EnumerateByteRangesBlock = void (^)(const void *, NS::Range, bool*); +using EnumerateByteRangesFunction = std::function; + +using InitBlock = void (^)(void *, NS::UInteger); +using InitFunction = std::function; + +using EnumerateKeysAndObjectsBlock = void (^)(NS::Object*, NS::Object*, bool*); +using EnumerateKeysAndObjectsFunction = std::function; + +using KeysOfEntriesPassingTestBlock = bool (^)(NS::Object*, NS::Object*, bool*); +using KeysOfEntriesPassingTestFunction = std::function; + +using UserInfoValueProviderBlock = NS::Object* (^)(NS::Error*, NS::String*); +using UserInfoValueProviderFunction = std::function; + +using ObserverBlock = void (^)(NS::Notification*); +using ObserverFunction = std::function; + +using PerformActivityBlock = void (^)(); +using PerformActivityFunction = std::function; + +using PerformExpiringActivityBlock = void (^)(bool); +using PerformExpiringActivityFunction = std::function; + +using ObjectsPassingTestBlock = bool (^)(NS::Object*, bool*); +using ObjectsPassingTestFunction = std::function; + +using EnumerateSubstringsInRangeBlock = void (^)(NS::String*, NS::Range, NS::Range, bool*); +using EnumerateSubstringsInRangeFunction = std::function; + +using EnumerateLinesBlock = void (^)(NS::String*, bool*); +using EnumerateLinesFunction = std::function; + +using InitBlock2 = void (^)(void *, NS::UInteger); +using InitBlock2Function = std::function; + +} // NS diff --git a/thirdparty/metal-cpp/Foundation/NSBridge.hpp b/thirdparty/metal-cpp/Foundation/NSBridge.hpp new file mode 100644 index 000000000000..b1631528b094 --- /dev/null +++ b/thirdparty/metal-cpp/Foundation/NSBridge.hpp @@ -0,0 +1,277 @@ +#pragma once + +// Consolidated extern "C" trampoline decls for this framework. +// One entry per (return, args, selector) — identical C++ signatures +// across multiple classes collapse to a single linker alias of +// `_objc_msgSend$`. Per-class headers include this file +// instead of declaring their own externs. + +#include "NSDefines.hpp" +#include +#include "NSTypes.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" + +namespace NS { + class Array; + class AutoreleasePool; + class Bundle; + class Condition; + class Data; + class Date; + class Dictionary; + class Error; + class MethodSignature; + class Notification; + class NotificationCenter; + class Number; + class Object; + class ProcessInfo; + class Set; + class String; + class URL; + class Value; + template class Enumerator; + using ActivityOptions = uint64_t; + enum ProcessInfoThermalState : NS::Integer; + using StringCompareOptions = NS::UInteger; + enum StringEncoding : NS::UInteger; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +#pragma clang diagnostic ignored "-Wunguarded-availability-new" + +extern "C" { +NS::URL* _NS_msg_NS__URLp_URLForAuxiliaryExecutable__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "URLForAuxiliaryExecutable:"); +const char * _NS_msg_constcharp_UTF8String(const void*, SEL) __asm__("_objc_msgSend$" "UTF8String"); +NS::UInteger _NS_msg_NS__UInteger_activeProcessorCount(const void*, SEL) __asm__("_objc_msgSend$" "activeProcessorCount"); +void _NS_msg_v_addObject__NS__Objectp(const void*, SEL, NS::Object*) __asm__("_objc_msgSend$" "addObject:"); +NS::Array* _NS_msg_NS__Arrayp_allBundles(const void*, SEL) __asm__("_objc_msgSend$" "allBundles"); +NS::Array* _NS_msg_NS__Arrayp_allFrameworks(const void*, SEL) __asm__("_objc_msgSend$" "allFrameworks"); +NS::Array* _NS_msg_NS__Arrayp_allObjects(const void*, SEL) __asm__("_objc_msgSend$" "allObjects"); +NS::Array* _NS_msg_NS__Arrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::AutoreleasePool* _NS_msg_NS__AutoreleasePoolp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::Bundle* _NS_msg_NS__Bundlep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::Condition* _NS_msg_NS__Conditionp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::Data* _NS_msg_NS__Datap_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::Date* _NS_msg_NS__Datep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::Error* _NS_msg_NS__Errorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::NotificationCenter* _NS_msg_NS__NotificationCenterp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::Notification* _NS_msg_NS__Notificationp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::Number* _NS_msg_NS__Numberp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::ProcessInfo* _NS_msg_NS__ProcessInfop_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::Set* _NS_msg_NS__Setp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::String* _NS_msg_NS__Stringp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::URL* _NS_msg_NS__URLp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::Value* _NS_msg_NS__Valuep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +void* _NS_msg_voidp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::URL* _NS_msg_NS__URLp_appStoreReceiptURL(const void*, SEL) __asm__("_objc_msgSend$" "appStoreReceiptURL"); +NS::Array* _NS_msg_NS__Arrayp_arguments(const void*, SEL) __asm__("_objc_msgSend$" "arguments"); +NS::Array* _NS_msg_NS__Arrayp_array(const void*, SEL) __asm__("_objc_msgSend$" "array"); +NS::Array* _NS_msg_NS__Arrayp_arrayWithObject__NS__Objectp(const void*, SEL, NS::Object*) __asm__("_objc_msgSend$" "arrayWithObject:"); +NS::Array* _NS_msg_NS__Arrayp_arrayWithObjects_count__constNS__Objectpconstp_NS__UInteger(const void*, SEL, const NS::Object* const *, NS::UInteger) __asm__("_objc_msgSend$" "arrayWithObjects:count:"); +bool _NS_msg_bool_automaticTerminationSupportEnabled(const void*, SEL) __asm__("_objc_msgSend$" "automaticTerminationSupportEnabled"); +void* _NS_msg_voidp_autorelease(const void*, SEL) __asm__("_objc_msgSend$" "autorelease"); +NS::Object* _NS_msg_NS__Objectp_beginActivityWithOptions_reason__NS__ActivityOptions_NS__Stringp(const void*, SEL, NS::ActivityOptions, NS::String*) __asm__("_objc_msgSend$" "beginActivityWithOptions:reason:"); +bool _NS_msg_bool_boolValue(const void*, SEL) __asm__("_objc_msgSend$" "boolValue"); +void _NS_msg_v_broadcast(const void*, SEL) __asm__("_objc_msgSend$" "broadcast"); +NS::String* _NS_msg_NS__Stringp_builtInPlugInsPath(const void*, SEL) __asm__("_objc_msgSend$" "builtInPlugInsPath"); +NS::URL* _NS_msg_NS__URLp_builtInPlugInsURL(const void*, SEL) __asm__("_objc_msgSend$" "builtInPlugInsURL"); +NS::String* _NS_msg_NS__Stringp_bundleIdentifier(const void*, SEL) __asm__("_objc_msgSend$" "bundleIdentifier"); +NS::String* _NS_msg_NS__Stringp_bundlePath(const void*, SEL) __asm__("_objc_msgSend$" "bundlePath"); +NS::URL* _NS_msg_NS__URLp_bundleURL(const void*, SEL) __asm__("_objc_msgSend$" "bundleURL"); +NS::Bundle* _NS_msg_NS__Bundlep_bundleWithPath__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "bundleWithPath:"); +NS::Bundle* _NS_msg_NS__Bundlep_bundleWithURL__NS__URLp(const void*, SEL, NS::URL*) __asm__("_objc_msgSend$" "bundleWithURL:"); +const void * _NS_msg_constvoidp_bytes(const void*, SEL) __asm__("_objc_msgSend$" "bytes"); +const char * _NS_msg_constcharp_cStringUsingEncoding__NS__StringEncoding(const void*, SEL, NS::StringEncoding) __asm__("_objc_msgSend$" "cStringUsingEncoding:"); +long _NS_msg_long_caseInsensitiveCompare__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "caseInsensitiveCompare:"); +char _NS_msg_char_charValue(const void*, SEL) __asm__("_objc_msgSend$" "charValue"); +unsigned short _NS_msg_unsignedshort_characterAtIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "characterAtIndex:"); +NS::Integer _NS_msg_NS__Integer_code(const void*, SEL) __asm__("_objc_msgSend$" "code"); +long _NS_msg_long_compare__NS__Numberp(const void*, SEL, NS::Number*) __asm__("_objc_msgSend$" "compare:"); +void* _NS_msg_voidp_copy(const void*, SEL) __asm__("_objc_msgSend$" "copy"); +NS::UInteger _NS_msg_NS__UInteger_count(const void*, SEL) __asm__("_objc_msgSend$" "count"); +NS::UInteger _NS_msg_NS__UInteger_countByEnumeratingWithState_objects_count__voidp_NS__Objectpp_NS__UInteger(const void*, SEL, void*, NS::Object**, NS::UInteger) __asm__("_objc_msgSend$" "countByEnumeratingWithState:objects:count:"); +NS::Date* _NS_msg_NS__Datep_dateWithTimeIntervalSinceNow__double(const void*, SEL, double) __asm__("_objc_msgSend$" "dateWithTimeIntervalSinceNow:"); +NS::String* _NS_msg_NS__Stringp_debugDescription(const void*, SEL) __asm__("_objc_msgSend$" "debugDescription"); +NS::NotificationCenter* _NS_msg_NS__NotificationCenterp_defaultCenter(const void*, SEL) __asm__("_objc_msgSend$" "defaultCenter"); +NS::String* _NS_msg_NS__Stringp_description(const void*, SEL) __asm__("_objc_msgSend$" "description"); +NS::String* _NS_msg_NS__Stringp_descriptionWithLocale__NS__Objectp(const void*, SEL, NS::Object*) __asm__("_objc_msgSend$" "descriptionWithLocale:"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_dictionary(const void*, SEL) __asm__("_objc_msgSend$" "dictionary"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_dictionaryWithObject_forKey__NS__Objectp_NS__Objectp(const void*, SEL, NS::Object*, NS::Object*) __asm__("_objc_msgSend$" "dictionaryWithObject:forKey:"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_dictionaryWithObjects_forKeys_count__constNS__Objectpconstp_constNS__Objectpconstp_NS__UInteger(const void*, SEL, const NS::Object* const *, const NS::Object* const *, NS::UInteger) __asm__("_objc_msgSend$" "dictionaryWithObjects:forKeys:count:"); +void _NS_msg_v_disableAutomaticTermination__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "disableAutomaticTermination:"); +void _NS_msg_v_disableSuddenTermination(const void*, SEL) __asm__("_objc_msgSend$" "disableSuddenTermination"); +NS::String* _NS_msg_NS__Stringp_domain(const void*, SEL) __asm__("_objc_msgSend$" "domain"); +double _NS_msg_double_doubleValue(const void*, SEL) __asm__("_objc_msgSend$" "doubleValue"); +void _NS_msg_v_drain(const void*, SEL) __asm__("_objc_msgSend$" "drain"); +void _NS_msg_v_enableAutomaticTermination__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "enableAutomaticTermination:"); +void _NS_msg_v_enableSuddenTermination(const void*, SEL) __asm__("_objc_msgSend$" "enableSuddenTermination"); +void _NS_msg_v_endActivity__NS__Objectp(const void*, SEL, NS::Object*) __asm__("_objc_msgSend$" "endActivity:"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_environment(const void*, SEL) __asm__("_objc_msgSend$" "environment"); +NS::Error* _NS_msg_NS__Errorp_errorWithDomain_code_userInfo__NS__Stringp_NS__Integer_NS__Dictionaryp(const void*, SEL, NS::String*, NS::Integer, NS::Dictionary*) __asm__("_objc_msgSend$" "errorWithDomain:code:userInfo:"); +NS::String* _NS_msg_NS__Stringp_executablePath(const void*, SEL) __asm__("_objc_msgSend$" "executablePath"); +NS::URL* _NS_msg_NS__URLp_executableURL(const void*, SEL) __asm__("_objc_msgSend$" "executableURL"); +const char * _NS_msg_constcharp_fileSystemRepresentation(const void*, SEL) __asm__("_objc_msgSend$" "fileSystemRepresentation"); +NS::URL* _NS_msg_NS__URLp_fileURLWithPath__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "fileURLWithPath:"); +float _NS_msg_float_floatValue(const void*, SEL) __asm__("_objc_msgSend$" "floatValue"); +NS::String* _NS_msg_NS__Stringp_fullUserName(const void*, SEL) __asm__("_objc_msgSend$" "fullUserName"); +void _NS_msg_v_getValue_size__voidp_NS__UInteger(const void*, SEL, void *, NS::UInteger) __asm__("_objc_msgSend$" "getValue:size:"); +NS::String* _NS_msg_NS__Stringp_globallyUniqueString(const void*, SEL) __asm__("_objc_msgSend$" "globallyUniqueString"); +NS::UInteger _NS_msg_NS__UInteger_hash(const void*, SEL) __asm__("_objc_msgSend$" "hash"); +NS::String* _NS_msg_NS__Stringp_hostName(const void*, SEL) __asm__("_objc_msgSend$" "hostName"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_infoDictionary(const void*, SEL) __asm__("_objc_msgSend$" "infoDictionary"); +NS::Array* _NS_msg_NS__Arrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::AutoreleasePool* _NS_msg_NS__AutoreleasePoolp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::Bundle* _NS_msg_NS__Bundlep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::Condition* _NS_msg_NS__Conditionp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::Data* _NS_msg_NS__Datap_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::Date* _NS_msg_NS__Datep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::Error* _NS_msg_NS__Errorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::NotificationCenter* _NS_msg_NS__NotificationCenterp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::Notification* _NS_msg_NS__Notificationp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::Number* _NS_msg_NS__Numberp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::ProcessInfo* _NS_msg_NS__ProcessInfop_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::Set* _NS_msg_NS__Setp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::String* _NS_msg_NS__Stringp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::URL* _NS_msg_NS__URLp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::Value* _NS_msg_NS__Valuep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +void* _NS_msg_voidp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::URL* _NS_msg_NS__URLp_initFileURLWithPath__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "initFileURLWithPath:"); +NS::Number* _NS_msg_NS__Numberp_initWithBool__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "initWithBool:"); +NS::String* _NS_msg_NS__Stringp_initWithBytes_length_encoding__constvoidp_NS__UInteger_NS__StringEncoding(const void*, SEL, const void *, NS::UInteger, NS::StringEncoding) __asm__("_objc_msgSend$" "initWithBytes:length:encoding:"); +NS::Value* _NS_msg_NS__Valuep_initWithBytes_objCType__constvoidp_constcharp(const void*, SEL, const void *, const char *) __asm__("_objc_msgSend$" "initWithBytes:objCType:"); +NS::String* _NS_msg_NS__Stringp_initWithBytesNoCopy_length_encoding_freeWhenDone__voidp_NS__UInteger_NS__StringEncoding_bool(const void*, SEL, void *, NS::UInteger, NS::StringEncoding, bool) __asm__("_objc_msgSend$" "initWithBytesNoCopy:length:encoding:freeWhenDone:"); +NS::String* _NS_msg_NS__Stringp_initWithCString_encoding__constcharp_NS__StringEncoding(const void*, SEL, const char *, NS::StringEncoding) __asm__("_objc_msgSend$" "initWithCString:encoding:"); +NS::Number* _NS_msg_NS__Numberp_initWithChar__char(const void*, SEL, char) __asm__("_objc_msgSend$" "initWithChar:"); +NS::Array* _NS_msg_NS__Arrayp_initWithCoder__voidp(const void*, SEL, void*) __asm__("_objc_msgSend$" "initWithCoder:"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_initWithCoder__voidp(const void*, SEL, void*) __asm__("_objc_msgSend$" "initWithCoder:"); +NS::Number* _NS_msg_NS__Numberp_initWithCoder__voidp(const void*, SEL, void*) __asm__("_objc_msgSend$" "initWithCoder:"); +NS::Set* _NS_msg_NS__Setp_initWithCoder__voidp(const void*, SEL, void*) __asm__("_objc_msgSend$" "initWithCoder:"); +NS::Value* _NS_msg_NS__Valuep_initWithCoder__voidp(const void*, SEL, void*) __asm__("_objc_msgSend$" "initWithCoder:"); +NS::Error* _NS_msg_NS__Errorp_initWithDomain_code_userInfo__NS__Stringp_NS__Integer_NS__Dictionaryp(const void*, SEL, NS::String*, NS::Integer, NS::Dictionary*) __asm__("_objc_msgSend$" "initWithDomain:code:userInfo:"); +NS::Number* _NS_msg_NS__Numberp_initWithDouble__double(const void*, SEL, double) __asm__("_objc_msgSend$" "initWithDouble:"); +NS::Number* _NS_msg_NS__Numberp_initWithFloat__float(const void*, SEL, float) __asm__("_objc_msgSend$" "initWithFloat:"); +NS::Number* _NS_msg_NS__Numberp_initWithInt__int(const void*, SEL, int) __asm__("_objc_msgSend$" "initWithInt:"); +NS::Number* _NS_msg_NS__Numberp_initWithLong__long(const void*, SEL, long) __asm__("_objc_msgSend$" "initWithLong:"); +NS::Number* _NS_msg_NS__Numberp_initWithLongLong__longlong(const void*, SEL, long long) __asm__("_objc_msgSend$" "initWithLongLong:"); +NS::Array* _NS_msg_NS__Arrayp_initWithObjects_count__constNS__Objectpconstp_NS__UInteger(const void*, SEL, const NS::Object* const *, NS::UInteger) __asm__("_objc_msgSend$" "initWithObjects:count:"); +NS::Set* _NS_msg_NS__Setp_initWithObjects_count__constNS__Objectpconstp_NS__UInteger(const void*, SEL, const NS::Object* const *, NS::UInteger) __asm__("_objc_msgSend$" "initWithObjects:count:"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_initWithObjects_forKeys_count__constNS__Objectpconstp_constNS__Objectpconstp_NS__UInteger(const void*, SEL, const NS::Object* const *, const NS::Object* const *, NS::UInteger) __asm__("_objc_msgSend$" "initWithObjects:forKeys:count:"); +NS::Bundle* _NS_msg_NS__Bundlep_initWithPath__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "initWithPath:"); +NS::Number* _NS_msg_NS__Numberp_initWithShort__short(const void*, SEL, short) __asm__("_objc_msgSend$" "initWithShort:"); +NS::String* _NS_msg_NS__Stringp_initWithString__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "initWithString:"); +NS::URL* _NS_msg_NS__URLp_initWithString__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "initWithString:"); +NS::Bundle* _NS_msg_NS__Bundlep_initWithURL__NS__URLp(const void*, SEL, NS::URL*) __asm__("_objc_msgSend$" "initWithURL:"); +NS::Number* _NS_msg_NS__Numberp_initWithUnsignedChar__unsignedchar(const void*, SEL, unsigned char) __asm__("_objc_msgSend$" "initWithUnsignedChar:"); +NS::Number* _NS_msg_NS__Numberp_initWithUnsignedInt__unsignedint(const void*, SEL, unsigned int) __asm__("_objc_msgSend$" "initWithUnsignedInt:"); +NS::Number* _NS_msg_NS__Numberp_initWithUnsignedLong__unsignedlong(const void*, SEL, unsigned long) __asm__("_objc_msgSend$" "initWithUnsignedLong:"); +NS::Number* _NS_msg_NS__Numberp_initWithUnsignedLongLong__unsignedlonglong(const void*, SEL, unsigned long long) __asm__("_objc_msgSend$" "initWithUnsignedLongLong:"); +NS::Number* _NS_msg_NS__Numberp_initWithUnsignedShort__unsignedshort(const void*, SEL, unsigned short) __asm__("_objc_msgSend$" "initWithUnsignedShort:"); +int _NS_msg_int_intValue(const void*, SEL) __asm__("_objc_msgSend$" "intValue"); +NS::Integer _NS_msg_NS__Integer_integerValue(const void*, SEL) __asm__("_objc_msgSend$" "integerValue"); +bool _NS_msg_bool_isEqual__constNS__Objectp(const void*, SEL, const NS::Object*) __asm__("_objc_msgSend$" "isEqual:"); +bool _NS_msg_bool_isEqualToNumber__NS__Numberp(const void*, SEL, NS::Number*) __asm__("_objc_msgSend$" "isEqualToNumber:"); +bool _NS_msg_bool_isEqualToString__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "isEqualToString:"); +bool _NS_msg_bool_isEqualToValue__NS__Valuep(const void*, SEL, NS::Value*) __asm__("_objc_msgSend$" "isEqualToValue:"); +bool _NS_msg_bool_isLoaded(const void*, SEL) __asm__("_objc_msgSend$" "isLoaded"); +bool _NS_msg_bool_isLowPowerModeEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isLowPowerModeEnabled"); +bool _NS_msg_bool_isMacCatalystApp(const void*, SEL) __asm__("_objc_msgSend$" "isMacCatalystApp"); +bool _NS_msg_bool_isOperatingSystemAtLeastVersion__NS__OperatingSystemVersion(const void*, SEL, NS::OperatingSystemVersion) __asm__("_objc_msgSend$" "isOperatingSystemAtLeastVersion:"); +bool _NS_msg_bool_isiOSAppOnMac(const void*, SEL) __asm__("_objc_msgSend$" "isiOSAppOnMac"); +NS::Enumerator* _NS_msg_NS__EnumeratorLNS__ObjectGp_keyEnumerator(const void*, SEL) __asm__("_objc_msgSend$" "keyEnumerator"); +NS::UInteger _NS_msg_NS__UInteger_length(const void*, SEL) __asm__("_objc_msgSend$" "length"); +NS::UInteger _NS_msg_NS__UInteger_lengthOfBytesUsingEncoding__NS__StringEncoding(const void*, SEL, NS::StringEncoding) __asm__("_objc_msgSend$" "lengthOfBytesUsingEncoding:"); +bool _NS_msg_bool_load(const void*, SEL) __asm__("_objc_msgSend$" "load"); +bool _NS_msg_bool_loadAndReturnError__NS__Errorpp(const void*, SEL, NS::Error**) __asm__("_objc_msgSend$" "loadAndReturnError:"); +NS::String* _NS_msg_NS__Stringp_localizedDescription(const void*, SEL) __asm__("_objc_msgSend$" "localizedDescription"); +NS::String* _NS_msg_NS__Stringp_localizedFailureReason(const void*, SEL) __asm__("_objc_msgSend$" "localizedFailureReason"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_localizedInfoDictionary(const void*, SEL) __asm__("_objc_msgSend$" "localizedInfoDictionary"); +NS::Array* _NS_msg_NS__Arrayp_localizedRecoveryOptions(const void*, SEL) __asm__("_objc_msgSend$" "localizedRecoveryOptions"); +NS::String* _NS_msg_NS__Stringp_localizedRecoverySuggestion(const void*, SEL) __asm__("_objc_msgSend$" "localizedRecoverySuggestion"); +NS::String* _NS_msg_NS__Stringp_localizedStringForKey_value_table__NS__Stringp_NS__Stringp_NS__Stringp(const void*, SEL, NS::String*, NS::String*, NS::String*) __asm__("_objc_msgSend$" "localizedStringForKey:value:table:"); +long long _NS_msg_longlong_longLongValue(const void*, SEL) __asm__("_objc_msgSend$" "longLongValue"); +long _NS_msg_long_longValue(const void*, SEL) __asm__("_objc_msgSend$" "longValue"); +bool _NS_msg_bool_lowPowerModeEnabled(const void*, SEL) __asm__("_objc_msgSend$" "lowPowerModeEnabled"); +bool _NS_msg_bool_macCatalystApp(const void*, SEL) __asm__("_objc_msgSend$" "macCatalystApp"); +NS::Bundle* _NS_msg_NS__Bundlep_mainBundle(const void*, SEL) __asm__("_objc_msgSend$" "mainBundle"); +NS::UInteger _NS_msg_NS__UInteger_maximumLengthOfBytesUsingEncoding__NS__StringEncoding(const void*, SEL, NS::StringEncoding) __asm__("_objc_msgSend$" "maximumLengthOfBytesUsingEncoding:"); +NS::MethodSignature* _NS_msg_NS__MethodSignaturep_methodSignatureForSelector__SEL(const void*, SEL, SEL) __asm__("_objc_msgSend$" "methodSignatureForSelector:"); +NS::String* _NS_msg_NS__Stringp_name(const void*, SEL) __asm__("_objc_msgSend$" "name"); +void* _NS_msg_voidp_nextObject(const void*, SEL) __asm__("_objc_msgSend$" "nextObject"); +NS::Number* _NS_msg_NS__Numberp_numberWithBool__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "numberWithBool:"); +NS::Number* _NS_msg_NS__Numberp_numberWithChar__char(const void*, SEL, char) __asm__("_objc_msgSend$" "numberWithChar:"); +NS::Number* _NS_msg_NS__Numberp_numberWithDouble__double(const void*, SEL, double) __asm__("_objc_msgSend$" "numberWithDouble:"); +NS::Number* _NS_msg_NS__Numberp_numberWithFloat__float(const void*, SEL, float) __asm__("_objc_msgSend$" "numberWithFloat:"); +NS::Number* _NS_msg_NS__Numberp_numberWithInt__int(const void*, SEL, int) __asm__("_objc_msgSend$" "numberWithInt:"); +NS::Number* _NS_msg_NS__Numberp_numberWithLong__long(const void*, SEL, long) __asm__("_objc_msgSend$" "numberWithLong:"); +NS::Number* _NS_msg_NS__Numberp_numberWithLongLong__longlong(const void*, SEL, long long) __asm__("_objc_msgSend$" "numberWithLongLong:"); +NS::Number* _NS_msg_NS__Numberp_numberWithShort__short(const void*, SEL, short) __asm__("_objc_msgSend$" "numberWithShort:"); +NS::Number* _NS_msg_NS__Numberp_numberWithUnsignedChar__unsignedchar(const void*, SEL, unsigned char) __asm__("_objc_msgSend$" "numberWithUnsignedChar:"); +NS::Number* _NS_msg_NS__Numberp_numberWithUnsignedInt__unsignedint(const void*, SEL, unsigned int) __asm__("_objc_msgSend$" "numberWithUnsignedInt:"); +NS::Number* _NS_msg_NS__Numberp_numberWithUnsignedLong__unsignedlong(const void*, SEL, unsigned long) __asm__("_objc_msgSend$" "numberWithUnsignedLong:"); +NS::Number* _NS_msg_NS__Numberp_numberWithUnsignedLongLong__unsignedlonglong(const void*, SEL, unsigned long long) __asm__("_objc_msgSend$" "numberWithUnsignedLongLong:"); +NS::Number* _NS_msg_NS__Numberp_numberWithUnsignedShort__unsignedshort(const void*, SEL, unsigned short) __asm__("_objc_msgSend$" "numberWithUnsignedShort:"); +const char * _NS_msg_constcharp_objCType(const void*, SEL) __asm__("_objc_msgSend$" "objCType"); +NS::Object* _NS_msg_NS__Objectp_object(const void*, SEL) __asm__("_objc_msgSend$" "object"); +NS::Object* _NS_msg_NS__Objectp_objectAtIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndex:"); +NS::Enumerator* _NS_msg_NS__EnumeratorLNS__ObjectGp_objectEnumerator(const void*, SEL) __asm__("_objc_msgSend$" "objectEnumerator"); +NS::Object* _NS_msg_NS__Objectp_objectForInfoDictionaryKey__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "objectForInfoDictionaryKey:"); +NS::Object* _NS_msg_NS__Objectp_objectForKey__NS__Objectp(const void*, SEL, NS::Object*) __asm__("_objc_msgSend$" "objectForKey:"); +NS::UInteger _NS_msg_NS__UInteger_operatingSystem(const void*, SEL) __asm__("_objc_msgSend$" "operatingSystem"); +NS::OperatingSystemVersion _NS_msg_NS__OperatingSystemVersion_operatingSystemVersion(const void*, SEL) __asm__("_objc_msgSend$" "operatingSystemVersion"); +NS::String* _NS_msg_NS__Stringp_operatingSystemVersionString(const void*, SEL) __asm__("_objc_msgSend$" "operatingSystemVersionString"); +NS::String* _NS_msg_NS__Stringp_pathForAuxiliaryExecutable__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "pathForAuxiliaryExecutable:"); +void _NS_msg_v_performActivityWithOptions_reason_usingBlock__NS__ActivityOptions_NS__Stringp_NS__PerformActivityBlock(const void*, SEL, NS::ActivityOptions, NS::String*, NS::PerformActivityBlock) __asm__("_objc_msgSend$" "performActivityWithOptions:reason:usingBlock:"); +void _NS_msg_v_performExpiringActivityWithReason_usingBlock__NS__Stringp_NS__PerformExpiringActivityBlock(const void*, SEL, NS::String*, NS::PerformExpiringActivityBlock) __asm__("_objc_msgSend$" "performExpiringActivityWithReason:usingBlock:"); +unsigned long long _NS_msg_unsignedlonglong_physicalMemory(const void*, SEL) __asm__("_objc_msgSend$" "physicalMemory"); +void * _NS_msg_voidp_pointerValue(const void*, SEL) __asm__("_objc_msgSend$" "pointerValue"); +bool _NS_msg_bool_preflightAndReturnError__NS__Errorpp(const void*, SEL, NS::Error**) __asm__("_objc_msgSend$" "preflightAndReturnError:"); +NS::String* _NS_msg_NS__Stringp_privateFrameworksPath(const void*, SEL) __asm__("_objc_msgSend$" "privateFrameworksPath"); +NS::URL* _NS_msg_NS__URLp_privateFrameworksURL(const void*, SEL) __asm__("_objc_msgSend$" "privateFrameworksURL"); +int _NS_msg_int_processIdentifier(const void*, SEL) __asm__("_objc_msgSend$" "processIdentifier"); +NS::ProcessInfo* _NS_msg_NS__ProcessInfop_processInfo(const void*, SEL) __asm__("_objc_msgSend$" "processInfo"); +NS::String* _NS_msg_NS__Stringp_processName(const void*, SEL) __asm__("_objc_msgSend$" "processName"); +NS::UInteger _NS_msg_NS__UInteger_processorCount(const void*, SEL) __asm__("_objc_msgSend$" "processorCount"); +NS::Range _NS_msg_NS__Range_rangeOfString_options__NS__Stringp_NS__StringCompareOptions(const void*, SEL, NS::String*, NS::StringCompareOptions) __asm__("_objc_msgSend$" "rangeOfString:options:"); +void _NS_msg_v_release(const void*, SEL) __asm__("_objc_msgSend$" "release"); +void _NS_msg_v_removeObserver__NS__Objectp(const void*, SEL, NS::Object*) __asm__("_objc_msgSend$" "removeObserver:"); +NS::String* _NS_msg_NS__Stringp_resourcePath(const void*, SEL) __asm__("_objc_msgSend$" "resourcePath"); +NS::URL* _NS_msg_NS__URLp_resourceURL(const void*, SEL) __asm__("_objc_msgSend$" "resourceURL"); +bool _NS_msg_bool_respondsToSelector__SEL(const void*, SEL, SEL) __asm__("_objc_msgSend$" "respondsToSelector:"); +void* _NS_msg_voidp_retain(const void*, SEL) __asm__("_objc_msgSend$" "retain"); +NS::UInteger _NS_msg_NS__UInteger_retainCount(const void*, SEL) __asm__("_objc_msgSend$" "retainCount"); +void _NS_msg_v_setAutomaticTerminationSupportEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setAutomaticTerminationSupportEnabled:"); +void _NS_msg_v_setProcessName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setProcessName:"); +NS::String* _NS_msg_NS__Stringp_sharedFrameworksPath(const void*, SEL) __asm__("_objc_msgSend$" "sharedFrameworksPath"); +NS::URL* _NS_msg_NS__URLp_sharedFrameworksURL(const void*, SEL) __asm__("_objc_msgSend$" "sharedFrameworksURL"); +NS::String* _NS_msg_NS__Stringp_sharedSupportPath(const void*, SEL) __asm__("_objc_msgSend$" "sharedSupportPath"); +NS::URL* _NS_msg_NS__URLp_sharedSupportURL(const void*, SEL) __asm__("_objc_msgSend$" "sharedSupportURL"); +short _NS_msg_short_shortValue(const void*, SEL) __asm__("_objc_msgSend$" "shortValue"); +void _NS_msg_v_signal(const void*, SEL) __asm__("_objc_msgSend$" "signal"); +NS::String* _NS_msg_NS__Stringp_string(const void*, SEL) __asm__("_objc_msgSend$" "string"); +NS::String* _NS_msg_NS__Stringp_stringByAppendingString__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "stringByAppendingString:"); +NS::String* _NS_msg_NS__Stringp_stringValue(const void*, SEL) __asm__("_objc_msgSend$" "stringValue"); +NS::String* _NS_msg_NS__Stringp_stringWithCString_encoding__constcharp_NS__StringEncoding(const void*, SEL, const char *, NS::StringEncoding) __asm__("_objc_msgSend$" "stringWithCString:encoding:"); +NS::String* _NS_msg_NS__Stringp_stringWithString__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "stringWithString:"); +double _NS_msg_double_systemUptime(const void*, SEL) __asm__("_objc_msgSend$" "systemUptime"); +NS::ProcessInfoThermalState _NS_msg_NS__ProcessInfoThermalState_thermalState(const void*, SEL) __asm__("_objc_msgSend$" "thermalState"); +bool _NS_msg_bool_unload(const void*, SEL) __asm__("_objc_msgSend$" "unload"); +unsigned char _NS_msg_unsignedchar_unsignedCharValue(const void*, SEL) __asm__("_objc_msgSend$" "unsignedCharValue"); +unsigned int _NS_msg_unsignedint_unsignedIntValue(const void*, SEL) __asm__("_objc_msgSend$" "unsignedIntValue"); +NS::UInteger _NS_msg_NS__UInteger_unsignedIntegerValue(const void*, SEL) __asm__("_objc_msgSend$" "unsignedIntegerValue"); +unsigned long long _NS_msg_unsignedlonglong_unsignedLongLongValue(const void*, SEL) __asm__("_objc_msgSend$" "unsignedLongLongValue"); +unsigned long _NS_msg_unsignedlong_unsignedLongValue(const void*, SEL) __asm__("_objc_msgSend$" "unsignedLongValue"); +unsigned short _NS_msg_unsignedshort_unsignedShortValue(const void*, SEL) __asm__("_objc_msgSend$" "unsignedShortValue"); +NS::Dictionary* _NS_msg_NS__Dictionaryp_userInfo(const void*, SEL) __asm__("_objc_msgSend$" "userInfo"); +NS::String* _NS_msg_NS__Stringp_userName(const void*, SEL) __asm__("_objc_msgSend$" "userName"); +NS::Value* _NS_msg_NS__Valuep_valueWithBytes_objCType__constvoidp_constcharp(const void*, SEL, const void *, const char *) __asm__("_objc_msgSend$" "valueWithBytes:objCType:"); +NS::Value* _NS_msg_NS__Valuep_valueWithPointer__constvoidp(const void*, SEL, const void *) __asm__("_objc_msgSend$" "valueWithPointer:"); +void _NS_msg_v_wait(const void*, SEL) __asm__("_objc_msgSend$" "wait"); +bool _NS_msg_bool_waitUntilDate__NS__Datep(const void*, SEL, NS::Date*) __asm__("_objc_msgSend$" "waitUntilDate:"); +} // extern "C" + +#pragma clang diagnostic pop diff --git a/thirdparty/metal-cpp/Foundation/NSBundle.hpp b/thirdparty/metal-cpp/Foundation/NSBundle.hpp index b9637f5172b9..7de581b9ee46 100644 --- a/thirdparty/metal-cpp/Foundation/NSBundle.hpp +++ b/thirdparty/metal-cpp/Foundation/NSBundle.hpp @@ -1,374 +1,261 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSBundle.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "NSDefines.hpp" -#include "NSNotification.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" #include "NSTypes.hpp" +#include "NSRange.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS { + class Array; + class Dictionary; + class Error; + class Object; + class String; + class URL; +} namespace NS { -_NS_CONST(NotificationName, BundleDidLoadNotification); -_NS_CONST(NotificationName, BundleResourceRequestLowDiskSpaceNotification); -class String* LocalizedString(const String* pKey, const String*); -class String* LocalizedStringFromTable(const String* pKey, const String* pTbl, const String*); -class String* LocalizedStringFromTableInBundle(const String* pKey, const String* pTbl, const class Bundle* pBdle, const String*); -class String* LocalizedStringWithDefaultValue(const String* pKey, const String* pTbl, const class Bundle* pBdle, const String* pVal, const String*); +extern NS::NotificationName const BundleDidLoadNotification __asm__("_NSBundleDidLoadNotification"); +extern NS::String* const LoadedClasses __asm__("_NSLoadedClasses"); +extern NS::NotificationName const BundleResourceRequestLowDiskSpaceNotification __asm__("_NSBundleResourceRequestLowDiskSpaceNotification"); +inline constexpr unsigned int BundleExecutableArchitectureI386 = 0x00000007; +inline constexpr unsigned int BundleExecutableArchitecturePPC = 0x00000012; +inline constexpr unsigned int BundleExecutableArchitectureX86_64 = 0x01000007; +inline constexpr unsigned int BundleExecutableArchitecturePPC64 = 0x01000012; +inline constexpr unsigned int BundleExecutableArchitectureARM64 = 0x0100000c; + -class Bundle : public Referencing +class Bundle : public NS::Referencing { public: - static Bundle* mainBundle(); - - static Bundle* bundle(const class String* pPath); - static Bundle* bundle(const class URL* pURL); - - static class Array* allBundles(); - static class Array* allFrameworks(); - - static Bundle* alloc(); - - Bundle* init(const class String* pPath); - Bundle* init(const class URL* pURL); - - bool load(); - bool unload(); - - bool isLoaded() const; - - bool preflightAndReturnError(class Error** pError) const; - bool loadAndReturnError(class Error** pError); - - class URL* bundleURL() const; - class URL* resourceURL() const; - class URL* executableURL() const; - class URL* URLForAuxiliaryExecutable(const class String* pExecutableName) const; - - class URL* privateFrameworksURL() const; - class URL* sharedFrameworksURL() const; - class URL* sharedSupportURL() const; - class URL* builtInPlugInsURL() const; - class URL* appStoreReceiptURL() const; - - class String* bundlePath() const; - class String* resourcePath() const; - class String* executablePath() const; - class String* pathForAuxiliaryExecutable(const class String* pExecutableName) const; + static Bundle* alloc(); + Bundle* init() const; + + static NS::Array* allBundles(); + static NS::Array* allFrameworks(); + static NS::Bundle* bundle(NS::String* path); + static NS::Bundle* bundle(NS::URL* url); + static NS::Bundle* mainBundle(); + + NS::URL* URLForAuxiliaryExecutable(NS::String* executableName); + NS::URL* appStoreReceiptURL() const; + NS::String* builtInPlugInsPath() const; + NS::URL* builtInPlugInsURL() const; + NS::String* bundleIdentifier() const; + NS::String* bundlePath() const; + NS::URL* bundleURL() const; + NS::String* executablePath() const; + NS::URL* executableURL() const; + NS::Dictionary* infoDictionary() const; + NS::Bundle* init(NS::String* path); + NS::Bundle* init(NS::URL* url); + bool isLoaded(); + bool load(); + bool loadAndReturnError(NS::Error** error); + NS::Dictionary* localizedInfoDictionary() const; + NS::String* localizedString(NS::String* key, NS::String* value, NS::String* tableName); + NS::Object* object(NS::String* key); + NS::String* path(NS::String* executableName); + bool preflightAndReturnError(NS::Error** error); + NS::String* privateFrameworksPath() const; + NS::URL* privateFrameworksURL() const; + NS::String* resourcePath() const; + NS::URL* resourceURL() const; + NS::String* sharedFrameworksPath() const; + NS::URL* sharedFrameworksURL() const; + NS::String* sharedSupportPath() const; + NS::URL* sharedSupportURL() const; + bool unload(); - class String* privateFrameworksPath() const; - class String* sharedFrameworksPath() const; - class String* sharedSupportPath() const; - class String* builtInPlugInsPath() const; - - class String* bundleIdentifier() const; - class Dictionary* infoDictionary() const; - class Dictionary* localizedInfoDictionary() const; - class Object* objectForInfoDictionaryKey(const class String* pKey); - - class String* localizedString(const class String* pKey, const class String* pValue = nullptr, const class String* pTableName = nullptr) const; }; -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_PRIVATE_DEF_CONST(NS::NotificationName, BundleDidLoadNotification); -_NS_PRIVATE_DEF_CONST(NS::NotificationName, BundleResourceRequestLowDiskSpaceNotification); - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::LocalizedString(const String* pKey, const String*) -{ - return Bundle::mainBundle()->localizedString(pKey, nullptr, nullptr); -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +} // namespace NS -_NS_INLINE NS::String* NS::LocalizedStringFromTable(const String* pKey, const String* pTbl, const String*) -{ - return Bundle::mainBundle()->localizedString(pKey, nullptr, pTbl); -} +// --- Class symbols + inline implementations --- -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +extern "C" void *OBJC_CLASS_$_NSBundle; -_NS_INLINE NS::String* NS::LocalizedStringFromTableInBundle(const String* pKey, const String* pTbl, const Bundle* pBdl, const String*) +_NS_INLINE NS::Bundle* NS::Bundle::alloc() { - return pBdl->localizedString(pKey, nullptr, pTbl); + return _NS_msg_NS__Bundlep_alloc((const void*)&OBJC_CLASS_$_NSBundle, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::LocalizedStringWithDefaultValue(const String* pKey, const String* pTbl, const Bundle* pBdl, const String* pVal, const String*) +_NS_INLINE NS::Bundle* NS::Bundle::init() const { - return pBdl->localizedString(pKey, pVal, pTbl); + return _NS_msg_NS__Bundlep_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::Bundle* NS::Bundle::mainBundle() { - return Object::sendMessage(_NS_PRIVATE_CLS(NSBundle), _NS_PRIVATE_SEL(mainBundle)); + return _NS_msg_NS__Bundlep_mainBundle((const void*)&OBJC_CLASS_$_NSBundle, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Bundle* NS::Bundle::bundle(const class String* pPath) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSBundle), _NS_PRIVATE_SEL(bundleWithPath_), pPath); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Bundle* NS::Bundle::bundle(const class URL* pURL) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSBundle), _NS_PRIVATE_SEL(bundleWithURL_), pURL); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::Array* NS::Bundle::allBundles() { - return Object::sendMessage(_NS_PRIVATE_CLS(NSBundle), _NS_PRIVATE_SEL(allBundles)); + return _NS_msg_NS__Arrayp_allBundles((const void*)&OBJC_CLASS_$_NSBundle, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::Array* NS::Bundle::allFrameworks() { - return Object::sendMessage(_NS_PRIVATE_CLS(NSBundle), _NS_PRIVATE_SEL(allFrameworks)); + return _NS_msg_NS__Arrayp_allFrameworks((const void*)&OBJC_CLASS_$_NSBundle, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Bundle* NS::Bundle::alloc() +_NS_INLINE NS::Bundle* NS::Bundle::bundle(NS::String* path) { - return Object::sendMessage(_NS_PRIVATE_CLS(NSBundle), _NS_PRIVATE_SEL(alloc)); + return _NS_msg_NS__Bundlep_bundleWithPath__NS__Stringp((const void*)&OBJC_CLASS_$_NSBundle, nullptr, path); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Bundle* NS::Bundle::init(const String* pPath) +_NS_INLINE NS::Bundle* NS::Bundle::bundle(NS::URL* url) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithPath_), pPath); + return _NS_msg_NS__Bundlep_bundleWithURL__NS__URLp((const void*)&OBJC_CLASS_$_NSBundle, nullptr, url); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Bundle* NS::Bundle::init(const URL* pURL) +_NS_INLINE NS::URL* NS::Bundle::bundleURL() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithURL_), pURL); + return _NS_msg_NS__URLp_bundleURL((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::Bundle::load() +_NS_INLINE NS::URL* NS::Bundle::resourceURL() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(load)); + return _NS_msg_NS__URLp_resourceURL((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::Bundle::unload() +_NS_INLINE NS::URL* NS::Bundle::executableURL() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(unload)); + return _NS_msg_NS__URLp_executableURL((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::Bundle::isLoaded() const +_NS_INLINE NS::URL* NS::Bundle::privateFrameworksURL() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(isLoaded)); + return _NS_msg_NS__URLp_privateFrameworksURL((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::Bundle::preflightAndReturnError(Error** pError) const +_NS_INLINE NS::URL* NS::Bundle::sharedFrameworksURL() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(preflightAndReturnError_), pError); + return _NS_msg_NS__URLp_sharedFrameworksURL((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::Bundle::loadAndReturnError(Error** pError) +_NS_INLINE NS::URL* NS::Bundle::sharedSupportURL() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(loadAndReturnError_), pError); + return _NS_msg_NS__URLp_sharedSupportURL((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::Bundle::bundleURL() const +_NS_INLINE NS::URL* NS::Bundle::builtInPlugInsURL() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(bundleURL)); + return _NS_msg_NS__URLp_builtInPlugInsURL((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::Bundle::resourceURL() const +_NS_INLINE NS::URL* NS::Bundle::appStoreReceiptURL() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(resourceURL)); + return _NS_msg_NS__URLp_appStoreReceiptURL((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::Bundle::executableURL() const +_NS_INLINE NS::String* NS::Bundle::bundlePath() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(executableURL)); + return _NS_msg_NS__Stringp_bundlePath((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::Bundle::URLForAuxiliaryExecutable(const String* pExecutableName) const +_NS_INLINE NS::String* NS::Bundle::resourcePath() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(URLForAuxiliaryExecutable_), pExecutableName); + return _NS_msg_NS__Stringp_resourcePath((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::Bundle::privateFrameworksURL() const +_NS_INLINE NS::String* NS::Bundle::executablePath() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(privateFrameworksURL)); + return _NS_msg_NS__Stringp_executablePath((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::Bundle::sharedFrameworksURL() const +_NS_INLINE NS::String* NS::Bundle::privateFrameworksPath() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(sharedFrameworksURL)); + return _NS_msg_NS__Stringp_privateFrameworksPath((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::Bundle::sharedSupportURL() const +_NS_INLINE NS::String* NS::Bundle::sharedFrameworksPath() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(sharedSupportURL)); + return _NS_msg_NS__Stringp_sharedFrameworksPath((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::Bundle::builtInPlugInsURL() const +_NS_INLINE NS::String* NS::Bundle::sharedSupportPath() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(builtInPlugInsURL)); + return _NS_msg_NS__Stringp_sharedSupportPath((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::Bundle::appStoreReceiptURL() const +_NS_INLINE NS::String* NS::Bundle::builtInPlugInsPath() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(appStoreReceiptURL)); + return _NS_msg_NS__Stringp_builtInPlugInsPath((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Bundle::bundlePath() const +_NS_INLINE NS::String* NS::Bundle::bundleIdentifier() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(bundlePath)); + return _NS_msg_NS__Stringp_bundleIdentifier((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Bundle::resourcePath() const +_NS_INLINE NS::Dictionary* NS::Bundle::infoDictionary() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(resourcePath)); + return _NS_msg_NS__Dictionaryp_infoDictionary((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Bundle::executablePath() const +_NS_INLINE NS::Dictionary* NS::Bundle::localizedInfoDictionary() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(executablePath)); + return _NS_msg_NS__Dictionaryp_localizedInfoDictionary((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Bundle::pathForAuxiliaryExecutable(const String* pExecutableName) const +_NS_INLINE NS::Bundle* NS::Bundle::init(NS::String* path) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(pathForAuxiliaryExecutable_), pExecutableName); + return _NS_msg_NS__Bundlep_initWithPath__NS__Stringp((const void*)this, nullptr, path); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Bundle::privateFrameworksPath() const +_NS_INLINE NS::Bundle* NS::Bundle::init(NS::URL* url) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(privateFrameworksPath)); + return _NS_msg_NS__Bundlep_initWithURL__NS__URLp((const void*)this, nullptr, url); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Bundle::sharedFrameworksPath() const +_NS_INLINE bool NS::Bundle::load() { - return Object::sendMessage(this, _NS_PRIVATE_SEL(sharedFrameworksPath)); + return _NS_msg_bool_load((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Bundle::sharedSupportPath() const +_NS_INLINE bool NS::Bundle::unload() { - return Object::sendMessage(this, _NS_PRIVATE_SEL(sharedSupportPath)); + return _NS_msg_bool_unload((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Bundle::builtInPlugInsPath() const +_NS_INLINE bool NS::Bundle::preflightAndReturnError(NS::Error** error) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(builtInPlugInsPath)); + return _NS_msg_bool_preflightAndReturnError__NS__Errorpp((const void*)this, nullptr, error); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Bundle::bundleIdentifier() const +_NS_INLINE bool NS::Bundle::loadAndReturnError(NS::Error** error) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(bundleIdentifier)); + return _NS_msg_bool_loadAndReturnError__NS__Errorpp((const void*)this, nullptr, error); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Dictionary* NS::Bundle::infoDictionary() const +_NS_INLINE NS::URL* NS::Bundle::URLForAuxiliaryExecutable(NS::String* executableName) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(infoDictionary)); + return _NS_msg_NS__URLp_URLForAuxiliaryExecutable__NS__Stringp((const void*)this, nullptr, executableName); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Dictionary* NS::Bundle::localizedInfoDictionary() const +_NS_INLINE NS::String* NS::Bundle::path(NS::String* executableName) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(localizedInfoDictionary)); + return _NS_msg_NS__Stringp_pathForAuxiliaryExecutable__NS__Stringp((const void*)this, nullptr, executableName); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Object* NS::Bundle::objectForInfoDictionaryKey(const String* pKey) +_NS_INLINE NS::String* NS::Bundle::localizedString(NS::String* key, NS::String* value, NS::String* tableName) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(objectForInfoDictionaryKey_), pKey); + return _NS_msg_NS__Stringp_localizedStringForKey_value_table__NS__Stringp_NS__Stringp_NS__Stringp((const void*)this, nullptr, key, value, tableName); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Bundle::localizedString(const String* pKey, const String* pValue /* = nullptr */, const String* pTableName /* = nullptr */) const +_NS_INLINE NS::Object* NS::Bundle::object(NS::String* key) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(localizedStringForKey_value_table_), pKey, pValue, pTableName); + return _NS_msg_NS__Objectp_objectForInfoDictionaryKey__NS__Stringp((const void*)this, nullptr, key); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_NS_INLINE bool NS::Bundle::isLoaded() +{ + return _NS_msg_bool_isLoaded((const void*)this, nullptr); +} diff --git a/thirdparty/metal-cpp/Foundation/NSData.hpp b/thirdparty/metal-cpp/Foundation/NSData.hpp index 03576df538c8..41821232ef80 100644 --- a/thirdparty/metal-cpp/Foundation/NSData.hpp +++ b/thirdparty/metal-cpp/Foundation/NSData.hpp @@ -1,60 +1,94 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSData.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - +#include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" #include "NSTypes.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +#include "NSRange.hpp" namespace NS { -class Data : public Copying + +_NS_OPTIONS(NS::UInteger, DataReadingOptions) { + DataReadingMappedIfSafe = 1UL << 0, + DataReadingUncached = 1UL << 1, + DataReadingMappedAlways = 1UL << 3, + DataReadingMapped = DataReadingMappedIfSafe, + MappedRead = DataReadingMapped, + UncachedRead = DataReadingUncached, +}; + +_NS_OPTIONS(NS::UInteger, DataWritingOptions) { + DataWritingAtomic = 1UL << 0, + DataWritingWithoutOverwriting = 1UL << 1, + DataWritingFileProtectionNone = 0x10000000, + DataWritingFileProtectionComplete = 0x20000000, + DataWritingFileProtectionCompleteUnlessOpen = 0x30000000, + DataWritingFileProtectionCompleteUntilFirstUserAuthentication = 0x40000000, + DataWritingFileProtectionCompleteWhenUserInactive = 0x50000000, + DataWritingFileProtectionMask = 0xf0000000, + AtomicWrite = DataWritingAtomic, +}; + +_NS_OPTIONS(NS::UInteger, DataSearchOptions) { + DataSearchBackwards = 1UL << 0, + DataSearchAnchored = 1UL << 1, +}; + +_NS_OPTIONS(NS::UInteger, DataBase64EncodingOptions) { + DataBase64Encoding64CharacterLineLength = 1UL << 0, + DataBase64Encoding76CharacterLineLength = 1UL << 1, + DataBase64EncodingEndLineWithCarriageReturn = 1UL << 4, + DataBase64EncodingEndLineWithLineFeed = 1UL << 5, +}; + +_NS_OPTIONS(NS::UInteger, DataBase64DecodingOptions) { + DataBase64DecodingIgnoreUnknownCharacters = 1UL << 0, +}; + +_NS_ENUM(NS::Integer, DataCompressionAlgorithm) { + DataCompressionAlgorithmLZFSE = 0, + DataCompressionAlgorithmLZ4 = 1, + DataCompressionAlgorithmLZMA = 2, + DataCompressionAlgorithmZlib = 3, +}; + + +class Data : public NS::SecureCoding { public: - void* mutableBytes() const; - UInteger length() const; + static Data* alloc(); + Data* init() const; + const void * bytes() const; + NS::UInteger length() const; + }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +} // namespace NS + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_NSData; -_NS_INLINE void* NS::Data::mutableBytes() const +_NS_INLINE NS::Data* NS::Data::alloc() { - return Object::sendMessage(this, _NS_PRIVATE_SEL(mutableBytes)); + return _NS_msg_NS__Datap_alloc((const void*)&OBJC_CLASS_$_NSData, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_NS_INLINE NS::Data* NS::Data::init() const +{ + return _NS_msg_NS__Datap_init((const void*)this, nullptr); +} _NS_INLINE NS::UInteger NS::Data::length() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(length)); + return _NS_msg_NS__UInteger_length((const void*)this, nullptr); } _NS_INLINE const void * NS::Data::bytes() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(bytes)); + return _NS_msg_constvoidp_bytes((const void*)this, nullptr); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/Foundation/NSDate.hpp b/thirdparty/metal-cpp/Foundation/NSDate.hpp index 0a5ec7ddb409..132d9f834d39 100644 --- a/thirdparty/metal-cpp/Foundation/NSDate.hpp +++ b/thirdparty/metal-cpp/Foundation/NSDate.hpp @@ -1,53 +1,45 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSDate.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" -#include "NSPrivate.hpp" #include "NSTypes.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +#include "NSRange.hpp" namespace NS { -using TimeInterval = double; +extern NS::NotificationName const SystemClockDidChangeNotification __asm__("_NSSystemClockDidChangeNotification"); -class Date : public Copying +class Date : public NS::SecureCoding { public: - static Date* dateWithTimeIntervalSinceNow(TimeInterval secs); + static Date* alloc(); + Date* init() const; + + static NS::Date* date(NS::TimeInterval secs); + }; -} // NS +} // namespace NS -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +// --- Class symbols + inline implementations --- -_NS_INLINE NS::Date* NS::Date::dateWithTimeIntervalSinceNow(NS::TimeInterval secs) +extern "C" void *OBJC_CLASS_$_NSDate; + +_NS_INLINE NS::Date* NS::Date::alloc() +{ + return _NS_msg_NS__Datep_alloc((const void*)&OBJC_CLASS_$_NSDate, nullptr); +} + +_NS_INLINE NS::Date* NS::Date::init() const { - return NS::Object::sendMessage(_NS_PRIVATE_CLS(NSDate), _NS_PRIVATE_SEL(dateWithTimeIntervalSinceNow_), secs); + return _NS_msg_NS__Datep_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file +_NS_INLINE NS::Date* NS::Date::date(NS::TimeInterval secs) +{ + return _NS_msg_NS__Datep_dateWithTimeIntervalSinceNow__double((const void*)&OBJC_CLASS_$_NSDate, nullptr, secs); +} diff --git a/thirdparty/metal-cpp/Foundation/NSDictionary.hpp b/thirdparty/metal-cpp/Foundation/NSDictionary.hpp index d4a1519d5bf8..4341a671ac41 100644 --- a/thirdparty/metal-cpp/Foundation/NSDictionary.hpp +++ b/thirdparty/metal-cpp/Foundation/NSDictionary.hpp @@ -1,128 +1,95 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSDictionary.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include "NSEnumerator.hpp" +#include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" #include "NSTypes.hpp" +#include "NSRange.hpp" +#include "NSEnumerator.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS { + class Object; +} namespace NS { -class Dictionary : public NS::Copying + +class Dictionary : public NS::SecureCoding { public: - static Dictionary* dictionary(); - static Dictionary* dictionary(const Object* pObject, const Object* pKey); - static Dictionary* dictionary(const Object* const* pObjects, const Object* const* pKeys, UInteger count); - static Dictionary* alloc(); + Dictionary* init() const; - Dictionary* init(); - Dictionary* init(const Object* const* pObjects, const Object* const* pKeys, UInteger count); - Dictionary* init(const class Coder* pCoder); + static NS::Dictionary* dictionary(); + static NS::Dictionary* dictionary(NS::Object* object, NS::Object* key); + static NS::Dictionary* dictionary(const NS::Object* const * objects, const NS::Object* const * keys, NS::UInteger cnt); + NS::UInteger count() const; + NS::Dictionary* init(const NS::Object* const * objects, const NS::Object* const * keys, NS::UInteger cnt); + NS::Dictionary* init(void* coder); template - Enumerator<_KeyType>* keyEnumerator() const; - + Enumerator<_KeyType>* keyEnumerator(); template - _Object* object(const Object* pKey) const; - UInteger count() const; + _Object* object(NS::Object* aKey); + }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +} // namespace NS -_NS_INLINE NS::Dictionary* NS::Dictionary::dictionary() -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSDictionary), _NS_PRIVATE_SEL(dictionary)); -} +// --- Class symbols + inline implementations --- -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +extern "C" void *OBJC_CLASS_$_NSDictionary; -_NS_INLINE NS::Dictionary* NS::Dictionary::dictionary(const Object* pObject, const Object* pKey) +_NS_INLINE NS::Dictionary* NS::Dictionary::alloc() { - return Object::sendMessage(_NS_PRIVATE_CLS(NSDictionary), _NS_PRIVATE_SEL(dictionaryWithObject_forKey_), pObject, pKey); + return _NS_msg_NS__Dictionaryp_alloc((const void*)&OBJC_CLASS_$_NSDictionary, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Dictionary* NS::Dictionary::dictionary(const Object* const* pObjects, const Object* const* pKeys, UInteger count) +_NS_INLINE NS::Dictionary* NS::Dictionary::init() const { - return Object::sendMessage(_NS_PRIVATE_CLS(NSDictionary), _NS_PRIVATE_SEL(dictionaryWithObjects_forKeys_count_), - pObjects, pKeys, count); + return _NS_msg_NS__Dictionaryp_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Dictionary* NS::Dictionary::alloc() +_NS_INLINE NS::Dictionary* NS::Dictionary::dictionary() { - return NS::Object::alloc(_NS_PRIVATE_CLS(NSDictionary)); + return _NS_msg_NS__Dictionaryp_dictionary((const void*)&OBJC_CLASS_$_NSDictionary, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Dictionary* NS::Dictionary::init() +_NS_INLINE NS::Dictionary* NS::Dictionary::dictionary(NS::Object* object, NS::Object* key) { - return NS::Object::init(); + return _NS_msg_NS__Dictionaryp_dictionaryWithObject_forKey__NS__Objectp_NS__Objectp((const void*)&OBJC_CLASS_$_NSDictionary, nullptr, object, key); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Dictionary* NS::Dictionary::init(const Object* const* pObjects, const Object* const* pKeys, UInteger count) +_NS_INLINE NS::Dictionary* NS::Dictionary::dictionary(const NS::Object* const * objects, const NS::Object* const * keys, NS::UInteger cnt) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithObjects_forKeys_count_), pObjects, pKeys, count); + return _NS_msg_NS__Dictionaryp_dictionaryWithObjects_forKeys_count__constNS__Objectpconstp_constNS__Objectpconstp_NS__UInteger((const void*)&OBJC_CLASS_$_NSDictionary, nullptr, objects, keys, cnt); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Dictionary* NS::Dictionary::init(const class Coder* pCoder) +_NS_INLINE NS::UInteger NS::Dictionary::count() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithCoder_), pCoder); + return _NS_msg_NS__UInteger_count((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +template +_NS_INLINE _Object* NS::Dictionary::object(NS::Object* aKey) +{ + return reinterpret_cast<_Object*>(_NS_msg_NS__Objectp_objectForKey__NS__Objectp((const void*)this, nullptr, aKey)); +} template -_NS_INLINE NS::Enumerator<_KeyType>* NS::Dictionary::keyEnumerator() const +_NS_INLINE NS::Enumerator<_KeyType>* NS::Dictionary::keyEnumerator() { - return Object::sendMessage*>(this, _NS_PRIVATE_SEL(keyEnumerator)); + return reinterpret_cast*>(_NS_msg_NS__EnumeratorLNS__ObjectGp_keyEnumerator((const void*)this, nullptr)); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -template -_NS_INLINE _Object* NS::Dictionary::object(const Object* pKey) const +_NS_INLINE NS::Dictionary* NS::Dictionary::init(const NS::Object* const * objects, const NS::Object* const * keys, NS::UInteger cnt) { - return Object::sendMessage<_Object*>(this, _NS_PRIVATE_SEL(objectForKey_), pKey); + return _NS_msg_NS__Dictionaryp_initWithObjects_forKeys_count__constNS__Objectpconstp_constNS__Objectpconstp_NS__UInteger((const void*)this, nullptr, objects, keys, cnt); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::UInteger NS::Dictionary::count() const +_NS_INLINE NS::Dictionary* NS::Dictionary::init(void* coder) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(count)); + return _NS_msg_NS__Dictionaryp_initWithCoder__voidp((const void*)this, nullptr, coder); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/Foundation/NSEnumerator.hpp b/thirdparty/metal-cpp/Foundation/NSEnumerator.hpp index 5a2500c1e7fe..8dcab58da804 100644 --- a/thirdparty/metal-cpp/Foundation/NSEnumerator.hpp +++ b/thirdparty/metal-cpp/Foundation/NSEnumerator.hpp @@ -1,31 +1,23 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSEnumerator.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +// NS::Enumerator / NS::FastEnumeration — emitted by tools/generate.py +// (used to live verbatim under metal-cpp-apple). The kept-upstream +// version routed through `_NS_PRIVATE_SEL`; this version dispatches +// directly through the linker-synthesized `_objc_msgSend$` stubs +// so it stops pulling Apple's selector-registration machinery into the +// tree. +#include "NSDefines.hpp" #include "NSObject.hpp" #include "NSTypes.hpp" +#include "NSBridge.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS +{ +class Array; +class FastEnumeration; +template class Enumerator; +} // namespace NS namespace NS { @@ -50,29 +42,26 @@ class Enumerator : public Referencing, FastEnumeration> _ObjectType* nextObject(); class Array* allObjects(); }; -} +} // namespace NS -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +// --- Inline implementations --- -_NS_INLINE NS::UInteger NS::FastEnumeration::countByEnumerating(FastEnumerationState* pState, Object** pBuffer, NS::UInteger len) +_NS_INLINE NS::UInteger NS::FastEnumeration::countByEnumerating( + FastEnumerationState* pState, Object** pBuffer, NS::UInteger len) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(countByEnumeratingWithState_objects_count_), pState, pBuffer, len); + return _NS_msg_NS__UInteger_countByEnumeratingWithState_objects_count__voidp_NS__Objectpp_NS__UInteger( + (const void*)this, nullptr, pState, pBuffer, len); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - template _NS_INLINE _ObjectType* NS::Enumerator<_ObjectType>::nextObject() { - return Object::sendMessage<_ObjectType*>(this, _NS_PRIVATE_SEL(nextObject)); + return reinterpret_cast<_ObjectType*>( + _NS_msg_voidp_nextObject((const void*)this, nullptr)); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - template _NS_INLINE NS::Array* NS::Enumerator<_ObjectType>::allObjects() { - return Object::sendMessage(this, _NS_PRIVATE_SEL(allObjects)); + return _NS_msg_NS__Arrayp_allObjects((const void*)this, nullptr); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/Foundation/NSError.hpp b/thirdparty/metal-cpp/Foundation/NSError.hpp index ea331d46e42e..7bd6c2546825 100644 --- a/thirdparty/metal-cpp/Foundation/NSError.hpp +++ b/thirdparty/metal-cpp/Foundation/NSError.hpp @@ -1,173 +1,118 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSError.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" -#include "NSPrivate.hpp" #include "NSTypes.hpp" +#include "NSRange.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS { + class Array; + class Dictionary; + class String; +} namespace NS { -using ErrorDomain = class String*; - -_NS_CONST(ErrorDomain, CocoaErrorDomain); -_NS_CONST(ErrorDomain, POSIXErrorDomain); -_NS_CONST(ErrorDomain, OSStatusErrorDomain); -_NS_CONST(ErrorDomain, MachErrorDomain); - -using ErrorUserInfoKey = class String*; - -_NS_CONST(ErrorUserInfoKey, UnderlyingErrorKey); -_NS_CONST(ErrorUserInfoKey, LocalizedDescriptionKey); -_NS_CONST(ErrorUserInfoKey, LocalizedFailureReasonErrorKey); -_NS_CONST(ErrorUserInfoKey, LocalizedRecoverySuggestionErrorKey); -_NS_CONST(ErrorUserInfoKey, LocalizedRecoveryOptionsErrorKey); -_NS_CONST(ErrorUserInfoKey, RecoveryAttempterErrorKey); -_NS_CONST(ErrorUserInfoKey, HelpAnchorErrorKey); -_NS_CONST(ErrorUserInfoKey, DebugDescriptionErrorKey); -_NS_CONST(ErrorUserInfoKey, LocalizedFailureErrorKey); -_NS_CONST(ErrorUserInfoKey, StringEncodingErrorKey); -_NS_CONST(ErrorUserInfoKey, URLErrorKey); -_NS_CONST(ErrorUserInfoKey, FilePathErrorKey); - -class Error : public Copying + +using ErrorDomain = NS::String*; +using ErrorUserInfoKey = NS::String*; +extern ErrorDomain const CocoaErrorDomain __asm__("_NSCocoaErrorDomain"); +extern ErrorDomain const POSIXErrorDomain __asm__("_NSPOSIXErrorDomain"); +extern ErrorDomain const OSStatusErrorDomain __asm__("_NSOSStatusErrorDomain"); +extern ErrorDomain const MachErrorDomain __asm__("_NSMachErrorDomain"); +extern ErrorUserInfoKey const UnderlyingErrorKey __asm__("_NSUnderlyingErrorKey"); +extern ErrorUserInfoKey const MultipleUnderlyingErrorsKey __asm__("_NSMultipleUnderlyingErrorsKey"); +extern ErrorUserInfoKey const LocalizedDescriptionKey __asm__("_NSLocalizedDescriptionKey"); +extern ErrorUserInfoKey const LocalizedFailureReasonErrorKey __asm__("_NSLocalizedFailureReasonErrorKey"); +extern ErrorUserInfoKey const LocalizedRecoverySuggestionErrorKey __asm__("_NSLocalizedRecoverySuggestionErrorKey"); +extern ErrorUserInfoKey const LocalizedRecoveryOptionsErrorKey __asm__("_NSLocalizedRecoveryOptionsErrorKey"); +extern ErrorUserInfoKey const RecoveryAttempterErrorKey __asm__("_NSRecoveryAttempterErrorKey"); +extern ErrorUserInfoKey const HelpAnchorErrorKey __asm__("_NSHelpAnchorErrorKey"); +extern ErrorUserInfoKey const DebugDescriptionErrorKey __asm__("_NSDebugDescriptionErrorKey"); +extern ErrorUserInfoKey const LocalizedFailureErrorKey __asm__("_NSLocalizedFailureErrorKey"); +extern ErrorUserInfoKey const StringEncodingErrorKey __asm__("_NSStringEncodingErrorKey"); +extern ErrorUserInfoKey const URLErrorKey __asm__("_NSURLErrorKey"); +extern ErrorUserInfoKey const FilePathErrorKey __asm__("_NSFilePathErrorKey"); + +class Error : public NS::SecureCoding { public: - static Error* error(ErrorDomain domain, Integer code, class Dictionary* pDictionary); + static Error* alloc(); + Error* init() const; - static Error* alloc(); - Error* init(); - Error* init(ErrorDomain domain, Integer code, class Dictionary* pDictionary); + static NS::Error* error(NS::ErrorDomain domain, NS::Integer code, NS::Dictionary* dict); - Integer code() const; - ErrorDomain domain() const; - class Dictionary* userInfo() const; + NS::Integer code() const; + NS::ErrorDomain domain() const; + NS::Error* init(NS::ErrorDomain domain, NS::Integer code, NS::Dictionary* dict); + NS::String* localizedDescription() const; + NS::String* localizedFailureReason() const; + NS::Array* localizedRecoveryOptions() const; + NS::String* localizedRecoverySuggestion() const; + NS::Dictionary* userInfo() const; - class String* localizedDescription() const; - class Array* localizedRecoveryOptions() const; - class String* localizedRecoverySuggestion() const; - class String* localizedFailureReason() const; }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_PRIVATE_DEF_CONST(NS::ErrorDomain, CocoaErrorDomain); -_NS_PRIVATE_DEF_CONST(NS::ErrorDomain, POSIXErrorDomain); -_NS_PRIVATE_DEF_CONST(NS::ErrorDomain, OSStatusErrorDomain); -_NS_PRIVATE_DEF_CONST(NS::ErrorDomain, MachErrorDomain); - -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, UnderlyingErrorKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, LocalizedDescriptionKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, LocalizedFailureReasonErrorKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, LocalizedRecoverySuggestionErrorKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, LocalizedRecoveryOptionsErrorKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, RecoveryAttempterErrorKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, HelpAnchorErrorKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, DebugDescriptionErrorKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, LocalizedFailureErrorKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, StringEncodingErrorKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, URLErrorKey); -_NS_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, FilePathErrorKey); - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Error* NS::Error::error(ErrorDomain domain, Integer code, class Dictionary* pDictionary) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSError), _NS_PRIVATE_SEL(errorWithDomain_code_userInfo_), domain, code, pDictionary); -} +} // namespace NS -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_NSError; _NS_INLINE NS::Error* NS::Error::alloc() { - return Object::alloc(_NS_PRIVATE_CLS(NSError)); + return _NS_msg_NS__Errorp_alloc((const void*)&OBJC_CLASS_$_NSError, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Error* NS::Error::init() +_NS_INLINE NS::Error* NS::Error::init() const { - return Object::init(); + return _NS_msg_NS__Errorp_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Error* NS::Error::init(ErrorDomain domain, Integer code, class Dictionary* pDictionary) +_NS_INLINE NS::Error* NS::Error::error(NS::ErrorDomain domain, NS::Integer code, NS::Dictionary* dict) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithDomain_code_userInfo_), domain, code, pDictionary); + return _NS_msg_NS__Errorp_errorWithDomain_code_userInfo__NS__Stringp_NS__Integer_NS__Dictionaryp((const void*)&OBJC_CLASS_$_NSError, nullptr, domain, code, dict); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Integer NS::Error::code() const +_NS_INLINE NS::ErrorDomain NS::Error::domain() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(code)); + return _NS_msg_NS__Stringp_domain((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::ErrorDomain NS::Error::domain() const +_NS_INLINE NS::Integer NS::Error::code() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(domain)); + return _NS_msg_NS__Integer_code((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::Dictionary* NS::Error::userInfo() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(userInfo)); + return _NS_msg_NS__Dictionaryp_userInfo((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::String* NS::Error::localizedDescription() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(localizedDescription)); + return _NS_msg_NS__Stringp_localizedDescription((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Array* NS::Error::localizedRecoveryOptions() const +_NS_INLINE NS::String* NS::Error::localizedFailureReason() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(localizedRecoveryOptions)); + return _NS_msg_NS__Stringp_localizedFailureReason((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::String* NS::Error::localizedRecoverySuggestion() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(localizedRecoverySuggestion)); + return _NS_msg_NS__Stringp_localizedRecoverySuggestion((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Error::localizedFailureReason() const +_NS_INLINE NS::Array* NS::Error::localizedRecoveryOptions() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(localizedFailureReason)); + return _NS_msg_NS__Arrayp_localizedRecoveryOptions((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_NS_INLINE NS::Error* NS::Error::init(NS::ErrorDomain domain, NS::Integer code, NS::Dictionary* dict) +{ + return _NS_msg_NS__Errorp_initWithDomain_code_userInfo__NS__Stringp_NS__Integer_NS__Dictionaryp((const void*)this, nullptr, domain, code, dict); +} diff --git a/thirdparty/metal-cpp/Foundation/NSLock.hpp b/thirdparty/metal-cpp/Foundation/NSLock.hpp index 01df219402e1..526fa7b11d9a 100644 --- a/thirdparty/metal-cpp/Foundation/NSLock.hpp +++ b/thirdparty/metal-cpp/Foundation/NSLock.hpp @@ -1,118 +1,65 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSLock.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" -#include "NSPrivate.hpp" #include "NSTypes.hpp" -#include "NSDate.hpp" +#include "NSRange.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS { + class Date; +} namespace NS { -template -class Locking : public _Base -{ -public: - void lock(); - void unlock(); -}; - -class Condition : public Locking +class Condition : public NS::Referencing { public: static Condition* alloc(); + Condition* init() const; - Condition* init(); + void broadcast(); + void signal(); + void wait(); + bool waitUntilDate(NS::Date* limit); - void wait(); - bool waitUntilDate(Date* pLimit); - void signal(); - void broadcast(); }; -} // NS - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +} // namespace NS -template -_NS_INLINE void NS::Locking<_Class, _Base>::lock() -{ - NS::Object::sendMessage(this, _NS_PRIVATE_SEL(lock)); -} +// --- Class symbols + inline implementations --- -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -template -_NS_INLINE void NS::Locking<_Class, _Base>::unlock() -{ - NS::Object::sendMessage(this, _NS_PRIVATE_SEL(unlock)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +extern "C" void *OBJC_CLASS_$_NSCondition; _NS_INLINE NS::Condition* NS::Condition::alloc() { - return NS::Object::alloc(_NS_PRIVATE_CLS(NSCondition)); + return _NS_msg_NS__Conditionp_alloc((const void*)&OBJC_CLASS_$_NSCondition, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Condition* NS::Condition::init() +_NS_INLINE NS::Condition* NS::Condition::init() const { - return NS::Object::init(); + return _NS_msg_NS__Conditionp_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE void NS::Condition::wait() { - NS::Object::sendMessage(this, _NS_PRIVATE_SEL(wait)); + _NS_msg_v_wait((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::Condition::waitUntilDate(NS::Date* pLimit) +_NS_INLINE bool NS::Condition::waitUntilDate(NS::Date* limit) { - return NS::Object::sendMessage(this, _NS_PRIVATE_SEL(waitUntilDate_), pLimit); + return _NS_msg_bool_waitUntilDate__NS__Datep((const void*)this, nullptr, limit); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE void NS::Condition::signal() { - NS::Object::sendMessage(this, _NS_PRIVATE_SEL(signal)); + _NS_msg_v_signal((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE void NS::Condition::broadcast() { - NS::Object::sendMessage(this, _NS_PRIVATE_SEL(broadcast)); + _NS_msg_v_broadcast((const void*)this, nullptr); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/thirdparty/metal-cpp/Foundation/NSNotification.hpp b/thirdparty/metal-cpp/Foundation/NSNotification.hpp index 6b5be12117ef..5d80c834fa46 100644 --- a/thirdparty/metal-cpp/Foundation/NSNotification.hpp +++ b/thirdparty/metal-cpp/Foundation/NSNotification.hpp @@ -1,110 +1,98 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSNotification.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "NSDefines.hpp" -#include "NSDictionary.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" -#include "NSString.hpp" #include "NSTypes.hpp" -#include +#include "NSRange.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS { + class Dictionary; + class Object; +} namespace NS { -using NotificationName = class String*; -class Notification : public NS::Referencing +using NotificationName = NS::String*; + +class Notification; +class NotificationCenter; + +class Notification : public NS::Copying { public: - NS::String* name() const; - NS::Object* object() const; - NS::Dictionary* userInfo() const; -}; + static Notification* alloc(); + Notification* init() const; + + NS::NotificationName name() const; + NS::Object* object() const; + NS::Dictionary* userInfo() const; -using ObserverBlock = void(^)(Notification*); -using ObserverFunction = std::function; +}; class NotificationCenter : public NS::Referencing { - public: - static class NotificationCenter* defaultCenter(); - Object* addObserver(NotificationName name, Object* pObj, void* pQueue, ObserverBlock block); - Object* addObserver(NotificationName name, Object* pObj, void* pQueue, ObserverFunction &handler); - void removeObserver(Object* pObserver); +public: + static NotificationCenter* alloc(); + NotificationCenter* init() const; + + static NS::NotificationCenter* defaultCenter(); + + void removeObserver(NS::Object* observer); }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +} // namespace NS + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_NSNotification; +extern "C" void *OBJC_CLASS_$_NSNotificationCenter; -_NS_INLINE NS::String* NS::Notification::name() const +_NS_INLINE NS::Notification* NS::Notification::alloc() { - return Object::sendMessage(this, _NS_PRIVATE_SEL(name)); + return _NS_msg_NS__Notificationp_alloc((const void*)&OBJC_CLASS_$_NSNotification, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_NS_INLINE NS::Notification* NS::Notification::init() const +{ + return _NS_msg_NS__Notificationp_init((const void*)this, nullptr); +} -_NS_INLINE NS::Object* NS::Notification::object() const +_NS_INLINE NS::NotificationName NS::Notification::name() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(object)); + return _NS_msg_NS__Stringp_name((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_NS_INLINE NS::Object* NS::Notification::object() const +{ + return _NS_msg_NS__Objectp_object((const void*)this, nullptr); +} _NS_INLINE NS::Dictionary* NS::Notification::userInfo() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(userInfo)); + return _NS_msg_NS__Dictionaryp_userInfo((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::NotificationCenter* NS::NotificationCenter::defaultCenter() +_NS_INLINE NS::NotificationCenter* NS::NotificationCenter::alloc() { - return NS::Object::sendMessage(_NS_PRIVATE_CLS(NSNotificationCenter), _NS_PRIVATE_SEL(defaultCenter)); + return _NS_msg_NS__NotificationCenterp_alloc((const void*)&OBJC_CLASS_$_NSNotificationCenter, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Object* NS::NotificationCenter::addObserver(NS::NotificationName name, Object* pObj, void* pQueue, NS::ObserverBlock block) +_NS_INLINE NS::NotificationCenter* NS::NotificationCenter::init() const { - return NS::Object::sendMessage(this, _NS_PRIVATE_SEL(addObserverName_object_queue_block_), name, pObj, pQueue, block); + return _NS_msg_NS__NotificationCenterp_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Object* NS::NotificationCenter::addObserver(NS::NotificationName name, Object* pObj, void* pQueue, NS::ObserverFunction &handler) +_NS_INLINE NS::NotificationCenter* NS::NotificationCenter::defaultCenter() { - __block ObserverFunction blockFunction = handler; - - return addObserver(name, pObj, pQueue, ^(NS::Notification* pNotif) {blockFunction(pNotif);}); + return _NS_msg_NS__NotificationCenterp_defaultCenter((const void*)&OBJC_CLASS_$_NSNotificationCenter, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::NotificationCenter::removeObserver(Object* pObserver) +_NS_INLINE void NS::NotificationCenter::removeObserver(NS::Object* observer) { - return NS::Object::sendMessage(this, _NS_PRIVATE_SEL(removeObserver_), pObserver); + _NS_msg_v_removeObserver__NS__Objectp((const void*)this, nullptr, observer); } - diff --git a/thirdparty/metal-cpp/Foundation/NSNumber.hpp b/thirdparty/metal-cpp/Foundation/NSNumber.hpp deleted file mode 100644 index eec7ceac50fd..000000000000 --- a/thirdparty/metal-cpp/Foundation/NSNumber.hpp +++ /dev/null @@ -1,501 +0,0 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSNumber.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#pragma once - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include "NSObjCRuntime.hpp" -#include "NSObject.hpp" -#include "NSTypes.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace NS -{ -class Value : public Copying -{ -public: - static Value* value(const void* pValue, const char* pType); - static Value* value(const void* pPointer); - - static Value* alloc(); - - Value* init(const void* pValue, const char* pType); - Value* init(const class Coder* pCoder); - - void getValue(void* pValue, UInteger size) const; - const char* objCType() const; - - bool isEqualToValue(Value* pValue) const; - void* pointerValue() const; -}; - -class Number : public Copying -{ -public: - static Number* number(char value); - static Number* number(unsigned char value); - static Number* number(short value); - static Number* number(unsigned short value); - static Number* number(int value); - static Number* number(unsigned int value); - static Number* number(long value); - static Number* number(unsigned long value); - static Number* number(long long value); - static Number* number(unsigned long long value); - static Number* number(float value); - static Number* number(double value); - static Number* number(bool value); - - static Number* alloc(); - - Number* init(const class Coder* pCoder); - Number* init(char value); - Number* init(unsigned char value); - Number* init(short value); - Number* init(unsigned short value); - Number* init(int value); - Number* init(unsigned int value); - Number* init(long value); - Number* init(unsigned long value); - Number* init(long long value); - Number* init(unsigned long long value); - Number* init(float value); - Number* init(double value); - Number* init(bool value); - - char charValue() const; - unsigned char unsignedCharValue() const; - short shortValue() const; - unsigned short unsignedShortValue() const; - int intValue() const; - unsigned int unsignedIntValue() const; - long longValue() const; - unsigned long unsignedLongValue() const; - long long longLongValue() const; - unsigned long long unsignedLongLongValue() const; - float floatValue() const; - double doubleValue() const; - bool boolValue() const; - Integer integerValue() const; - UInteger unsignedIntegerValue() const; - class String* stringValue() const; - - ComparisonResult compare(const Number* pOtherNumber) const; - bool isEqualToNumber(const Number* pNumber) const; - - class String* descriptionWithLocale(const Object* pLocale) const; -}; -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Value* NS::Value::value(const void* pValue, const char* pType) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSValue), _NS_PRIVATE_SEL(valueWithBytes_objCType_), pValue, pType); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Value* NS::Value::value(const void* pPointer) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSValue), _NS_PRIVATE_SEL(valueWithPointer_), pPointer); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Value* NS::Value::alloc() -{ - return NS::Object::alloc(_NS_PRIVATE_CLS(NSValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Value* NS::Value::init(const void* pValue, const char* pType) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithBytes_objCType_), pValue, pType); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Value* NS::Value::init(const class Coder* pCoder) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithCoder_), pCoder); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::Value::getValue(void* pValue, UInteger size) const -{ - Object::sendMessage(this, _NS_PRIVATE_SEL(getValue_size_), pValue, size); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE const char* NS::Value::objCType() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(objCType)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::Value::isEqualToValue(Value* pValue) const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(isEqualToValue_), pValue); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void* NS::Value::pointerValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(pointerValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(char value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithChar_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(unsigned char value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithUnsignedChar_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(short value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithShort_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(unsigned short value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithUnsignedShort_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(int value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithInt_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(unsigned int value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithUnsignedInt_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(long value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithLong_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(unsigned long value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithUnsignedLong_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(long long value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithLongLong_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(unsigned long long value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithUnsignedLongLong_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(float value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithFloat_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(double value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithDouble_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::number(bool value) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSNumber), _NS_PRIVATE_SEL(numberWithBool_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::alloc() -{ - return NS::Object::alloc(_NS_PRIVATE_CLS(NSNumber)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(const Coder* pCoder) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithCoder_), pCoder); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(char value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithChar_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(unsigned char value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithUnsignedChar_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(short value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithShort_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(unsigned short value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithUnsignedShort_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(int value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithInt_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(unsigned int value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithUnsignedInt_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(long value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithLong_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(unsigned long value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithUnsignedLong_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(long long value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithLongLong_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(unsigned long long value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithUnsignedLongLong_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(float value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithFloat_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(double value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithDouble_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Number* NS::Number::init(bool value) -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithBool_), value); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE char NS::Number::charValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(charValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE unsigned char NS::Number::unsignedCharValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(unsignedCharValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE short NS::Number::shortValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(shortValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE unsigned short NS::Number::unsignedShortValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(unsignedShortValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE int NS::Number::intValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(intValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE unsigned int NS::Number::unsignedIntValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(unsignedIntValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE long NS::Number::longValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(longValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE unsigned long NS::Number::unsignedLongValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(unsignedLongValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE long long NS::Number::longLongValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(longLongValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE unsigned long long NS::Number::unsignedLongLongValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(unsignedLongLongValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE float NS::Number::floatValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(floatValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE double NS::Number::doubleValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(doubleValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::Number::boolValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(boolValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Integer NS::Number::integerValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(integerValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::UInteger NS::Number::unsignedIntegerValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(unsignedIntegerValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Number::stringValue() const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(stringValue)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::ComparisonResult NS::Number::compare(const Number* pOtherNumber) const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(compare_), pOtherNumber); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::Number::isEqualToNumber(const Number* pNumber) const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(isEqualToNumber_), pNumber); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::Number::descriptionWithLocale(const Object* pLocale) const -{ - return Object::sendMessage(this, _NS_PRIVATE_SEL(descriptionWithLocale_), pLocale); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/Foundation/NSObject.hpp b/thirdparty/metal-cpp/Foundation/NSObject.hpp index 828c18cd4fac..93fefed4d6a1 100644 --- a/thirdparty/metal-cpp/Foundation/NSObject.hpp +++ b/thirdparty/metal-cpp/Foundation/NSObject.hpp @@ -1,37 +1,30 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSObject.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +// NS::Object — the CRTP root. Emitted by tools/generate.py; was formerly +// copied verbatim from Apple's metal-cpp/Foundation/NSObject.hpp. +// +// Directly-named selectors (retain/release/autorelease/retainCount/copy/ +// hash/isEqual:/description/debugDescription/init/alloc/ +// respondsToSelector:/methodSignatureForSelector:) dispatch through the +// linker-synthesized `_objc_msgSend$` trampolines — same shape every +// other generated class uses. `sendMessage` / `sendMessageSafe` are kept +// for callers that need to dispatch an arbitrary runtime SEL. #include "NSDefines.hpp" -#include "NSPrivate.hpp" #include "NSTypes.hpp" +#include "NSBridge.hpp" #include #include #include -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS +{ +class Object; +class String; +class MethodSignature; +} // namespace NS namespace NS { @@ -41,9 +34,7 @@ class _NS_EXPORT Referencing : public _Base public: _Class* retain(); void release(); - _Class* autorelease(); - UInteger retainCount() const; }; @@ -98,50 +89,40 @@ class Object : public Referencing Object& operator=(const Object&) = delete; }; -} +} // namespace NS -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +// --- Inline implementations --- -template +template _NS_INLINE _Class* NS::Referencing<_Class, _Base>::retain() { - return Object::sendMessage<_Class*>(this, _NS_PRIVATE_SEL(retain)); + return reinterpret_cast<_Class*>(_NS_msg_voidp_retain((const void*)this, nullptr)); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -template +template _NS_INLINE void NS::Referencing<_Class, _Base>::release() { - Object::sendMessage(this, _NS_PRIVATE_SEL(release)); + _NS_msg_v_release((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -template +template _NS_INLINE _Class* NS::Referencing<_Class, _Base>::autorelease() { - return Object::sendMessage<_Class*>(this, _NS_PRIVATE_SEL(autorelease)); + return reinterpret_cast<_Class*>(_NS_msg_voidp_autorelease((const void*)this, nullptr)); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -template +template _NS_INLINE NS::UInteger NS::Referencing<_Class, _Base>::retainCount() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(retainCount)); + return _NS_msg_NS__UInteger_retainCount((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -template +template _NS_INLINE _Class* NS::Copying<_Class, _Base>::copy() const { - return Object::sendMessage<_Class*>(this, _NS_PRIVATE_SEL(copy)); + return reinterpret_cast<_Class*>(_NS_msg_voidp_copy((const void*)this, nullptr)); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - template _NS_INLINE _Dst NS::Object::bridgingCast(const void* pObj) { @@ -152,36 +133,31 @@ _NS_INLINE _Dst NS::Object::bridgingCast(const void* pObj) #endif // __OBJC__ } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - template _NS_INLINE constexpr bool NS::Object::doesRequireMsgSendStret() { #if (defined(__i386__) || defined(__x86_64__)) constexpr size_t kStructLimit = (sizeof(std::uintptr_t) << 1); - return sizeof(_Type) > kStructLimit; #elif defined(__arm64__) return false; #elif defined(__arm__) constexpr size_t kStructLimit = sizeof(std::uintptr_t); - return std::is_class_v<_Type> && (sizeof(_Type) > kStructLimit); #else #error "Unsupported architecture!" #endif } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - template <> _NS_INLINE constexpr bool NS::Object::doesRequireMsgSendStret() { return false; } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - +// `sendMessage` keeps the upstream architecture-aware dispatch: x86 uses +// objc_msgSend_fpret for floating-point returns and objc_msgSend_stret +// for large structs, arm64 always uses regular objc_msgSend. template _NS_INLINE _Ret NS::Object::sendMessage(const void* pObj, SEL selector, _Args... args) { @@ -189,52 +165,39 @@ _NS_INLINE _Ret NS::Object::sendMessage(const void* pObj, SEL selector, _Args... if constexpr (std::is_floating_point<_Ret>()) { using SendMessageProcFpret = _Ret (*)(const void*, SEL, _Args...); - const SendMessageProcFpret pProc = reinterpret_cast(&objc_msgSend_fpret); - return (*pProc)(pObj, selector, args...); } else -#endif // ( defined( __i386__ ) || defined( __x86_64__ ) ) +#endif #if !defined(__arm64__) if constexpr (doesRequireMsgSendStret<_Ret>()) { using SendMessageProcStret = void (*)(_Ret*, const void*, SEL, _Args...); - const SendMessageProcStret pProc = reinterpret_cast(&objc_msgSend_stret); _Ret ret; - (*pProc)(&ret, pObj, selector, args...); - return ret; } else -#endif // !defined( __arm64__ ) +#endif { using SendMessageProc = _Ret (*)(const void*, SEL, _Args...); - const SendMessageProc pProc = reinterpret_cast(&objc_msgSend); - return (*pProc)(pObj, selector, args...); } } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::MethodSignature* NS::Object::methodSignatureForSelector(const void* pObj, SEL selector) { - return sendMessage(pObj, _NS_PRIVATE_SEL(methodSignatureForSelector_), selector); + return _NS_msg_NS__MethodSignaturep_methodSignatureForSelector__SEL(pObj, nullptr, selector); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE bool NS::Object::respondsToSelector(const void* pObj, SEL selector) { - return sendMessage(pObj, _NS_PRIVATE_SEL(respondsToSelector_), selector); + return _NS_msg_bool_respondsToSelector__SEL(pObj, nullptr, selector); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - template _NS_INLINE _Ret NS::Object::sendMessageSafe(const void* pObj, SEL selector, _Args... args) { @@ -249,56 +212,48 @@ _NS_INLINE _Ret NS::Object::sendMessageSafe(const void* pObj, SEL selector, _Arg } } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - template _NS_INLINE _Class* NS::Object::alloc(const char* pClassName) { - return sendMessage<_Class*>(objc_lookUpClass(pClassName), _NS_PRIVATE_SEL(alloc)); + // objc_lookUpClass returns `Class` (objc_class*). Under ObjC ARC, + // bridging a Class to a non-retainable pointer needs `__bridge`; + // in pure C++ translation units the macro expands to nothing. +#if __has_feature(objc_arc) + const void* cls = (__bridge const void*)objc_lookUpClass(pClassName); +#else + const void* cls = (const void*)objc_lookUpClass(pClassName); +#endif + return reinterpret_cast<_Class*>(_NS_msg_voidp_alloc(cls, nullptr)); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - template _NS_INLINE _Class* NS::Object::alloc(const void* pClass) { - return sendMessage<_Class*>(pClass, _NS_PRIVATE_SEL(alloc)); + return reinterpret_cast<_Class*>(_NS_msg_voidp_alloc(pClass, nullptr)); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - template _NS_INLINE _Class* NS::Object::init() { - return sendMessage<_Class*>(this, _NS_PRIVATE_SEL(init)); + return reinterpret_cast<_Class*>(_NS_msg_voidp_init((const void*)this, nullptr)); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::UInteger NS::Object::hash() const { - return sendMessage(this, _NS_PRIVATE_SEL(hash)); + return _NS_msg_NS__UInteger_hash((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE bool NS::Object::isEqual(const Object* pObject) const { - return sendMessage(this, _NS_PRIVATE_SEL(isEqual_), pObject); + return _NS_msg_bool_isEqual__constNS__Objectp((const void*)this, nullptr, pObject); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::String* NS::Object::description() const { - return sendMessage(this, _NS_PRIVATE_SEL(description)); + return _NS_msg_NS__Stringp_description((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::String* NS::Object::debugDescription() const { - return sendMessageSafe(this, _NS_PRIVATE_SEL(debugDescription)); + return _NS_msg_NS__Stringp_debugDescription((const void*)this, nullptr); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/Foundation/NSPrivate.hpp b/thirdparty/metal-cpp/Foundation/NSPrivate.hpp deleted file mode 100644 index 12a14636f7cf..000000000000 --- a/thirdparty/metal-cpp/Foundation/NSPrivate.hpp +++ /dev/null @@ -1,535 +0,0 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSPrivate.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#pragma once - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#define _NS_PRIVATE_CLS(symbol) (Private::Class::s_k##symbol) -#define _NS_PRIVATE_SEL(accessor) (Private::Selector::s_k##accessor) - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#if defined(NS_PRIVATE_IMPLEMENTATION) - -#include - -namespace NS::Private -{ - template - inline _Type const LoadSymbol(const char* pSymbol) - { - const _Type* pAddress = static_cast<_Type*>(dlsym(RTLD_DEFAULT, pSymbol)); - - return pAddress ? *pAddress : _Type(); - } -} // NS::Private - -#ifdef METALCPP_SYMBOL_VISIBILITY_HIDDEN -#define _NS_PRIVATE_VISIBILITY __attribute__((visibility("hidden"))) -#else -#define _NS_PRIVATE_VISIBILITY __attribute__((visibility("default"))) -#endif // METALCPP_SYMBOL_VISIBILITY_HIDDEN - -#define _NS_PRIVATE_IMPORT __attribute__((weak_import)) - -#ifdef __OBJC__ -#define _NS_PRIVATE_OBJC_LOOKUP_CLASS(symbol) ((__bridge void*)objc_lookUpClass(#symbol)) -#define _NS_PRIVATE_OBJC_GET_PROTOCOL(symbol) ((__bridge void*)objc_getProtocol(#symbol)) -#else -#define _NS_PRIVATE_OBJC_LOOKUP_CLASS(symbol) objc_lookUpClass(#symbol) -#define _NS_PRIVATE_OBJC_GET_PROTOCOL(symbol) objc_getProtocol(#symbol) -#endif // __OBJC__ - -#define _NS_PRIVATE_DEF_CLS(symbol) void* s_k##symbol _NS_PRIVATE_VISIBILITY = _NS_PRIVATE_OBJC_LOOKUP_CLASS(symbol) -#define _NS_PRIVATE_DEF_PRO(symbol) void* s_k##symbol _NS_PRIVATE_VISIBILITY = _NS_PRIVATE_OBJC_GET_PROTOCOL(symbol) -#define _NS_PRIVATE_DEF_SEL(accessor, symbol) SEL s_k##accessor _NS_PRIVATE_VISIBILITY = sel_registerName(symbol) - -#if defined(__MAC_26_0) || defined(__IPHONE_26_0) || defined(__TVOS_26_0) -#define _NS_PRIVATE_DEF_CONST(type, symbol) \ - _NS_EXTERN type const NS##symbol _NS_PRIVATE_IMPORT; \ - type const NS::symbol = (nullptr != &NS##symbol) ? NS##symbol : type() -#else -#define _NS_PRIVATE_DEF_CONST(type, symbol) \ - _NS_EXTERN type const MTL##symbol _NS_PRIVATE_IMPORT; \ - type const NS::symbol = Private::LoadSymbol("NS" #symbol) -#endif - -#else - -#define _NS_PRIVATE_DEF_CLS(symbol) extern void* s_k##symbol -#define _NS_PRIVATE_DEF_PRO(symbol) extern void* s_k##symbol -#define _NS_PRIVATE_DEF_SEL(accessor, symbol) extern SEL s_k##accessor -#define _NS_PRIVATE_DEF_CONST(type, symbol) extern type const NS::symbol - -#endif // NS_PRIVATE_IMPLEMENTATION - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace NS -{ -namespace Private -{ - namespace Class - { - - _NS_PRIVATE_DEF_CLS(NSArray); - _NS_PRIVATE_DEF_CLS(NSAutoreleasePool); - _NS_PRIVATE_DEF_CLS(NSBundle); - _NS_PRIVATE_DEF_CLS(NSCondition); - _NS_PRIVATE_DEF_CLS(NSDate); - _NS_PRIVATE_DEF_CLS(NSDictionary); - _NS_PRIVATE_DEF_CLS(NSError); - _NS_PRIVATE_DEF_CLS(NSNotificationCenter); - _NS_PRIVATE_DEF_CLS(NSNumber); - _NS_PRIVATE_DEF_CLS(NSObject); - _NS_PRIVATE_DEF_CLS(NSProcessInfo); - _NS_PRIVATE_DEF_CLS(NSSet); - _NS_PRIVATE_DEF_CLS(NSString); - _NS_PRIVATE_DEF_CLS(NSURL); - _NS_PRIVATE_DEF_CLS(NSValue); - - } // Class -} // Private -} // MTL - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace NS -{ -namespace Private -{ - namespace Protocol - { - - } // Protocol -} // Private -} // NS - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace NS -{ -namespace Private -{ - namespace Selector - { - - _NS_PRIVATE_DEF_SEL(addObject_, - "addObject:"); - _NS_PRIVATE_DEF_SEL(addObserverName_object_queue_block_, - "addObserverForName:object:queue:usingBlock:"); - _NS_PRIVATE_DEF_SEL(activeProcessorCount, - "activeProcessorCount"); - _NS_PRIVATE_DEF_SEL(allBundles, - "allBundles"); - _NS_PRIVATE_DEF_SEL(allFrameworks, - "allFrameworks"); - _NS_PRIVATE_DEF_SEL(allObjects, - "allObjects"); - _NS_PRIVATE_DEF_SEL(alloc, - "alloc"); - _NS_PRIVATE_DEF_SEL(appStoreReceiptURL, - "appStoreReceiptURL"); - _NS_PRIVATE_DEF_SEL(arguments, - "arguments"); - _NS_PRIVATE_DEF_SEL(array, - "array"); - _NS_PRIVATE_DEF_SEL(arrayWithObject_, - "arrayWithObject:"); - _NS_PRIVATE_DEF_SEL(arrayWithObjects_count_, - "arrayWithObjects:count:"); - _NS_PRIVATE_DEF_SEL(automaticTerminationSupportEnabled, - "automaticTerminationSupportEnabled"); - _NS_PRIVATE_DEF_SEL(autorelease, - "autorelease"); - _NS_PRIVATE_DEF_SEL(beginActivityWithOptions_reason_, - "beginActivityWithOptions:reason:"); - _NS_PRIVATE_DEF_SEL(boolValue, - "boolValue"); - _NS_PRIVATE_DEF_SEL(broadcast, - "broadcast"); - _NS_PRIVATE_DEF_SEL(builtInPlugInsPath, - "builtInPlugInsPath"); - _NS_PRIVATE_DEF_SEL(builtInPlugInsURL, - "builtInPlugInsURL"); - _NS_PRIVATE_DEF_SEL(bundleIdentifier, - "bundleIdentifier"); - _NS_PRIVATE_DEF_SEL(bundlePath, - "bundlePath"); - _NS_PRIVATE_DEF_SEL(bundleURL, - "bundleURL"); - _NS_PRIVATE_DEF_SEL(bundleWithPath_, - "bundleWithPath:"); - _NS_PRIVATE_DEF_SEL(bundleWithURL_, - "bundleWithURL:"); - _NS_PRIVATE_DEF_SEL(bytes, - "bytes"); - _NS_PRIVATE_DEF_SEL(caseInsensitiveCompare_, - "caseInsensitiveCompare:"); - _NS_PRIVATE_DEF_SEL(characterAtIndex_, - "characterAtIndex:"); - _NS_PRIVATE_DEF_SEL(charValue, - "charValue"); - _NS_PRIVATE_DEF_SEL(countByEnumeratingWithState_objects_count_, - "countByEnumeratingWithState:objects:count:"); - _NS_PRIVATE_DEF_SEL(cStringUsingEncoding_, - "cStringUsingEncoding:"); - _NS_PRIVATE_DEF_SEL(code, - "code"); - _NS_PRIVATE_DEF_SEL(compare_, - "compare:"); - _NS_PRIVATE_DEF_SEL(copy, - "copy"); - _NS_PRIVATE_DEF_SEL(count, - "count"); - _NS_PRIVATE_DEF_SEL(dateWithTimeIntervalSinceNow_, - "dateWithTimeIntervalSinceNow:"); - _NS_PRIVATE_DEF_SEL(defaultCenter, - "defaultCenter"); - _NS_PRIVATE_DEF_SEL(descriptionWithLocale_, - "descriptionWithLocale:"); - _NS_PRIVATE_DEF_SEL(disableAutomaticTermination_, - "disableAutomaticTermination:"); - _NS_PRIVATE_DEF_SEL(disableSuddenTermination, - "disableSuddenTermination"); - _NS_PRIVATE_DEF_SEL(debugDescription, - "debugDescription"); - _NS_PRIVATE_DEF_SEL(description, - "description"); - _NS_PRIVATE_DEF_SEL(dictionary, - "dictionary"); - _NS_PRIVATE_DEF_SEL(dictionaryWithObject_forKey_, - "dictionaryWithObject:forKey:"); - _NS_PRIVATE_DEF_SEL(dictionaryWithObjects_forKeys_count_, - "dictionaryWithObjects:forKeys:count:"); - _NS_PRIVATE_DEF_SEL(domain, - "domain"); - _NS_PRIVATE_DEF_SEL(doubleValue, - "doubleValue"); - _NS_PRIVATE_DEF_SEL(drain, - "drain"); - _NS_PRIVATE_DEF_SEL(enableAutomaticTermination_, - "enableAutomaticTermination:"); - _NS_PRIVATE_DEF_SEL(enableSuddenTermination, - "enableSuddenTermination"); - _NS_PRIVATE_DEF_SEL(endActivity_, - "endActivity:"); - _NS_PRIVATE_DEF_SEL(environment, - "environment"); - _NS_PRIVATE_DEF_SEL(errorWithDomain_code_userInfo_, - "errorWithDomain:code:userInfo:"); - _NS_PRIVATE_DEF_SEL(executablePath, - "executablePath"); - _NS_PRIVATE_DEF_SEL(executableURL, - "executableURL"); - _NS_PRIVATE_DEF_SEL(fileSystemRepresentation, - "fileSystemRepresentation"); - _NS_PRIVATE_DEF_SEL(fileURLWithPath_, - "fileURLWithPath:"); - _NS_PRIVATE_DEF_SEL(floatValue, - "floatValue"); - _NS_PRIVATE_DEF_SEL(fullUserName, - "fullUserName"); - _NS_PRIVATE_DEF_SEL(getValue_size_, - "getValue:size:"); - _NS_PRIVATE_DEF_SEL(globallyUniqueString, - "globallyUniqueString"); - _NS_PRIVATE_DEF_SEL(hash, - "hash"); - _NS_PRIVATE_DEF_SEL(hasPerformanceProfile_, - "hasPerformanceProfile:"); - _NS_PRIVATE_DEF_SEL(hostName, - "hostName"); - _NS_PRIVATE_DEF_SEL(infoDictionary, - "infoDictionary"); - _NS_PRIVATE_DEF_SEL(init, - "init"); - _NS_PRIVATE_DEF_SEL(initFileURLWithPath_, - "initFileURLWithPath:"); - _NS_PRIVATE_DEF_SEL(initWithBool_, - "initWithBool:"); - _NS_PRIVATE_DEF_SEL(initWithBytes_length_encoding_, - "initWithBytes:length:encoding:"); - _NS_PRIVATE_DEF_SEL(initWithBytes_objCType_, - "initWithBytes:objCType:"); - _NS_PRIVATE_DEF_SEL(initWithBytesNoCopy_length_encoding_freeWhenDone_, - "initWithBytesNoCopy:length:encoding:freeWhenDone:"); - _NS_PRIVATE_DEF_SEL(initWithChar_, - "initWithChar:"); - _NS_PRIVATE_DEF_SEL(initWithCoder_, - "initWithCoder:"); - _NS_PRIVATE_DEF_SEL(initWithCString_encoding_, - "initWithCString:encoding:"); - _NS_PRIVATE_DEF_SEL(initWithDomain_code_userInfo_, - "initWithDomain:code:userInfo:"); - _NS_PRIVATE_DEF_SEL(initWithDouble_, - "initWithDouble:"); - _NS_PRIVATE_DEF_SEL(initWithFloat_, - "initWithFloat:"); - _NS_PRIVATE_DEF_SEL(initWithInt_, - "initWithInt:"); - _NS_PRIVATE_DEF_SEL(initWithLong_, - "initWithLong:"); - _NS_PRIVATE_DEF_SEL(initWithLongLong_, - "initWithLongLong:"); - _NS_PRIVATE_DEF_SEL(initWithObjects_count_, - "initWithObjects:count:"); - _NS_PRIVATE_DEF_SEL(initWithObjects_forKeys_count_, - "initWithObjects:forKeys:count:"); - _NS_PRIVATE_DEF_SEL(initWithPath_, - "initWithPath:"); - _NS_PRIVATE_DEF_SEL(initWithShort_, - "initWithShort:"); - _NS_PRIVATE_DEF_SEL(initWithString_, - "initWithString:"); - _NS_PRIVATE_DEF_SEL(initWithUnsignedChar_, - "initWithUnsignedChar:"); - _NS_PRIVATE_DEF_SEL(initWithUnsignedInt_, - "initWithUnsignedInt:"); - _NS_PRIVATE_DEF_SEL(initWithUnsignedLong_, - "initWithUnsignedLong:"); - _NS_PRIVATE_DEF_SEL(initWithUnsignedLongLong_, - "initWithUnsignedLongLong:"); - _NS_PRIVATE_DEF_SEL(initWithUnsignedShort_, - "initWithUnsignedShort:"); - _NS_PRIVATE_DEF_SEL(initWithURL_, - "initWithURL:"); - _NS_PRIVATE_DEF_SEL(integerValue, - "integerValue"); - _NS_PRIVATE_DEF_SEL(intValue, - "intValue"); - _NS_PRIVATE_DEF_SEL(isDeviceCertified_, - "isDeviceCertifiedFor:"); - _NS_PRIVATE_DEF_SEL(isEqual_, - "isEqual:"); - _NS_PRIVATE_DEF_SEL(isEqualToNumber_, - "isEqualToNumber:"); - _NS_PRIVATE_DEF_SEL(isEqualToString_, - "isEqualToString:"); - _NS_PRIVATE_DEF_SEL(isEqualToValue_, - "isEqualToValue:"); - _NS_PRIVATE_DEF_SEL(isiOSAppOnMac, - "isiOSAppOnMac"); - _NS_PRIVATE_DEF_SEL(isLoaded, - "isLoaded"); - _NS_PRIVATE_DEF_SEL(isLowPowerModeEnabled, - "isLowPowerModeEnabled"); - _NS_PRIVATE_DEF_SEL(isMacCatalystApp, - "isMacCatalystApp"); - _NS_PRIVATE_DEF_SEL(isOperatingSystemAtLeastVersion_, - "isOperatingSystemAtLeastVersion:"); - _NS_PRIVATE_DEF_SEL(keyEnumerator, - "keyEnumerator"); - _NS_PRIVATE_DEF_SEL(length, - "length"); - _NS_PRIVATE_DEF_SEL(lengthOfBytesUsingEncoding_, - "lengthOfBytesUsingEncoding:"); - _NS_PRIVATE_DEF_SEL(load, - "load"); - _NS_PRIVATE_DEF_SEL(loadAndReturnError_, - "loadAndReturnError:"); - _NS_PRIVATE_DEF_SEL(localizedDescription, - "localizedDescription"); - _NS_PRIVATE_DEF_SEL(localizedFailureReason, - "localizedFailureReason"); - _NS_PRIVATE_DEF_SEL(localizedInfoDictionary, - "localizedInfoDictionary"); - _NS_PRIVATE_DEF_SEL(localizedRecoveryOptions, - "localizedRecoveryOptions"); - _NS_PRIVATE_DEF_SEL(localizedRecoverySuggestion, - "localizedRecoverySuggestion"); - _NS_PRIVATE_DEF_SEL(localizedStringForKey_value_table_, - "localizedStringForKey:value:table:"); - _NS_PRIVATE_DEF_SEL(lock, - "lock"); - _NS_PRIVATE_DEF_SEL(longValue, - "longValue"); - _NS_PRIVATE_DEF_SEL(longLongValue, - "longLongValue"); - _NS_PRIVATE_DEF_SEL(mainBundle, - "mainBundle"); - _NS_PRIVATE_DEF_SEL(maximumLengthOfBytesUsingEncoding_, - "maximumLengthOfBytesUsingEncoding:"); - _NS_PRIVATE_DEF_SEL(methodSignatureForSelector_, - "methodSignatureForSelector:"); - _NS_PRIVATE_DEF_SEL(mutableBytes, - "mutableBytes"); - _NS_PRIVATE_DEF_SEL(name, - "name"); - _NS_PRIVATE_DEF_SEL(nextObject, - "nextObject"); - _NS_PRIVATE_DEF_SEL(numberWithBool_, - "numberWithBool:"); - _NS_PRIVATE_DEF_SEL(numberWithChar_, - "numberWithChar:"); - _NS_PRIVATE_DEF_SEL(numberWithDouble_, - "numberWithDouble:"); - _NS_PRIVATE_DEF_SEL(numberWithFloat_, - "numberWithFloat:"); - _NS_PRIVATE_DEF_SEL(numberWithInt_, - "numberWithInt:"); - _NS_PRIVATE_DEF_SEL(numberWithLong_, - "numberWithLong:"); - _NS_PRIVATE_DEF_SEL(numberWithLongLong_, - "numberWithLongLong:"); - _NS_PRIVATE_DEF_SEL(numberWithShort_, - "numberWithShort:"); - _NS_PRIVATE_DEF_SEL(numberWithUnsignedChar_, - "numberWithUnsignedChar:"); - _NS_PRIVATE_DEF_SEL(numberWithUnsignedInt_, - "numberWithUnsignedInt:"); - _NS_PRIVATE_DEF_SEL(numberWithUnsignedLong_, - "numberWithUnsignedLong:"); - _NS_PRIVATE_DEF_SEL(numberWithUnsignedLongLong_, - "numberWithUnsignedLongLong:"); - _NS_PRIVATE_DEF_SEL(numberWithUnsignedShort_, - "numberWithUnsignedShort:"); - _NS_PRIVATE_DEF_SEL(objCType, - "objCType"); - _NS_PRIVATE_DEF_SEL(object, - "object"); - _NS_PRIVATE_DEF_SEL(objectAtIndex_, - "objectAtIndex:"); - _NS_PRIVATE_DEF_SEL(objectEnumerator, - "objectEnumerator"); - _NS_PRIVATE_DEF_SEL(objectForInfoDictionaryKey_, - "objectForInfoDictionaryKey:"); - _NS_PRIVATE_DEF_SEL(objectForKey_, - "objectForKey:"); - _NS_PRIVATE_DEF_SEL(operatingSystem, - "operatingSystem"); - _NS_PRIVATE_DEF_SEL(operatingSystemVersion, - "operatingSystemVersion"); - _NS_PRIVATE_DEF_SEL(operatingSystemVersionString, - "operatingSystemVersionString"); - _NS_PRIVATE_DEF_SEL(pathForAuxiliaryExecutable_, - "pathForAuxiliaryExecutable:"); - _NS_PRIVATE_DEF_SEL(performActivityWithOptions_reason_usingBlock_, - "performActivityWithOptions:reason:usingBlock:"); - _NS_PRIVATE_DEF_SEL(performExpiringActivityWithReason_usingBlock_, - "performExpiringActivityWithReason:usingBlock:"); - _NS_PRIVATE_DEF_SEL(physicalMemory, - "physicalMemory"); - _NS_PRIVATE_DEF_SEL(pointerValue, - "pointerValue"); - _NS_PRIVATE_DEF_SEL(preflightAndReturnError_, - "preflightAndReturnError:"); - _NS_PRIVATE_DEF_SEL(privateFrameworksPath, - "privateFrameworksPath"); - _NS_PRIVATE_DEF_SEL(privateFrameworksURL, - "privateFrameworksURL"); - _NS_PRIVATE_DEF_SEL(processIdentifier, - "processIdentifier"); - _NS_PRIVATE_DEF_SEL(processInfo, - "processInfo"); - _NS_PRIVATE_DEF_SEL(processName, - "processName"); - _NS_PRIVATE_DEF_SEL(processorCount, - "processorCount"); - _NS_PRIVATE_DEF_SEL(rangeOfString_options_, - "rangeOfString:options:"); - _NS_PRIVATE_DEF_SEL(release, - "release"); - _NS_PRIVATE_DEF_SEL(removeObserver_, - "removeObserver:"); - _NS_PRIVATE_DEF_SEL(resourcePath, - "resourcePath"); - _NS_PRIVATE_DEF_SEL(resourceURL, - "resourceURL"); - _NS_PRIVATE_DEF_SEL(respondsToSelector_, - "respondsToSelector:"); - _NS_PRIVATE_DEF_SEL(retain, - "retain"); - _NS_PRIVATE_DEF_SEL(retainCount, - "retainCount"); - _NS_PRIVATE_DEF_SEL(setAutomaticTerminationSupportEnabled_, - "setAutomaticTerminationSupportEnabled:"); - _NS_PRIVATE_DEF_SEL(setProcessName_, - "setProcessName:"); - _NS_PRIVATE_DEF_SEL(sharedFrameworksPath, - "sharedFrameworksPath"); - _NS_PRIVATE_DEF_SEL(sharedFrameworksURL, - "sharedFrameworksURL"); - _NS_PRIVATE_DEF_SEL(sharedSupportPath, - "sharedSupportPath"); - _NS_PRIVATE_DEF_SEL(sharedSupportURL, - "sharedSupportURL"); - _NS_PRIVATE_DEF_SEL(shortValue, - "shortValue"); - _NS_PRIVATE_DEF_SEL(showPools, - "showPools"); - _NS_PRIVATE_DEF_SEL(signal, - "signal"); - _NS_PRIVATE_DEF_SEL(string, - "string"); - _NS_PRIVATE_DEF_SEL(stringValue, - "stringValue"); - _NS_PRIVATE_DEF_SEL(stringWithString_, - "stringWithString:"); - _NS_PRIVATE_DEF_SEL(stringWithCString_encoding_, - "stringWithCString:encoding:"); - _NS_PRIVATE_DEF_SEL(stringByAppendingString_, - "stringByAppendingString:"); - _NS_PRIVATE_DEF_SEL(systemUptime, - "systemUptime"); - _NS_PRIVATE_DEF_SEL(thermalState, - "thermalState"); - _NS_PRIVATE_DEF_SEL(unload, - "unload"); - _NS_PRIVATE_DEF_SEL(unlock, - "unlock"); - _NS_PRIVATE_DEF_SEL(unsignedCharValue, - "unsignedCharValue"); - _NS_PRIVATE_DEF_SEL(unsignedIntegerValue, - "unsignedIntegerValue"); - _NS_PRIVATE_DEF_SEL(unsignedIntValue, - "unsignedIntValue"); - _NS_PRIVATE_DEF_SEL(unsignedLongValue, - "unsignedLongValue"); - _NS_PRIVATE_DEF_SEL(unsignedLongLongValue, - "unsignedLongLongValue"); - _NS_PRIVATE_DEF_SEL(unsignedShortValue, - "unsignedShortValue"); - _NS_PRIVATE_DEF_SEL(URLForAuxiliaryExecutable_, - "URLForAuxiliaryExecutable:"); - _NS_PRIVATE_DEF_SEL(userInfo, - "userInfo"); - _NS_PRIVATE_DEF_SEL(userName, - "userName"); - _NS_PRIVATE_DEF_SEL(UTF8String, - "UTF8String"); - _NS_PRIVATE_DEF_SEL(valueWithBytes_objCType_, - "valueWithBytes:objCType:"); - _NS_PRIVATE_DEF_SEL(valueWithPointer_, - "valueWithPointer:"); - _NS_PRIVATE_DEF_SEL(wait, - "wait"); - _NS_PRIVATE_DEF_SEL(waitUntilDate_, - "waitUntilDate:"); - } // Class -} // Private -} // MTL - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/Foundation/NSProcessInfo.hpp b/thirdparty/metal-cpp/Foundation/NSProcessInfo.hpp index 09c212d54098..50a7d06a1f12 100644 --- a/thirdparty/metal-cpp/Foundation/NSProcessInfo.hpp +++ b/thirdparty/metal-cpp/Foundation/NSProcessInfo.hpp @@ -1,386 +1,295 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSProcessInfo.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "NSDefines.hpp" -#include "NSNotification.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" -#include "NSPrivate.hpp" #include "NSTypes.hpp" +#include "NSRange.hpp" -#include - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS { + class Array; + class Dictionary; + class Object; + class String; +} namespace NS { -_NS_CONST(NotificationName, ProcessInfoThermalStateDidChangeNotification); -_NS_CONST(NotificationName, ProcessInfoPowerStateDidChangeNotification); -_NS_CONST(NotificationName, ProcessInfoPerformanceProfileDidChangeNotification); -_NS_ENUM(NS::Integer, ProcessInfoThermalState) { - ProcessInfoThermalStateNominal = 0, - ProcessInfoThermalStateFair = 1, - ProcessInfoThermalStateSerious = 2, - ProcessInfoThermalStateCritical = 3 -}; +extern NS::NotificationName const ProcessInfoThermalStateDidChangeNotification __asm__("_NSProcessInfoThermalStateDidChangeNotification"); +extern NS::NotificationName const ProcessInfoPowerStateDidChangeNotification __asm__("_NSProcessInfoPowerStateDidChangeNotification"); +inline constexpr unsigned int WindowsNTOperatingSystem = 1; +inline constexpr unsigned int Windows95OperatingSystem = 2; +inline constexpr unsigned int SolarisOperatingSystem = 3; +inline constexpr unsigned int HPUXOperatingSystem = 4; +inline constexpr unsigned int MACHOperatingSystem = 5; +inline constexpr unsigned int SunOSOperatingSystem = 6; +inline constexpr unsigned int OSF1OperatingSystem = 7; -_NS_OPTIONS(std::uint64_t, ActivityOptions) { +_NS_OPTIONS(uint64_t, ActivityOptions) { ActivityIdleDisplaySleepDisabled = (1ULL << 40), ActivityIdleSystemSleepDisabled = (1ULL << 20), ActivitySuddenTerminationDisabled = (1ULL << 14), ActivityAutomaticTerminationDisabled = (1ULL << 15), + ActivityAnimationTrackingEnabled = (1ULL << 45), + ActivityTrackingEnabled = (1ULL << 46), ActivityUserInitiated = (0x00FFFFFFULL | ActivityIdleSystemSleepDisabled), ActivityUserInitiatedAllowingIdleSystemSleep = (ActivityUserInitiated & ~ActivityIdleSystemSleepDisabled), ActivityBackground = 0x000000FFULL, ActivityLatencyCritical = 0xFF00000000ULL, + ActivityUserInteractive = (ActivityUserInitiated | ActivityLatencyCritical), }; -typedef NS::Integer DeviceCertification; -_NS_CONST(DeviceCertification, DeviceCertificationiPhonePerformanceGaming); +_NS_ENUM(NS::Integer, ProcessInfoThermalState) { + ProcessInfoThermalStateNominal = 0, + ProcessInfoThermalStateFair = 1, + ProcessInfoThermalStateSerious = 2, + ProcessInfoThermalStateCritical = 3, +}; -typedef NS::Integer ProcessPerformanceProfile; -_NS_CONST(ProcessPerformanceProfile, ProcessPerformanceProfileDefault); -_NS_CONST(ProcessPerformanceProfile, ProcessPerformanceProfileSustained); -class ProcessInfo : public Referencing +class ProcessInfo : public NS::Referencing { public: - static ProcessInfo* processInfo(); - - class Array* arguments() const; - class Dictionary* environment() const; - class String* hostName() const; - class String* processName() const; - void setProcessName(const String* pString); - int processIdentifier() const; - class String* globallyUniqueString() const; - - class String* userName() const; - class String* fullUserName() const; - - UInteger operatingSystem() const; - OperatingSystemVersion operatingSystemVersion() const; - class String* operatingSystemVersionString() const; - bool isOperatingSystemAtLeastVersion(OperatingSystemVersion version) const; - - UInteger processorCount() const; - UInteger activeProcessorCount() const; - unsigned long long physicalMemory() const; - TimeInterval systemUptime() const; - - void disableSuddenTermination(); - void enableSuddenTermination(); - - void disableAutomaticTermination(const class String* pReason); - void enableAutomaticTermination(const class String* pReason); - bool automaticTerminationSupportEnabled() const; - void setAutomaticTerminationSupportEnabled(bool enabled); - - class Object* beginActivity(ActivityOptions options, const class String* pReason); - void endActivity(class Object* pActivity); - void performActivity(ActivityOptions options, const class String* pReason, void (^block)(void)); - void performActivity(ActivityOptions options, const class String* pReason, const std::function& func); - void performExpiringActivity(const class String* pReason, void (^block)(bool expired)); - void performExpiringActivity(const class String* pReason, const std::function& func); - - ProcessInfoThermalState thermalState() const; - bool isLowPowerModeEnabled() const; - - bool isiOSAppOnMac() const; - bool isMacCatalystApp() const; - - bool isDeviceCertified(DeviceCertification performanceTier) const; - bool hasPerformanceProfile(ProcessPerformanceProfile performanceProfile) const; + static ProcessInfo* alloc(); + ProcessInfo* init() const; + + static NS::ProcessInfo* processInfo(); + + NS::UInteger activeProcessorCount() const; + NS::Array* arguments() const; + bool automaticTerminationSupportEnabled() const; + NS::Object* beginActivity(NS::ActivityOptions options, NS::String* reason); + void disableAutomaticTermination(NS::String* reason); + void disableSuddenTermination(); + void enableAutomaticTermination(NS::String* reason); + void enableSuddenTermination(); + void endActivity(NS::Object* activity); + NS::Dictionary* environment() const; + NS::String* fullUserName() const; + NS::String* globallyUniqueString() const; + NS::String* hostName() const; + bool isLowPowerModeEnabled(); + bool isMacCatalystApp(); + bool isOperatingSystem(NS::OperatingSystemVersion version); + bool isiOSAppOnMac(); + bool lowPowerModeEnabled() const; + bool macCatalystApp() const; + NS::UInteger operatingSystem(); + NS::OperatingSystemVersion operatingSystemVersion() const; + NS::String* operatingSystemVersionString() const; + void performActivity(NS::ActivityOptions options, NS::String* reason, NS::PerformActivityBlock block); + void performActivity(NS::ActivityOptions options, NS::String* reason, const NS::PerformActivityFunction& block); + void performExpiringActivity(NS::String* reason, NS::PerformExpiringActivityBlock block); + void performExpiringActivity(NS::String* reason, const NS::PerformExpiringActivityFunction& block); + unsigned long long physicalMemory() const; + int processIdentifier() const; + NS::String* processName() const; + NS::UInteger processorCount() const; + void setAutomaticTerminationSupportEnabled(bool automaticTerminationSupportEnabled); + void setProcessName(NS::String* processName); + NS::TimeInterval systemUptime() const; + NS::ProcessInfoThermalState thermalState() const; + NS::String* userName() const; }; -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -_NS_PRIVATE_DEF_CONST(NS::NotificationName, ProcessInfoThermalStateDidChangeNotification); -_NS_PRIVATE_DEF_CONST(NS::NotificationName, ProcessInfoPowerStateDidChangeNotification); +} // namespace NS -// The linker searches for these symbols in the Metal framework, be sure to link it in as well: -_NS_PRIVATE_DEF_CONST(NS::NotificationName, ProcessInfoPerformanceProfileDidChangeNotification); -_NS_PRIVATE_DEF_CONST(NS::DeviceCertification, DeviceCertificationiPhonePerformanceGaming); -_NS_PRIVATE_DEF_CONST(NS::ProcessPerformanceProfile, ProcessPerformanceProfileDefault); -_NS_PRIVATE_DEF_CONST(NS::ProcessPerformanceProfile, ProcessPerformanceProfileSustained); +// --- Class symbols + inline implementations --- -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +extern "C" void *OBJC_CLASS_$_NSProcessInfo; -_NS_INLINE NS::ProcessInfo* NS::ProcessInfo::processInfo() +_NS_INLINE NS::ProcessInfo* NS::ProcessInfo::alloc() { - return Object::sendMessage(_NS_PRIVATE_CLS(NSProcessInfo), _NS_PRIVATE_SEL(processInfo)); + return _NS_msg_NS__ProcessInfop_alloc((const void*)&OBJC_CLASS_$_NSProcessInfo, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Array* NS::ProcessInfo::arguments() const +_NS_INLINE NS::ProcessInfo* NS::ProcessInfo::init() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(arguments)); + return _NS_msg_NS__ProcessInfop_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_NS_INLINE NS::ProcessInfo* NS::ProcessInfo::processInfo() +{ + return _NS_msg_NS__ProcessInfop_processInfo((const void*)&OBJC_CLASS_$_NSProcessInfo, nullptr); +} _NS_INLINE NS::Dictionary* NS::ProcessInfo::environment() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(environment)); + return _NS_msg_NS__Dictionaryp_environment((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_NS_INLINE NS::Array* NS::ProcessInfo::arguments() const +{ + return _NS_msg_NS__Arrayp_arguments((const void*)this, nullptr); +} _NS_INLINE NS::String* NS::ProcessInfo::hostName() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(hostName)); + return _NS_msg_NS__Stringp_hostName((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::String* NS::ProcessInfo::processName() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(processName)); + return _NS_msg_NS__Stringp_processName((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::setProcessName(const String* pString) +_NS_INLINE void NS::ProcessInfo::setProcessName(NS::String* processName) { - Object::sendMessage(this, _NS_PRIVATE_SEL(setProcessName_), pString); + _NS_msg_v_setProcessName__NS__Stringp((const void*)this, nullptr, processName); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE int NS::ProcessInfo::processIdentifier() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(processIdentifier)); + return _NS_msg_int_processIdentifier((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _NS_INLINE NS::String* NS::ProcessInfo::globallyUniqueString() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(globallyUniqueString)); + return _NS_msg_NS__Stringp_globallyUniqueString((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::ProcessInfo::userName() const +_NS_INLINE NS::String* NS::ProcessInfo::operatingSystemVersionString() const { - return Object::sendMessageSafe(this, _NS_PRIVATE_SEL(userName)); + return _NS_msg_NS__Stringp_operatingSystemVersionString((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::ProcessInfo::fullUserName() const +_NS_INLINE NS::OperatingSystemVersion NS::ProcessInfo::operatingSystemVersion() const { - return Object::sendMessageSafe(this, _NS_PRIVATE_SEL(fullUserName)); + return _NS_msg_NS__OperatingSystemVersion_operatingSystemVersion((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::UInteger NS::ProcessInfo::operatingSystem() const +_NS_INLINE NS::UInteger NS::ProcessInfo::processorCount() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(operatingSystem)); + return _NS_msg_NS__UInteger_processorCount((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::OperatingSystemVersion NS::ProcessInfo::operatingSystemVersion() const +_NS_INLINE NS::UInteger NS::ProcessInfo::activeProcessorCount() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(operatingSystemVersion)); + return _NS_msg_NS__UInteger_activeProcessorCount((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::ProcessInfo::operatingSystemVersionString() const +_NS_INLINE unsigned long long NS::ProcessInfo::physicalMemory() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(operatingSystemVersionString)); + return _NS_msg_unsignedlonglong_physicalMemory((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::ProcessInfo::isOperatingSystemAtLeastVersion(OperatingSystemVersion version) const +_NS_INLINE NS::TimeInterval NS::ProcessInfo::systemUptime() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(isOperatingSystemAtLeastVersion_), version); + return _NS_msg_double_systemUptime((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::UInteger NS::ProcessInfo::processorCount() const +_NS_INLINE bool NS::ProcessInfo::automaticTerminationSupportEnabled() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(processorCount)); + return _NS_msg_bool_automaticTerminationSupportEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::UInteger NS::ProcessInfo::activeProcessorCount() const +_NS_INLINE void NS::ProcessInfo::setAutomaticTerminationSupportEnabled(bool automaticTerminationSupportEnabled) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(activeProcessorCount)); + _NS_msg_v_setAutomaticTerminationSupportEnabled__bool((const void*)this, nullptr, automaticTerminationSupportEnabled); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE unsigned long long NS::ProcessInfo::physicalMemory() const +_NS_INLINE NS::String* NS::ProcessInfo::userName() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(physicalMemory)); + return _NS_msg_NS__Stringp_userName((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::TimeInterval NS::ProcessInfo::systemUptime() const +_NS_INLINE NS::String* NS::ProcessInfo::fullUserName() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(systemUptime)); + return _NS_msg_NS__Stringp_fullUserName((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::disableSuddenTermination() +_NS_INLINE NS::ProcessInfoThermalState NS::ProcessInfo::thermalState() const { - Object::sendMessageSafe(this, _NS_PRIVATE_SEL(disableSuddenTermination)); + return _NS_msg_NS__ProcessInfoThermalState_thermalState((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::enableSuddenTermination() +_NS_INLINE bool NS::ProcessInfo::lowPowerModeEnabled() const { - Object::sendMessageSafe(this, _NS_PRIVATE_SEL(enableSuddenTermination)); + return _NS_msg_bool_lowPowerModeEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::disableAutomaticTermination(const String* pReason) +_NS_INLINE bool NS::ProcessInfo::macCatalystApp() const { - Object::sendMessageSafe(this, _NS_PRIVATE_SEL(disableAutomaticTermination_), pReason); + return _NS_msg_bool_macCatalystApp((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::enableAutomaticTermination(const String* pReason) +_NS_INLINE NS::UInteger NS::ProcessInfo::operatingSystem() { - Object::sendMessageSafe(this, _NS_PRIVATE_SEL(enableAutomaticTermination_), pReason); + return _NS_msg_NS__UInteger_operatingSystem((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::ProcessInfo::automaticTerminationSupportEnabled() const +_NS_INLINE bool NS::ProcessInfo::isOperatingSystem(NS::OperatingSystemVersion version) { - return Object::sendMessageSafe(this, _NS_PRIVATE_SEL(automaticTerminationSupportEnabled)); + return _NS_msg_bool_isOperatingSystemAtLeastVersion__NS__OperatingSystemVersion((const void*)this, nullptr, version); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::setAutomaticTerminationSupportEnabled(bool enabled) +_NS_INLINE void NS::ProcessInfo::disableSuddenTermination() { - Object::sendMessageSafe(this, _NS_PRIVATE_SEL(setAutomaticTerminationSupportEnabled_), enabled); + _NS_msg_v_disableSuddenTermination((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Object* NS::ProcessInfo::beginActivity(ActivityOptions options, const String* pReason) +_NS_INLINE void NS::ProcessInfo::enableSuddenTermination() { - return Object::sendMessage(this, _NS_PRIVATE_SEL(beginActivityWithOptions_reason_), options, pReason); + _NS_msg_v_enableSuddenTermination((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::endActivity(Object* pActivity) +_NS_INLINE void NS::ProcessInfo::disableAutomaticTermination(NS::String* reason) { - Object::sendMessage(this, _NS_PRIVATE_SEL(endActivity_), pActivity); + _NS_msg_v_disableAutomaticTermination__NS__Stringp((const void*)this, nullptr, reason); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::performActivity(ActivityOptions options, const String* pReason, void (^block)(void)) +_NS_INLINE void NS::ProcessInfo::enableAutomaticTermination(NS::String* reason) { - Object::sendMessage(this, _NS_PRIVATE_SEL(performActivityWithOptions_reason_usingBlock_), options, pReason, block); + _NS_msg_v_enableAutomaticTermination__NS__Stringp((const void*)this, nullptr, reason); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::performActivity(ActivityOptions options, const String* pReason, const std::function& function) +_NS_INLINE NS::Object* NS::ProcessInfo::beginActivity(NS::ActivityOptions options, NS::String* reason) { - __block std::function blockFunction = function; - - performActivity(options, pReason, ^() { blockFunction(); }); + return _NS_msg_NS__Objectp_beginActivityWithOptions_reason__NS__ActivityOptions_NS__Stringp((const void*)this, nullptr, options, reason); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::performExpiringActivity(const String* pReason, void (^block)(bool expired)) +_NS_INLINE void NS::ProcessInfo::endActivity(NS::Object* activity) { - Object::sendMessageSafe(this, _NS_PRIVATE_SEL(performExpiringActivityWithReason_usingBlock_), pReason, block); + _NS_msg_v_endActivity__NS__Objectp((const void*)this, nullptr, activity); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE void NS::ProcessInfo::performExpiringActivity(const String* pReason, const std::function& function) +_NS_INLINE void NS::ProcessInfo::performActivity(NS::ActivityOptions options, NS::String* reason, NS::PerformActivityBlock block) { - __block std::function blockFunction = function; - - performExpiringActivity(pReason, ^(bool expired) { blockFunction(expired); }); + _NS_msg_v_performActivityWithOptions_reason_usingBlock__NS__ActivityOptions_NS__Stringp_NS__PerformActivityBlock((const void*)this, nullptr, options, reason, block); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::ProcessInfoThermalState NS::ProcessInfo::thermalState() const +_NS_INLINE void NS::ProcessInfo::performActivity(NS::ActivityOptions options, NS::String* reason, const NS::PerformActivityFunction& block) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(thermalState)); + __block NS::PerformActivityFunction blockFunction = block; + performActivity(options, reason, ^() { blockFunction(); }); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::ProcessInfo::isLowPowerModeEnabled() const +_NS_INLINE void NS::ProcessInfo::performExpiringActivity(NS::String* reason, NS::PerformExpiringActivityBlock block) { - return Object::sendMessageSafe(this, _NS_PRIVATE_SEL(isLowPowerModeEnabled)); + _NS_msg_v_performExpiringActivityWithReason_usingBlock__NS__Stringp_NS__PerformExpiringActivityBlock((const void*)this, nullptr, reason, block); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::ProcessInfo::isiOSAppOnMac() const +_NS_INLINE void NS::ProcessInfo::performExpiringActivity(NS::String* reason, const NS::PerformExpiringActivityFunction& block) { - return Object::sendMessageSafe(this, _NS_PRIVATE_SEL(isiOSAppOnMac)); + __block NS::PerformExpiringActivityFunction blockFunction = block; + performExpiringActivity(reason, ^(bool x0) { blockFunction(x0); }); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::ProcessInfo::isMacCatalystApp() const +_NS_INLINE bool NS::ProcessInfo::isLowPowerModeEnabled() { - return Object::sendMessageSafe(this, _NS_PRIVATE_SEL(isMacCatalystApp)); + return _NS_msg_bool_isLowPowerModeEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::ProcessInfo::isDeviceCertified(DeviceCertification performanceTier) const +_NS_INLINE bool NS::ProcessInfo::isMacCatalystApp() { - return Object::sendMessageSafe(this, _NS_PRIVATE_SEL(isDeviceCertified_), performanceTier); + return _NS_msg_bool_isMacCatalystApp((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::ProcessInfo::hasPerformanceProfile(ProcessPerformanceProfile performanceProfile) const +_NS_INLINE bool NS::ProcessInfo::isiOSAppOnMac() { - return Object::sendMessageSafe(this, _NS_PRIVATE_SEL(hasPerformanceProfile_), performanceProfile); + return _NS_msg_bool_isiOSAppOnMac((const void*)this, nullptr); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/Foundation/NSSet.hpp b/thirdparty/metal-cpp/Foundation/NSSet.hpp index 382b6714e76e..497b0a2d3396 100644 --- a/thirdparty/metal-cpp/Foundation/NSSet.hpp +++ b/thirdparty/metal-cpp/Foundation/NSSet.hpp @@ -1,87 +1,68 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSSet.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - +#include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" +#include "NSTypes.hpp" +#include "NSRange.hpp" #include "NSEnumerator.hpp" -/*****Immutable Set*******/ +namespace NS { + class Object; +} namespace NS { - class Set : public NS::Copying - { - public: - UInteger count() const; - Enumerator* objectEnumerator() const; - static Set* alloc(); +class Set : public NS::SecureCoding +{ +public: + static Set* alloc(); + Set* init() const; - Set* init(); - Set* init(const Object* const* pObjects, UInteger count); - Set* init(const class Coder* pCoder); + NS::UInteger count() const; + NS::Set* init(const NS::Object* const * objects, NS::UInteger cnt); + NS::Set* init(void* coder); + template + Enumerator<_Object>* objectEnumerator(); - }; -} +}; -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +} // namespace NS -_NS_INLINE NS::UInteger NS::Set::count() const -{ - return NS::Object::sendMessage(this, _NS_PRIVATE_SEL(count)); -} +// --- Class symbols + inline implementations --- -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +extern "C" void *OBJC_CLASS_$_NSSet; -_NS_INLINE NS::Enumerator* NS::Set::objectEnumerator() const +_NS_INLINE NS::Set* NS::Set::alloc() { - return NS::Object::sendMessage*>(this, _NS_PRIVATE_SEL(objectEnumerator)); + return _NS_msg_NS__Setp_alloc((const void*)&OBJC_CLASS_$_NSSet, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Set* NS::Set::alloc() +_NS_INLINE NS::Set* NS::Set::init() const { - return NS::Object::alloc(_NS_PRIVATE_CLS(NSSet)); + return _NS_msg_NS__Setp_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Set* NS::Set::init() +_NS_INLINE NS::UInteger NS::Set::count() const { - return NS::Object::init(); + return _NS_msg_NS__UInteger_count((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Set* NS::Set::init(const Object* const* pObjects, NS::UInteger count) +template +_NS_INLINE NS::Enumerator<_Object>* NS::Set::objectEnumerator() { - return NS::Object::sendMessage(this, _NS_PRIVATE_SEL(initWithObjects_count_), pObjects, count); + return reinterpret_cast*>(_NS_msg_NS__EnumeratorLNS__ObjectGp_objectEnumerator((const void*)this, nullptr)); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_NS_INLINE NS::Set* NS::Set::init(const NS::Object* const * objects, NS::UInteger cnt) +{ + return _NS_msg_NS__Setp_initWithObjects_count__constNS__Objectpconstp_NS__UInteger((const void*)this, nullptr, objects, cnt); +} -_NS_INLINE NS::Set* NS::Set::init(const class Coder* pCoder) +_NS_INLINE NS::Set* NS::Set::init(void* coder) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithCoder_), pCoder); + return _NS_msg_NS__Setp_initWithCoder__voidp((const void*)this, nullptr, coder); } diff --git a/thirdparty/metal-cpp/Foundation/NSString.hpp b/thirdparty/metal-cpp/Foundation/NSString.hpp index 654584e29c2c..ee5f6c003daa 100644 --- a/thirdparty/metal-cpp/Foundation/NSString.hpp +++ b/thirdparty/metal-cpp/Foundation/NSString.hpp @@ -1,38 +1,55 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSString.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "NSDefines.hpp" -#include "NSObjCRuntime.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" -#include "NSPrivate.hpp" -#include "NSRange.hpp" #include "NSTypes.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +#include "NSRange.hpp" namespace NS { + +using StringTransform = NS::String*; +using StringEncodingDetectionOptionsKey = NS::String*; +extern StringTransform const StringTransformLatinToKatakana __asm__("_NSStringTransformLatinToKatakana"); +extern StringTransform const StringTransformLatinToHiragana __asm__("_NSStringTransformLatinToHiragana"); +extern StringTransform const StringTransformLatinToHangul __asm__("_NSStringTransformLatinToHangul"); +extern StringTransform const StringTransformLatinToArabic __asm__("_NSStringTransformLatinToArabic"); +extern StringTransform const StringTransformLatinToHebrew __asm__("_NSStringTransformLatinToHebrew"); +extern StringTransform const StringTransformLatinToThai __asm__("_NSStringTransformLatinToThai"); +extern StringTransform const StringTransformLatinToCyrillic __asm__("_NSStringTransformLatinToCyrillic"); +extern StringTransform const StringTransformLatinToGreek __asm__("_NSStringTransformLatinToGreek"); +extern StringTransform const StringTransformToLatin __asm__("_NSStringTransformToLatin"); +extern StringTransform const StringTransformMandarinToLatin __asm__("_NSStringTransformMandarinToLatin"); +extern StringTransform const StringTransformHiraganaToKatakana __asm__("_NSStringTransformHiraganaToKatakana"); +extern StringTransform const StringTransformFullwidthToHalfwidth __asm__("_NSStringTransformFullwidthToHalfwidth"); +extern StringTransform const StringTransformToXMLHex __asm__("_NSStringTransformToXMLHex"); +extern StringTransform const StringTransformToUnicodeName __asm__("_NSStringTransformToUnicodeName"); +extern StringTransform const StringTransformStripCombiningMarks __asm__("_NSStringTransformStripCombiningMarks"); +extern StringTransform const StringTransformStripDiacritics __asm__("_NSStringTransformStripDiacritics"); +extern StringEncodingDetectionOptionsKey const StringEncodingDetectionSuggestedEncodingsKey __asm__("_NSStringEncodingDetectionSuggestedEncodingsKey"); +extern StringEncodingDetectionOptionsKey const StringEncodingDetectionDisallowedEncodingsKey __asm__("_NSStringEncodingDetectionDisallowedEncodingsKey"); +extern StringEncodingDetectionOptionsKey const StringEncodingDetectionUseOnlySuggestedEncodingsKey __asm__("_NSStringEncodingDetectionUseOnlySuggestedEncodingsKey"); +extern StringEncodingDetectionOptionsKey const StringEncodingDetectionAllowLossyKey __asm__("_NSStringEncodingDetectionAllowLossyKey"); +extern StringEncodingDetectionOptionsKey const StringEncodingDetectionFromWindowsKey __asm__("_NSStringEncodingDetectionFromWindowsKey"); +extern StringEncodingDetectionOptionsKey const StringEncodingDetectionLossySubstitutionKey __asm__("_NSStringEncodingDetectionLossySubstitutionKey"); +extern StringEncodingDetectionOptionsKey const StringEncodingDetectionLikelyLanguageKey __asm__("_NSStringEncodingDetectionLikelyLanguageKey"); +extern NS::String* const CharacterConversionException __asm__("_NSCharacterConversionException"); +extern NS::String* const ParseErrorException __asm__("_NSParseErrorException"); +_NS_OPTIONS(NS::UInteger, StringCompareOptions) { + CaseInsensitiveSearch = 1, + LiteralSearch = 2, + BackwardsSearch = 4, + AnchoredSearch = 8, + NumericSearch = 64, + DiacriticInsensitiveSearch = 128, + WidthInsensitiveSearch = 256, + ForcedOrderingSearch = 512, + RegularExpressionSearch = 1024, +}; + _NS_ENUM(NS::UInteger, StringEncoding) { ASCIIStringEncoding = 1, NEXTSTEPStringEncoding = 2, @@ -51,60 +68,58 @@ _NS_ENUM(NS::UInteger, StringEncoding) { WindowsCP1250StringEncoding = 15, ISO2022JPStringEncoding = 21, MacOSRomanStringEncoding = 30, - UTF16StringEncoding = UnicodeStringEncoding, - UTF16BigEndianStringEncoding = 0x90000100, UTF16LittleEndianStringEncoding = 0x94000100, - UTF32StringEncoding = 0x8c000100, UTF32BigEndianStringEncoding = 0x98000100, - UTF32LittleEndianStringEncoding = 0x9c000100 + UTF32LittleEndianStringEncoding = 0x9c000100, }; -_NS_OPTIONS(NS::UInteger, StringCompareOptions) { - CaseInsensitiveSearch = 1, - LiteralSearch = 2, - BackwardsSearch = 4, - AnchoredSearch = 8, - NumericSearch = 64, - DiacriticInsensitiveSearch = 128, - WidthInsensitiveSearch = 256, - ForcedOrderingSearch = 512, - RegularExpressionSearch = 1024 +_NS_OPTIONS(NS::UInteger, StringEncodingConversionOptions) { + StringEncodingConversionAllowLossy = 1, + StringEncodingConversionExternalRepresentation = 2, +}; + +_NS_OPTIONS(NS::UInteger, StringEnumerationOptions) { + StringEnumerationByLines = 0, + StringEnumerationByParagraphs = 1, + StringEnumerationByComposedCharacterSequences = 2, + StringEnumerationByWords = 3, + StringEnumerationBySentences = 4, + StringEnumerationByCaretPositions = 5, + StringEnumerationByDeletionClusters = 6, + StringEnumerationReverse = 1UL << 8, + StringEnumerationSubstringNotRequired = 1UL << 9, + StringEnumerationLocalized = 1UL << 10, }; -using unichar = unsigned short; -class String : public Copying +class String : public NS::SecureCoding { public: - static String* string(); - static String* string(const String* pString); - static String* string(const char* pString, StringEncoding encoding); - - static String* alloc(); - String* init(); - String* init(const String* pString); - String* init(const char* pString, StringEncoding encoding); - String* init(void* pBytes, UInteger len, StringEncoding encoding, bool freeBuffer); - - unichar character(UInteger index) const; - UInteger length() const; - - const char* cString(StringEncoding encoding) const; - const char* utf8String() const; - UInteger maximumLengthOfBytes(StringEncoding encoding) const; - UInteger lengthOfBytes(StringEncoding encoding) const; + static String* alloc(); + String* init() const; + + static NS::String* string(); + static NS::String* string(NS::String* string); + static NS::String* string(const char * cString, NS::StringEncoding enc); + + const char * cString(NS::StringEncoding encoding); + long caseInsensitiveCompare(NS::String* string); + NS::unichar character(NS::UInteger index); + NS::String* init(NS::String* aString); + NS::String* init(const void * bytes, NS::UInteger len, NS::StringEncoding encoding); + NS::String* init(void * bytes, NS::UInteger len, NS::StringEncoding encoding, bool freeBuffer); + NS::String* init(const char * nullTerminatedCString, NS::StringEncoding encoding); + bool isEqualToString(NS::String* aString); + NS::UInteger length() const; + NS::UInteger lengthOfBytes(NS::StringEncoding enc); + NS::UInteger maximumLengthOfBytes(NS::StringEncoding enc); + NS::Range rangeOfString(NS::String* searchString, NS::StringCompareOptions mask); + NS::String* stringByAppendingString(NS::String* aString); + const char * utf8String() const; - bool isEqualToString(const String* pString) const; - Range rangeOfString(const String* pString, StringCompareOptions options) const; - - const char* fileSystemRepresentation() const; - - String* stringByAppendingString(const String* pString) const; - ComparisonResult caseInsensitiveCompare(const String* pString) const; - NS::String* init(const void * bytes, NS::UInteger len, NS::StringEncoding encoding); }; /// Create an NS::String* from a string literal. @@ -116,146 +131,103 @@ template return reinterpret_cast(__CFStringMakeConstantString(str)); } -} +} // namespace NS -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +// --- Class symbols + inline implementations --- -_NS_INLINE NS::String* NS::String::string() -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSString), _NS_PRIVATE_SEL(string)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +extern "C" void *OBJC_CLASS_$_NSString; -_NS_INLINE NS::String* NS::String::string(const String* pString) +_NS_INLINE NS::String* NS::String::alloc() { - return Object::sendMessage(_NS_PRIVATE_CLS(NSString), _NS_PRIVATE_SEL(stringWithString_), pString); + return _NS_msg_NS__Stringp_alloc((const void*)&OBJC_CLASS_$_NSString, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::String::string(const char* pString, StringEncoding encoding) +_NS_INLINE NS::String* NS::String::init() const { - return Object::sendMessage(_NS_PRIVATE_CLS(NSString), _NS_PRIVATE_SEL(stringWithCString_encoding_), pString, encoding); + return _NS_msg_NS__Stringp_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::String::alloc() +_NS_INLINE NS::String* NS::String::string() { - return Object::alloc(_NS_PRIVATE_CLS(NSString)); + return _NS_msg_NS__Stringp_string((const void*)&OBJC_CLASS_$_NSString, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::String::init() +_NS_INLINE NS::String* NS::String::string(NS::String* string) { - return Object::init(); + return _NS_msg_NS__Stringp_stringWithString__NS__Stringp((const void*)&OBJC_CLASS_$_NSString, nullptr, string); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::String::init(const String* pString) +_NS_INLINE NS::String* NS::String::string(const char * cString, NS::StringEncoding enc) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithString_), pString); + return _NS_msg_NS__Stringp_stringWithCString_encoding__constcharp_NS__StringEncoding((const void*)&OBJC_CLASS_$_NSString, nullptr, cString, enc); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::String::init(const char* pString, StringEncoding encoding) +_NS_INLINE NS::UInteger NS::String::length() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithCString_encoding_), pString, encoding); + return _NS_msg_NS__UInteger_length((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::String::init(void* pBytes, UInteger len, StringEncoding encoding, bool freeBuffer) +_NS_INLINE const char * NS::String::utf8String() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithBytesNoCopy_length_encoding_freeWhenDone_), pBytes, len, encoding, freeBuffer); + return _NS_msg_constcharp_UTF8String((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::unichar NS::String::character(UInteger index) const +_NS_INLINE NS::unichar NS::String::character(NS::UInteger index) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(characterAtIndex_), index); + return _NS_msg_unsignedshort_characterAtIndex__NS__UInteger((const void*)this, nullptr, index); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::UInteger NS::String::length() const +_NS_INLINE long NS::String::caseInsensitiveCompare(NS::String* string) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(length)); + return _NS_msg_long_caseInsensitiveCompare__NS__Stringp((const void*)this, nullptr, string); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE const char* NS::String::cString(StringEncoding encoding) const +_NS_INLINE bool NS::String::isEqualToString(NS::String* aString) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(cStringUsingEncoding_), encoding); + return _NS_msg_bool_isEqualToString__NS__Stringp((const void*)this, nullptr, aString); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE const char* NS::String::utf8String() const +_NS_INLINE NS::Range NS::String::rangeOfString(NS::String* searchString, NS::StringCompareOptions mask) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(UTF8String)); + return _NS_msg_NS__Range_rangeOfString_options__NS__Stringp_NS__StringCompareOptions((const void*)this, nullptr, searchString, mask); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::UInteger NS::String::maximumLengthOfBytes(StringEncoding encoding) const +_NS_INLINE NS::String* NS::String::stringByAppendingString(NS::String* aString) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(maximumLengthOfBytesUsingEncoding_), encoding); + return _NS_msg_NS__Stringp_stringByAppendingString__NS__Stringp((const void*)this, nullptr, aString); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::UInteger NS::String::lengthOfBytes(StringEncoding encoding) const +_NS_INLINE const char * NS::String::cString(NS::StringEncoding encoding) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(lengthOfBytesUsingEncoding_), encoding); + return _NS_msg_constcharp_cStringUsingEncoding__NS__StringEncoding((const void*)this, nullptr, encoding); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE bool NS::String::isEqualToString(const NS::String* pString) const +_NS_INLINE NS::UInteger NS::String::maximumLengthOfBytes(NS::StringEncoding enc) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(isEqualToString_), pString); + return _NS_msg_NS__UInteger_maximumLengthOfBytesUsingEncoding__NS__StringEncoding((const void*)this, nullptr, enc); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::Range NS::String::rangeOfString(const NS::String* pString, NS::StringCompareOptions options) const +_NS_INLINE NS::UInteger NS::String::lengthOfBytes(NS::StringEncoding enc) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(rangeOfString_options_), pString, options); + return _NS_msg_NS__UInteger_lengthOfBytesUsingEncoding__NS__StringEncoding((const void*)this, nullptr, enc); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE const char* NS::String::fileSystemRepresentation() const +_NS_INLINE NS::String* NS::String::init(NS::String* aString) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(fileSystemRepresentation)); + return _NS_msg_NS__Stringp_initWithString__NS__Stringp((const void*)this, nullptr, aString); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::String* NS::String::stringByAppendingString(const String* pString) const +_NS_INLINE NS::String* NS::String::init(const void * bytes, NS::UInteger len, NS::StringEncoding encoding) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(stringByAppendingString_), pString); + return _NS_msg_NS__Stringp_initWithBytes_length_encoding__constvoidp_NS__UInteger_NS__StringEncoding((const void*)this, nullptr, bytes, len, encoding); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::ComparisonResult NS::String::caseInsensitiveCompare(const String* pString) const +_NS_INLINE NS::String* NS::String::init(void * bytes, NS::UInteger len, NS::StringEncoding encoding, bool freeBuffer) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(caseInsensitiveCompare_), pString); + return _NS_msg_NS__Stringp_initWithBytesNoCopy_length_encoding_freeWhenDone__voidp_NS__UInteger_NS__StringEncoding_bool((const void*)this, nullptr, bytes, len, encoding, freeBuffer); } -_NS_INLINE NS::String* NS::String::init(const void * bytes, NS::UInteger len, NS::StringEncoding encoding) +_NS_INLINE NS::String* NS::String::init(const char * nullTerminatedCString, NS::StringEncoding encoding) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithBytes_length_encoding_), bytes, len, encoding); + return _NS_msg_NS__Stringp_initWithCString_encoding__constcharp_NS__StringEncoding((const void*)this, nullptr, nullTerminatedCString, encoding); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/Foundation/NSStructs.hpp b/thirdparty/metal-cpp/Foundation/NSStructs.hpp new file mode 100644 index 000000000000..7d2f32e1e27f --- /dev/null +++ b/thirdparty/metal-cpp/Foundation/NSStructs.hpp @@ -0,0 +1,34 @@ +#pragma once + +#include "NSDefines.hpp" +#include "NSTypes.hpp" + +namespace NS { + +} // NS + +#include "NSDefines.hpp" +#include "NSObjCRuntime.hpp" +#include "NSRange.hpp" +#include "NSSharedPtr.hpp" +#include "NSTypes.hpp" + +namespace NS { + +using TimeInterval = double; +using ErrorDomain = String*; +using ErrorUserInfoKey = String*; +using NotificationName = String*; +using StringTransform = String*; +using StringEncodingDetectionOptionsKey = String*; +using unichar = unsigned short; +using URLResourceKey = String*; +using URLFileResourceType = String*; +using URLThumbnailDictionaryItem = String*; +using URLFileProtectionType = String*; +using URLUbiquitousItemDownloadingStatus = String*; +using URLUbiquitousSharedItemRole = String*; +using URLUbiquitousSharedItemPermissions = String*; +using URLBookmarkFileCreationOptions = UInteger; + +} // NS diff --git a/thirdparty/metal-cpp/Foundation/NSURL.hpp b/thirdparty/metal-cpp/Foundation/NSURL.hpp index d90e5d70b849..acb3b55d0766 100644 --- a/thirdparty/metal-cpp/Foundation/NSURL.hpp +++ b/thirdparty/metal-cpp/Foundation/NSURL.hpp @@ -1,90 +1,239 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Foundation/NSURL.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" #include "NSObject.hpp" -#include "NSPrivate.hpp" #include "NSTypes.hpp" +#include "NSRange.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace NS { + class String; +} namespace NS { -class URL : public Copying + +using URLResourceKey = NS::String*; +using URLFileResourceType = NS::String*; +using URLThumbnailDictionaryItem = NS::String*; +using URLFileProtectionType = NS::String*; +using URLUbiquitousItemDownloadingStatus = NS::String*; +using URLUbiquitousSharedItemRole = NS::String*; +using URLUbiquitousSharedItemPermissions = NS::String*; +extern NS::String* const URLFileScheme __asm__("_NSURLFileScheme"); +extern URLResourceKey const URLKeysOfUnsetValuesKey __asm__("_NSURLKeysOfUnsetValuesKey"); +extern URLResourceKey const URLNameKey __asm__("_NSURLNameKey"); +extern URLResourceKey const URLLocalizedNameKey __asm__("_NSURLLocalizedNameKey"); +extern URLResourceKey const URLIsRegularFileKey __asm__("_NSURLIsRegularFileKey"); +extern URLResourceKey const URLIsDirectoryKey __asm__("_NSURLIsDirectoryKey"); +extern URLResourceKey const URLIsSymbolicLinkKey __asm__("_NSURLIsSymbolicLinkKey"); +extern URLResourceKey const URLIsVolumeKey __asm__("_NSURLIsVolumeKey"); +extern URLResourceKey const URLIsPackageKey __asm__("_NSURLIsPackageKey"); +extern URLResourceKey const URLIsApplicationKey __asm__("_NSURLIsApplicationKey"); +extern URLResourceKey const URLApplicationIsScriptableKey __asm__("_NSURLApplicationIsScriptableKey"); +extern URLResourceKey const URLIsSystemImmutableKey __asm__("_NSURLIsSystemImmutableKey"); +extern URLResourceKey const URLIsUserImmutableKey __asm__("_NSURLIsUserImmutableKey"); +extern URLResourceKey const URLIsHiddenKey __asm__("_NSURLIsHiddenKey"); +extern URLResourceKey const URLHasHiddenExtensionKey __asm__("_NSURLHasHiddenExtensionKey"); +extern URLResourceKey const URLCreationDateKey __asm__("_NSURLCreationDateKey"); +extern URLResourceKey const URLContentAccessDateKey __asm__("_NSURLContentAccessDateKey"); +extern URLResourceKey const URLContentModificationDateKey __asm__("_NSURLContentModificationDateKey"); +extern URLResourceKey const URLAttributeModificationDateKey __asm__("_NSURLAttributeModificationDateKey"); +extern URLResourceKey const URLLinkCountKey __asm__("_NSURLLinkCountKey"); +extern URLResourceKey const URLParentDirectoryURLKey __asm__("_NSURLParentDirectoryURLKey"); +extern URLResourceKey const URLVolumeURLKey __asm__("_NSURLVolumeURLKey"); +extern URLResourceKey const URLTypeIdentifierKey __asm__("_NSURLTypeIdentifierKey"); +extern URLResourceKey const URLContentTypeKey __asm__("_NSURLContentTypeKey"); +extern URLResourceKey const URLLocalizedTypeDescriptionKey __asm__("_NSURLLocalizedTypeDescriptionKey"); +extern URLResourceKey const URLLabelNumberKey __asm__("_NSURLLabelNumberKey"); +extern URLResourceKey const URLLabelColorKey __asm__("_NSURLLabelColorKey"); +extern URLResourceKey const URLLocalizedLabelKey __asm__("_NSURLLocalizedLabelKey"); +extern URLResourceKey const URLEffectiveIconKey __asm__("_NSURLEffectiveIconKey"); +extern URLResourceKey const URLCustomIconKey __asm__("_NSURLCustomIconKey"); +extern URLResourceKey const URLFileResourceIdentifierKey __asm__("_NSURLFileResourceIdentifierKey"); +extern URLResourceKey const URLVolumeIdentifierKey __asm__("_NSURLVolumeIdentifierKey"); +extern URLResourceKey const URLPreferredIOBlockSizeKey __asm__("_NSURLPreferredIOBlockSizeKey"); +extern URLResourceKey const URLIsReadableKey __asm__("_NSURLIsReadableKey"); +extern URLResourceKey const URLIsWritableKey __asm__("_NSURLIsWritableKey"); +extern URLResourceKey const URLIsExecutableKey __asm__("_NSURLIsExecutableKey"); +extern URLResourceKey const URLFileSecurityKey __asm__("_NSURLFileSecurityKey"); +extern URLResourceKey const URLIsExcludedFromBackupKey __asm__("_NSURLIsExcludedFromBackupKey"); +extern URLResourceKey const URLTagNamesKey __asm__("_NSURLTagNamesKey"); +extern URLResourceKey const URLPathKey __asm__("_NSURLPathKey"); +extern URLResourceKey const URLCanonicalPathKey __asm__("_NSURLCanonicalPathKey"); +extern URLResourceKey const URLIsMountTriggerKey __asm__("_NSURLIsMountTriggerKey"); +extern URLResourceKey const URLGenerationIdentifierKey __asm__("_NSURLGenerationIdentifierKey"); +extern URLResourceKey const URLDocumentIdentifierKey __asm__("_NSURLDocumentIdentifierKey"); +extern URLResourceKey const URLAddedToDirectoryDateKey __asm__("_NSURLAddedToDirectoryDateKey"); +extern URLResourceKey const URLQuarantinePropertiesKey __asm__("_NSURLQuarantinePropertiesKey"); +extern URLResourceKey const URLFileResourceTypeKey __asm__("_NSURLFileResourceTypeKey"); +extern URLResourceKey const URLFileIdentifierKey __asm__("_NSURLFileIdentifierKey"); +extern URLResourceKey const URLFileContentIdentifierKey __asm__("_NSURLFileContentIdentifierKey"); +extern URLResourceKey const URLMayShareFileContentKey __asm__("_NSURLMayShareFileContentKey"); +extern URLResourceKey const URLMayHaveExtendedAttributesKey __asm__("_NSURLMayHaveExtendedAttributesKey"); +extern URLResourceKey const URLIsPurgeableKey __asm__("_NSURLIsPurgeableKey"); +extern URLResourceKey const URLIsSparseKey __asm__("_NSURLIsSparseKey"); +extern URLFileResourceType const URLFileResourceTypeNamedPipe __asm__("_NSURLFileResourceTypeNamedPipe"); +extern URLFileResourceType const URLFileResourceTypeCharacterSpecial __asm__("_NSURLFileResourceTypeCharacterSpecial"); +extern URLFileResourceType const URLFileResourceTypeDirectory __asm__("_NSURLFileResourceTypeDirectory"); +extern URLFileResourceType const URLFileResourceTypeBlockSpecial __asm__("_NSURLFileResourceTypeBlockSpecial"); +extern URLFileResourceType const URLFileResourceTypeRegular __asm__("_NSURLFileResourceTypeRegular"); +extern URLFileResourceType const URLFileResourceTypeSymbolicLink __asm__("_NSURLFileResourceTypeSymbolicLink"); +extern URLFileResourceType const URLFileResourceTypeSocket __asm__("_NSURLFileResourceTypeSocket"); +extern URLFileResourceType const URLFileResourceTypeUnknown __asm__("_NSURLFileResourceTypeUnknown"); +extern URLResourceKey const URLThumbnailDictionaryKey __asm__("_NSURLThumbnailDictionaryKey"); +extern URLResourceKey const URLThumbnailKey __asm__("_NSURLThumbnailKey"); +extern URLThumbnailDictionaryItem const Thumbnail1024x1024SizeKey __asm__("_NSThumbnail1024x1024SizeKey"); +extern URLResourceKey const URLFileSizeKey __asm__("_NSURLFileSizeKey"); +extern URLResourceKey const URLFileAllocatedSizeKey __asm__("_NSURLFileAllocatedSizeKey"); +extern URLResourceKey const URLTotalFileSizeKey __asm__("_NSURLTotalFileSizeKey"); +extern URLResourceKey const URLTotalFileAllocatedSizeKey __asm__("_NSURLTotalFileAllocatedSizeKey"); +extern URLResourceKey const URLIsAliasFileKey __asm__("_NSURLIsAliasFileKey"); +extern URLResourceKey const URLFileProtectionKey __asm__("_NSURLFileProtectionKey"); +extern URLFileProtectionType const URLFileProtectionNone __asm__("_NSURLFileProtectionNone"); +extern URLFileProtectionType const URLFileProtectionComplete __asm__("_NSURLFileProtectionComplete"); +extern URLFileProtectionType const URLFileProtectionCompleteUnlessOpen __asm__("_NSURLFileProtectionCompleteUnlessOpen"); +extern URLFileProtectionType const URLFileProtectionCompleteUntilFirstUserAuthentication __asm__("_NSURLFileProtectionCompleteUntilFirstUserAuthentication"); +extern URLFileProtectionType const URLFileProtectionCompleteWhenUserInactive __asm__("_NSURLFileProtectionCompleteWhenUserInactive"); +extern URLResourceKey const URLDirectoryEntryCountKey __asm__("_NSURLDirectoryEntryCountKey"); +extern URLResourceKey const URLVolumeLocalizedFormatDescriptionKey __asm__("_NSURLVolumeLocalizedFormatDescriptionKey"); +extern URLResourceKey const URLVolumeTotalCapacityKey __asm__("_NSURLVolumeTotalCapacityKey"); +extern URLResourceKey const URLVolumeAvailableCapacityKey __asm__("_NSURLVolumeAvailableCapacityKey"); +extern URLResourceKey const URLVolumeResourceCountKey __asm__("_NSURLVolumeResourceCountKey"); +extern URLResourceKey const URLVolumeSupportsPersistentIDsKey __asm__("_NSURLVolumeSupportsPersistentIDsKey"); +extern URLResourceKey const URLVolumeSupportsSymbolicLinksKey __asm__("_NSURLVolumeSupportsSymbolicLinksKey"); +extern URLResourceKey const URLVolumeSupportsHardLinksKey __asm__("_NSURLVolumeSupportsHardLinksKey"); +extern URLResourceKey const URLVolumeSupportsJournalingKey __asm__("_NSURLVolumeSupportsJournalingKey"); +extern URLResourceKey const URLVolumeIsJournalingKey __asm__("_NSURLVolumeIsJournalingKey"); +extern URLResourceKey const URLVolumeSupportsSparseFilesKey __asm__("_NSURLVolumeSupportsSparseFilesKey"); +extern URLResourceKey const URLVolumeSupportsZeroRunsKey __asm__("_NSURLVolumeSupportsZeroRunsKey"); +extern URLResourceKey const URLVolumeSupportsCaseSensitiveNamesKey __asm__("_NSURLVolumeSupportsCaseSensitiveNamesKey"); +extern URLResourceKey const URLVolumeSupportsCasePreservedNamesKey __asm__("_NSURLVolumeSupportsCasePreservedNamesKey"); +extern URLResourceKey const URLVolumeSupportsRootDirectoryDatesKey __asm__("_NSURLVolumeSupportsRootDirectoryDatesKey"); +extern URLResourceKey const URLVolumeSupportsVolumeSizesKey __asm__("_NSURLVolumeSupportsVolumeSizesKey"); +extern URLResourceKey const URLVolumeSupportsRenamingKey __asm__("_NSURLVolumeSupportsRenamingKey"); +extern URLResourceKey const URLVolumeSupportsAdvisoryFileLockingKey __asm__("_NSURLVolumeSupportsAdvisoryFileLockingKey"); +extern URLResourceKey const URLVolumeSupportsExtendedSecurityKey __asm__("_NSURLVolumeSupportsExtendedSecurityKey"); +extern URLResourceKey const URLVolumeIsBrowsableKey __asm__("_NSURLVolumeIsBrowsableKey"); +extern URLResourceKey const URLVolumeMaximumFileSizeKey __asm__("_NSURLVolumeMaximumFileSizeKey"); +extern URLResourceKey const URLVolumeIsEjectableKey __asm__("_NSURLVolumeIsEjectableKey"); +extern URLResourceKey const URLVolumeIsRemovableKey __asm__("_NSURLVolumeIsRemovableKey"); +extern URLResourceKey const URLVolumeIsInternalKey __asm__("_NSURLVolumeIsInternalKey"); +extern URLResourceKey const URLVolumeIsAutomountedKey __asm__("_NSURLVolumeIsAutomountedKey"); +extern URLResourceKey const URLVolumeIsLocalKey __asm__("_NSURLVolumeIsLocalKey"); +extern URLResourceKey const URLVolumeIsReadOnlyKey __asm__("_NSURLVolumeIsReadOnlyKey"); +extern URLResourceKey const URLVolumeCreationDateKey __asm__("_NSURLVolumeCreationDateKey"); +extern URLResourceKey const URLVolumeURLForRemountingKey __asm__("_NSURLVolumeURLForRemountingKey"); +extern URLResourceKey const URLVolumeUUIDStringKey __asm__("_NSURLVolumeUUIDStringKey"); +extern URLResourceKey const URLVolumeNameKey __asm__("_NSURLVolumeNameKey"); +extern URLResourceKey const URLVolumeLocalizedNameKey __asm__("_NSURLVolumeLocalizedNameKey"); +extern URLResourceKey const URLVolumeIsEncryptedKey __asm__("_NSURLVolumeIsEncryptedKey"); +extern URLResourceKey const URLVolumeIsRootFileSystemKey __asm__("_NSURLVolumeIsRootFileSystemKey"); +extern URLResourceKey const URLVolumeSupportsCompressionKey __asm__("_NSURLVolumeSupportsCompressionKey"); +extern URLResourceKey const URLVolumeSupportsFileCloningKey __asm__("_NSURLVolumeSupportsFileCloningKey"); +extern URLResourceKey const URLVolumeSupportsSwapRenamingKey __asm__("_NSURLVolumeSupportsSwapRenamingKey"); +extern URLResourceKey const URLVolumeSupportsExclusiveRenamingKey __asm__("_NSURLVolumeSupportsExclusiveRenamingKey"); +extern URLResourceKey const URLVolumeSupportsImmutableFilesKey __asm__("_NSURLVolumeSupportsImmutableFilesKey"); +extern URLResourceKey const URLVolumeSupportsAccessPermissionsKey __asm__("_NSURLVolumeSupportsAccessPermissionsKey"); +extern URLResourceKey const URLVolumeSupportsFileProtectionKey __asm__("_NSURLVolumeSupportsFileProtectionKey"); +extern URLResourceKey const URLVolumeAvailableCapacityForImportantUsageKey __asm__("_NSURLVolumeAvailableCapacityForImportantUsageKey"); +extern URLResourceKey const URLVolumeAvailableCapacityForOpportunisticUsageKey __asm__("_NSURLVolumeAvailableCapacityForOpportunisticUsageKey"); +extern URLResourceKey const URLVolumeTypeNameKey __asm__("_NSURLVolumeTypeNameKey"); +extern URLResourceKey const URLVolumeSubtypeKey __asm__("_NSURLVolumeSubtypeKey"); +extern URLResourceKey const URLVolumeMountFromLocationKey __asm__("_NSURLVolumeMountFromLocationKey"); +extern URLResourceKey const URLIsUbiquitousItemKey __asm__("_NSURLIsUbiquitousItemKey"); +extern URLResourceKey const URLUbiquitousItemHasUnresolvedConflictsKey __asm__("_NSURLUbiquitousItemHasUnresolvedConflictsKey"); +extern URLResourceKey const URLUbiquitousItemIsDownloadedKey __asm__("_NSURLUbiquitousItemIsDownloadedKey"); +extern URLResourceKey const URLUbiquitousItemIsDownloadingKey __asm__("_NSURLUbiquitousItemIsDownloadingKey"); +extern URLResourceKey const URLUbiquitousItemIsUploadedKey __asm__("_NSURLUbiquitousItemIsUploadedKey"); +extern URLResourceKey const URLUbiquitousItemIsUploadingKey __asm__("_NSURLUbiquitousItemIsUploadingKey"); +extern URLResourceKey const URLUbiquitousItemPercentDownloadedKey __asm__("_NSURLUbiquitousItemPercentDownloadedKey"); +extern URLResourceKey const URLUbiquitousItemPercentUploadedKey __asm__("_NSURLUbiquitousItemPercentUploadedKey"); +extern URLResourceKey const URLUbiquitousItemDownloadingStatusKey __asm__("_NSURLUbiquitousItemDownloadingStatusKey"); +extern URLResourceKey const URLUbiquitousItemDownloadingErrorKey __asm__("_NSURLUbiquitousItemDownloadingErrorKey"); +extern URLResourceKey const URLUbiquitousItemUploadingErrorKey __asm__("_NSURLUbiquitousItemUploadingErrorKey"); +extern URLResourceKey const URLUbiquitousItemDownloadRequestedKey __asm__("_NSURLUbiquitousItemDownloadRequestedKey"); +extern URLResourceKey const URLUbiquitousItemContainerDisplayNameKey __asm__("_NSURLUbiquitousItemContainerDisplayNameKey"); +extern URLResourceKey const URLUbiquitousItemIsExcludedFromSyncKey __asm__("_NSURLUbiquitousItemIsExcludedFromSyncKey"); +extern URLResourceKey const URLUbiquitousItemIsSharedKey __asm__("_NSURLUbiquitousItemIsSharedKey"); +extern URLResourceKey const URLUbiquitousSharedItemCurrentUserRoleKey __asm__("_NSURLUbiquitousSharedItemCurrentUserRoleKey"); +extern URLResourceKey const URLUbiquitousSharedItemCurrentUserPermissionsKey __asm__("_NSURLUbiquitousSharedItemCurrentUserPermissionsKey"); +extern URLResourceKey const URLUbiquitousSharedItemOwnerNameComponentsKey __asm__("_NSURLUbiquitousSharedItemOwnerNameComponentsKey"); +extern URLResourceKey const URLUbiquitousSharedItemMostRecentEditorNameComponentsKey __asm__("_NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey"); +extern URLUbiquitousItemDownloadingStatus const URLUbiquitousItemDownloadingStatusNotDownloaded __asm__("_NSURLUbiquitousItemDownloadingStatusNotDownloaded"); +extern URLUbiquitousItemDownloadingStatus const URLUbiquitousItemDownloadingStatusDownloaded __asm__("_NSURLUbiquitousItemDownloadingStatusDownloaded"); +extern URLUbiquitousItemDownloadingStatus const URLUbiquitousItemDownloadingStatusCurrent __asm__("_NSURLUbiquitousItemDownloadingStatusCurrent"); +extern URLUbiquitousSharedItemRole const URLUbiquitousSharedItemRoleOwner __asm__("_NSURLUbiquitousSharedItemRoleOwner"); +extern URLUbiquitousSharedItemRole const URLUbiquitousSharedItemRoleParticipant __asm__("_NSURLUbiquitousSharedItemRoleParticipant"); +extern URLUbiquitousSharedItemPermissions const URLUbiquitousSharedItemPermissionsReadOnly __asm__("_NSURLUbiquitousSharedItemPermissionsReadOnly"); +extern URLUbiquitousSharedItemPermissions const URLUbiquitousSharedItemPermissionsReadWrite __asm__("_NSURLUbiquitousSharedItemPermissionsReadWrite"); +extern URLResourceKey const URLUbiquitousItemSupportedSyncControlsKey __asm__("_NSURLUbiquitousItemSupportedSyncControlsKey"); +extern URLResourceKey const URLUbiquitousItemIsSyncPausedKey __asm__("_NSURLUbiquitousItemIsSyncPausedKey"); +_NS_OPTIONS(NS::UInteger, URLBookmarkCreationOptions) { + URLBookmarkCreationPreferFileIDResolution = ( 1UL << 8 ), + URLBookmarkCreationMinimalBookmark = ( 1UL << 9 ), + URLBookmarkCreationSuitableForBookmarkFile = ( 1UL << 10 ), + URLBookmarkCreationWithSecurityScope = ( 1 << 11 ), + URLBookmarkCreationSecurityScopeAllowOnlyReadAccess = ( 1 << 12 ), + URLBookmarkCreationWithoutImplicitSecurityScope = (1 << 29), +}; + +_NS_OPTIONS(NS::UInteger, URLBookmarkResolutionOptions) { + URLBookmarkResolutionWithoutUI = ( 1UL << 8 ), + URLBookmarkResolutionWithoutMounting = ( 1UL << 9 ), + URLBookmarkResolutionWithSecurityScope = ( 1 << 10 ), + URLBookmarkResolutionWithoutImplicitStartAccessing = ( 1 << 15 ), +}; + + +class URL : public NS::SecureCoding { public: - static URL* fileURLWithPath(const class String* pPath); - static URL* alloc(); - URL* init(); - URL* init(const class String* pString); - URL* initFileURLWithPath(const class String* pPath); + URL* init() const; + + static NS::URL* fileURL(NS::String* path); + + const char * fileSystemRepresentation() const; + NS::URL* init(NS::String* URLString); + NS::URL* initFileURLWithPath(NS::String* path); - const char* fileSystemRepresentation() const; }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +} // namespace NS -_NS_INLINE NS::URL* NS::URL::fileURLWithPath(const String* pPath) -{ - return Object::sendMessage(_NS_PRIVATE_CLS(NSURL), _NS_PRIVATE_SEL(fileURLWithPath_), pPath); -} +// --- Class symbols + inline implementations --- -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +extern "C" void *OBJC_CLASS_$_NSURL; _NS_INLINE NS::URL* NS::URL::alloc() { - return Object::alloc(_NS_PRIVATE_CLS(NSURL)); + return _NS_msg_NS__URLp_alloc((const void*)&OBJC_CLASS_$_NSURL, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::URL::init() +_NS_INLINE NS::URL* NS::URL::init() const { - return Object::init(); + return _NS_msg_NS__URLp_init((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::URL::init(const String* pString) +_NS_INLINE NS::URL* NS::URL::fileURL(NS::String* path) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithString_), pString); + return _NS_msg_NS__URLp_fileURLWithPath__NS__Stringp((const void*)&OBJC_CLASS_$_NSURL, nullptr, path); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE NS::URL* NS::URL::initFileURLWithPath(const String* pPath) +_NS_INLINE const char * NS::URL::fileSystemRepresentation() const { - return Object::sendMessage(this, _NS_PRIVATE_SEL(initFileURLWithPath_), pPath); + return _NS_msg_constcharp_fileSystemRepresentation((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_NS_INLINE const char* NS::URL::fileSystemRepresentation() const +_NS_INLINE NS::URL* NS::URL::initFileURLWithPath(NS::String* path) { - return Object::sendMessage(this, _NS_PRIVATE_SEL(fileSystemRepresentation)); + return _NS_msg_NS__URLp_initFileURLWithPath__NS__Stringp((const void*)this, nullptr, path); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_NS_INLINE NS::URL* NS::URL::init(NS::String* URLString) +{ + return _NS_msg_NS__URLp_initWithString__NS__Stringp((const void*)this, nullptr, URLString); +} diff --git a/thirdparty/metal-cpp/Foundation/NSValue.hpp b/thirdparty/metal-cpp/Foundation/NSValue.hpp new file mode 100644 index 000000000000..fdb10b8ab734 --- /dev/null +++ b/thirdparty/metal-cpp/Foundation/NSValue.hpp @@ -0,0 +1,391 @@ +#pragma once + +#include "NSDefines.hpp" +#include "NSBlocks.hpp" +#include "NSStructs.hpp" +#include "NSBridge.hpp" +#include "NSObject.hpp" +#include "NSTypes.hpp" +#include "NSRange.hpp" + +namespace NS { + class Object; + class String; +} + +namespace NS +{ + +class Value; +class Number; + +class Value : public NS::SecureCoding +{ +public: + static Value* alloc(); + Value* init() const; + + static NS::Value* value(const void * value, const char * type); + static NS::Value* value(const void * pointer); + + void getValue(void * value, NS::UInteger size); + NS::Value* init(const void * value, const char * type); + NS::Value* init(void* coder); + bool isEqualToValue(NS::Value* value); + const char * objCType() const; + void * pointerValue() const; + +}; + +class Number : public NS::Referencing +{ +public: + static Number* alloc(); + Number* init() const; + + static NS::Number* number(char value); + static NS::Number* number(unsigned char value); + static NS::Number* number(short value); + static NS::Number* number(unsigned short value); + static NS::Number* number(int value); + static NS::Number* number(unsigned int value); + static NS::Number* number(long value); + static NS::Number* number(unsigned long value); + static NS::Number* number(long long value); + static NS::Number* number(unsigned long long value); + static NS::Number* number(float value); + static NS::Number* number(double value); + static NS::Number* number(bool value); + + bool boolValue() const; + char charValue() const; + long compare(NS::Number* otherNumber); + NS::String* description(NS::Object* locale); + double doubleValue() const; + float floatValue() const; + NS::Number* init(void* coder); + NS::Number* init(char value); + NS::Number* init(unsigned char value); + NS::Number* init(short value); + NS::Number* init(unsigned short value); + NS::Number* init(int value); + NS::Number* init(unsigned int value); + NS::Number* init(long value); + NS::Number* init(unsigned long value); + NS::Number* init(long long value); + NS::Number* init(unsigned long long value); + NS::Number* init(float value); + NS::Number* init(double value); + NS::Number* init(bool value); + int intValue() const; + NS::Integer integerValue() const; + bool isEqualToNumber(NS::Number* number); + long long longLongValue() const; + long longValue() const; + short shortValue() const; + NS::String* stringValue() const; + unsigned char unsignedCharValue() const; + unsigned int unsignedIntValue() const; + NS::UInteger unsignedIntegerValue() const; + unsigned long long unsignedLongLongValue() const; + unsigned long unsignedLongValue() const; + unsigned short unsignedShortValue() const; + +}; + +} // namespace NS + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_NSValue; +extern "C" void *OBJC_CLASS_$_NSNumber; + +_NS_INLINE NS::Value* NS::Value::alloc() +{ + return _NS_msg_NS__Valuep_alloc((const void*)&OBJC_CLASS_$_NSValue, nullptr); +} + +_NS_INLINE NS::Value* NS::Value::init() const +{ + return _NS_msg_NS__Valuep_init((const void*)this, nullptr); +} + +_NS_INLINE NS::Value* NS::Value::value(const void * value, const char * type) +{ + return _NS_msg_NS__Valuep_valueWithBytes_objCType__constvoidp_constcharp((const void*)&OBJC_CLASS_$_NSValue, nullptr, value, type); +} + +_NS_INLINE NS::Value* NS::Value::value(const void * pointer) +{ + return _NS_msg_NS__Valuep_valueWithPointer__constvoidp((const void*)&OBJC_CLASS_$_NSValue, nullptr, pointer); +} + +_NS_INLINE const char * NS::Value::objCType() const +{ + return _NS_msg_constcharp_objCType((const void*)this, nullptr); +} + +_NS_INLINE void * NS::Value::pointerValue() const +{ + return _NS_msg_voidp_pointerValue((const void*)this, nullptr); +} + +_NS_INLINE void NS::Value::getValue(void * value, NS::UInteger size) +{ + _NS_msg_v_getValue_size__voidp_NS__UInteger((const void*)this, nullptr, value, size); +} + +_NS_INLINE NS::Value* NS::Value::init(const void * value, const char * type) +{ + return _NS_msg_NS__Valuep_initWithBytes_objCType__constvoidp_constcharp((const void*)this, nullptr, value, type); +} + +_NS_INLINE NS::Value* NS::Value::init(void* coder) +{ + return _NS_msg_NS__Valuep_initWithCoder__voidp((const void*)this, nullptr, coder); +} + +_NS_INLINE bool NS::Value::isEqualToValue(NS::Value* value) +{ + return _NS_msg_bool_isEqualToValue__NS__Valuep((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::alloc() +{ + return _NS_msg_NS__Numberp_alloc((const void*)&OBJC_CLASS_$_NSNumber, nullptr); +} + +_NS_INLINE NS::Number* NS::Number::init() const +{ + return _NS_msg_NS__Numberp_init((const void*)this, nullptr); +} + +_NS_INLINE NS::Number* NS::Number::number(char value) +{ + return _NS_msg_NS__Numberp_numberWithChar__char((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(unsigned char value) +{ + return _NS_msg_NS__Numberp_numberWithUnsignedChar__unsignedchar((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(short value) +{ + return _NS_msg_NS__Numberp_numberWithShort__short((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(unsigned short value) +{ + return _NS_msg_NS__Numberp_numberWithUnsignedShort__unsignedshort((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(int value) +{ + return _NS_msg_NS__Numberp_numberWithInt__int((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(unsigned int value) +{ + return _NS_msg_NS__Numberp_numberWithUnsignedInt__unsignedint((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(long value) +{ + return _NS_msg_NS__Numberp_numberWithLong__long((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(unsigned long value) +{ + return _NS_msg_NS__Numberp_numberWithUnsignedLong__unsignedlong((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(long long value) +{ + return _NS_msg_NS__Numberp_numberWithLongLong__longlong((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(unsigned long long value) +{ + return _NS_msg_NS__Numberp_numberWithUnsignedLongLong__unsignedlonglong((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(float value) +{ + return _NS_msg_NS__Numberp_numberWithFloat__float((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(double value) +{ + return _NS_msg_NS__Numberp_numberWithDouble__double((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::number(bool value) +{ + return _NS_msg_NS__Numberp_numberWithBool__bool((const void*)&OBJC_CLASS_$_NSNumber, nullptr, value); +} + +_NS_INLINE char NS::Number::charValue() const +{ + return _NS_msg_char_charValue((const void*)this, nullptr); +} + +_NS_INLINE unsigned char NS::Number::unsignedCharValue() const +{ + return _NS_msg_unsignedchar_unsignedCharValue((const void*)this, nullptr); +} + +_NS_INLINE short NS::Number::shortValue() const +{ + return _NS_msg_short_shortValue((const void*)this, nullptr); +} + +_NS_INLINE unsigned short NS::Number::unsignedShortValue() const +{ + return _NS_msg_unsignedshort_unsignedShortValue((const void*)this, nullptr); +} + +_NS_INLINE int NS::Number::intValue() const +{ + return _NS_msg_int_intValue((const void*)this, nullptr); +} + +_NS_INLINE unsigned int NS::Number::unsignedIntValue() const +{ + return _NS_msg_unsignedint_unsignedIntValue((const void*)this, nullptr); +} + +_NS_INLINE long NS::Number::longValue() const +{ + return _NS_msg_long_longValue((const void*)this, nullptr); +} + +_NS_INLINE unsigned long NS::Number::unsignedLongValue() const +{ + return _NS_msg_unsignedlong_unsignedLongValue((const void*)this, nullptr); +} + +_NS_INLINE long long NS::Number::longLongValue() const +{ + return _NS_msg_longlong_longLongValue((const void*)this, nullptr); +} + +_NS_INLINE unsigned long long NS::Number::unsignedLongLongValue() const +{ + return _NS_msg_unsignedlonglong_unsignedLongLongValue((const void*)this, nullptr); +} + +_NS_INLINE float NS::Number::floatValue() const +{ + return _NS_msg_float_floatValue((const void*)this, nullptr); +} + +_NS_INLINE double NS::Number::doubleValue() const +{ + return _NS_msg_double_doubleValue((const void*)this, nullptr); +} + +_NS_INLINE bool NS::Number::boolValue() const +{ + return _NS_msg_bool_boolValue((const void*)this, nullptr); +} + +_NS_INLINE NS::Integer NS::Number::integerValue() const +{ + return _NS_msg_NS__Integer_integerValue((const void*)this, nullptr); +} + +_NS_INLINE NS::UInteger NS::Number::unsignedIntegerValue() const +{ + return _NS_msg_NS__UInteger_unsignedIntegerValue((const void*)this, nullptr); +} + +_NS_INLINE NS::String* NS::Number::stringValue() const +{ + return _NS_msg_NS__Stringp_stringValue((const void*)this, nullptr); +} + +_NS_INLINE NS::Number* NS::Number::init(void* coder) +{ + return _NS_msg_NS__Numberp_initWithCoder__voidp((const void*)this, nullptr, coder); +} + +_NS_INLINE NS::Number* NS::Number::init(char value) +{ + return _NS_msg_NS__Numberp_initWithChar__char((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(unsigned char value) +{ + return _NS_msg_NS__Numberp_initWithUnsignedChar__unsignedchar((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(short value) +{ + return _NS_msg_NS__Numberp_initWithShort__short((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(unsigned short value) +{ + return _NS_msg_NS__Numberp_initWithUnsignedShort__unsignedshort((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(int value) +{ + return _NS_msg_NS__Numberp_initWithInt__int((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(unsigned int value) +{ + return _NS_msg_NS__Numberp_initWithUnsignedInt__unsignedint((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(long value) +{ + return _NS_msg_NS__Numberp_initWithLong__long((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(unsigned long value) +{ + return _NS_msg_NS__Numberp_initWithUnsignedLong__unsignedlong((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(long long value) +{ + return _NS_msg_NS__Numberp_initWithLongLong__longlong((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(unsigned long long value) +{ + return _NS_msg_NS__Numberp_initWithUnsignedLongLong__unsignedlonglong((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(float value) +{ + return _NS_msg_NS__Numberp_initWithFloat__float((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(double value) +{ + return _NS_msg_NS__Numberp_initWithDouble__double((const void*)this, nullptr, value); +} + +_NS_INLINE NS::Number* NS::Number::init(bool value) +{ + return _NS_msg_NS__Numberp_initWithBool__bool((const void*)this, nullptr, value); +} + +_NS_INLINE long NS::Number::compare(NS::Number* otherNumber) +{ + return _NS_msg_long_compare__NS__Numberp((const void*)this, nullptr, otherNumber); +} + +_NS_INLINE bool NS::Number::isEqualToNumber(NS::Number* number) +{ + return _NS_msg_bool_isEqualToNumber__NS__Numberp((const void*)this, nullptr, number); +} + +_NS_INLINE NS::String* NS::Number::description(NS::Object* locale) +{ + return _NS_msg_NS__Stringp_descriptionWithLocale__NS__Objectp((const void*)this, nullptr, locale); +} diff --git a/thirdparty/metal-cpp/Metal/MTL4AccelerationStructure.hpp b/thirdparty/metal-cpp/Metal/MTL4AccelerationStructure.hpp index 11540150fec1..d3f9cdb5eb9c 100644 --- a/thirdparty/metal-cpp/Metal/MTL4AccelerationStructure.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4AccelerationStructure.hpp @@ -1,1395 +1,1261 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4AccelerationStructure.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLAccelerationStructure.hpp" -#include "MTLAccelerationStructureTypes.hpp" -#include "MTLArgument.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLStageInputOutputDescriptor.hpp" + +namespace MTL { + enum AccelerationStructureInstanceDescriptorType : NS::UInteger; + enum AttributeFormat : NS::UInteger; + enum CurveBasis : NS::Integer; + enum CurveEndCaps : NS::Integer; + enum CurveType : NS::Integer; + enum IndexType : NS::UInteger; + enum MatrixLayout : NS::Integer; + enum MotionBorderMode : uint32_t; + enum TransformType : NS::Integer; +} +namespace NS { + class Array; + class String; +} namespace MTL4 { -class AccelerationStructureBoundingBoxGeometryDescriptor; -class AccelerationStructureCurveGeometryDescriptor; + class AccelerationStructureDescriptor; class AccelerationStructureGeometryDescriptor; +class PrimitiveAccelerationStructureDescriptor; +class AccelerationStructureTriangleGeometryDescriptor; +class AccelerationStructureBoundingBoxGeometryDescriptor; +class AccelerationStructureMotionTriangleGeometryDescriptor; class AccelerationStructureMotionBoundingBoxGeometryDescriptor; +class AccelerationStructureCurveGeometryDescriptor; class AccelerationStructureMotionCurveGeometryDescriptor; -class AccelerationStructureMotionTriangleGeometryDescriptor; -class AccelerationStructureTriangleGeometryDescriptor; -class IndirectInstanceAccelerationStructureDescriptor; class InstanceAccelerationStructureDescriptor; -class PrimitiveAccelerationStructureDescriptor; +class IndirectInstanceAccelerationStructureDescriptor; -class AccelerationStructureDescriptor : public NS::Copying +class AccelerationStructureDescriptor : public NS::Referencing { public: static AccelerationStructureDescriptor* alloc(); + AccelerationStructureDescriptor* init() const; - AccelerationStructureDescriptor* init(); }; + class AccelerationStructureGeometryDescriptor : public NS::Copying { public: static AccelerationStructureGeometryDescriptor* alloc(); + AccelerationStructureGeometryDescriptor* init() const; + + bool allowDuplicateIntersectionFunctionInvocation() const; + NS::UInteger intersectionFunctionTableOffset() const; + NS::String* label() const; + bool opaque() const; + MTL4::BufferRange primitiveDataBuffer() const; + NS::UInteger primitiveDataElementSize() const; + NS::UInteger primitiveDataStride() const; + void setAllowDuplicateIntersectionFunctionInvocation(bool allowDuplicateIntersectionFunctionInvocation); + void setIntersectionFunctionTableOffset(NS::UInteger intersectionFunctionTableOffset); + void setLabel(NS::String* label); + void setOpaque(bool opaque); + void setPrimitiveDataBuffer(MTL4::BufferRange primitiveDataBuffer); + void setPrimitiveDataElementSize(NS::UInteger primitiveDataElementSize); + void setPrimitiveDataStride(NS::UInteger primitiveDataStride); - bool allowDuplicateIntersectionFunctionInvocation() const; - - AccelerationStructureGeometryDescriptor* init(); - - NS::UInteger intersectionFunctionTableOffset() const; - - NS::String* label() const; - - bool opaque() const; - - BufferRange primitiveDataBuffer() const; - - NS::UInteger primitiveDataElementSize() const; - - NS::UInteger primitiveDataStride() const; - - void setAllowDuplicateIntersectionFunctionInvocation(bool allowDuplicateIntersectionFunctionInvocation); - - void setIntersectionFunctionTableOffset(NS::UInteger intersectionFunctionTableOffset); - - void setLabel(const NS::String* label); - - void setOpaque(bool opaque); - - void setPrimitiveDataBuffer(const MTL4::BufferRange primitiveDataBuffer); - - void setPrimitiveDataElementSize(NS::UInteger primitiveDataElementSize); - - void setPrimitiveDataStride(NS::UInteger primitiveDataStride); }; -class PrimitiveAccelerationStructureDescriptor : public NS::Copying + +class PrimitiveAccelerationStructureDescriptor : public NS::Referencing { public: static PrimitiveAccelerationStructureDescriptor* alloc(); + PrimitiveAccelerationStructureDescriptor* init() const; + + NS::Array* geometryDescriptors() const; + MTL::MotionBorderMode motionEndBorderMode() const; + float motionEndTime() const; + NS::UInteger motionKeyframeCount() const; + MTL::MotionBorderMode motionStartBorderMode() const; + float motionStartTime() const; + void setGeometryDescriptors(NS::Array* geometryDescriptors); + void setMotionEndBorderMode(MTL::MotionBorderMode motionEndBorderMode); + void setMotionEndTime(float motionEndTime); + void setMotionKeyframeCount(NS::UInteger motionKeyframeCount); + void setMotionStartBorderMode(MTL::MotionBorderMode motionStartBorderMode); + void setMotionStartTime(float motionStartTime); - NS::Array* geometryDescriptors() const; - - PrimitiveAccelerationStructureDescriptor* init(); - - MTL::MotionBorderMode motionEndBorderMode() const; - - float motionEndTime() const; - - NS::UInteger motionKeyframeCount() const; - - MTL::MotionBorderMode motionStartBorderMode() const; - - float motionStartTime() const; - - void setGeometryDescriptors(const NS::Array* geometryDescriptors); - - void setMotionEndBorderMode(MTL::MotionBorderMode motionEndBorderMode); - - void setMotionEndTime(float motionEndTime); - - void setMotionKeyframeCount(NS::UInteger motionKeyframeCount); - - void setMotionStartBorderMode(MTL::MotionBorderMode motionStartBorderMode); - - void setMotionStartTime(float motionStartTime); }; -class AccelerationStructureTriangleGeometryDescriptor : public NS::Copying + +class AccelerationStructureTriangleGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureTriangleGeometryDescriptor* alloc(); + AccelerationStructureTriangleGeometryDescriptor* init() const; + + MTL4::BufferRange indexBuffer() const; + MTL::IndexType indexType() const; + void setIndexBuffer(MTL4::BufferRange indexBuffer); + void setIndexType(MTL::IndexType indexType); + void setTransformationMatrixBuffer(MTL4::BufferRange transformationMatrixBuffer); + void setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout); + void setTriangleCount(NS::UInteger triangleCount); + void setVertexBuffer(MTL4::BufferRange vertexBuffer); + void setVertexFormat(MTL::AttributeFormat vertexFormat); + void setVertexStride(NS::UInteger vertexStride); + MTL4::BufferRange transformationMatrixBuffer() const; + MTL::MatrixLayout transformationMatrixLayout() const; + NS::UInteger triangleCount() const; + MTL4::BufferRange vertexBuffer() const; + MTL::AttributeFormat vertexFormat() const; + NS::UInteger vertexStride() const; - BufferRange indexBuffer() const; - - MTL::IndexType indexType() const; - - AccelerationStructureTriangleGeometryDescriptor* init(); - - void setIndexBuffer(const MTL4::BufferRange indexBuffer); - - void setIndexType(MTL::IndexType indexType); - - void setTransformationMatrixBuffer(const MTL4::BufferRange transformationMatrixBuffer); - - void setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout); - - void setTriangleCount(NS::UInteger triangleCount); - - void setVertexBuffer(const MTL4::BufferRange vertexBuffer); - - void setVertexFormat(MTL::AttributeFormat vertexFormat); - - void setVertexStride(NS::UInteger vertexStride); - - BufferRange transformationMatrixBuffer() const; - - MTL::MatrixLayout transformationMatrixLayout() const; - - NS::UInteger triangleCount() const; - - BufferRange vertexBuffer() const; - - MTL::AttributeFormat vertexFormat() const; - - NS::UInteger vertexStride() const; }; -class AccelerationStructureBoundingBoxGeometryDescriptor : public NS::Copying + +class AccelerationStructureBoundingBoxGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureBoundingBoxGeometryDescriptor* alloc(); + AccelerationStructureBoundingBoxGeometryDescriptor* init() const; - BufferRange boundingBoxBuffer() const; - - NS::UInteger boundingBoxCount() const; + MTL4::BufferRange boundingBoxBuffer() const; + NS::UInteger boundingBoxCount() const; + NS::UInteger boundingBoxStride() const; + void setBoundingBoxBuffer(MTL4::BufferRange boundingBoxBuffer); + void setBoundingBoxCount(NS::UInteger boundingBoxCount); + void setBoundingBoxStride(NS::UInteger boundingBoxStride); - NS::UInteger boundingBoxStride() const; - - AccelerationStructureBoundingBoxGeometryDescriptor* init(); - - void setBoundingBoxBuffer(const MTL4::BufferRange boundingBoxBuffer); - - void setBoundingBoxCount(NS::UInteger boundingBoxCount); - - void setBoundingBoxStride(NS::UInteger boundingBoxStride); }; -class AccelerationStructureMotionTriangleGeometryDescriptor : public NS::Copying + +class AccelerationStructureMotionTriangleGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureMotionTriangleGeometryDescriptor* alloc(); + AccelerationStructureMotionTriangleGeometryDescriptor* init() const; + + MTL4::BufferRange indexBuffer() const; + MTL::IndexType indexType() const; + void setIndexBuffer(MTL4::BufferRange indexBuffer); + void setIndexType(MTL::IndexType indexType); + void setTransformationMatrixBuffer(MTL4::BufferRange transformationMatrixBuffer); + void setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout); + void setTriangleCount(NS::UInteger triangleCount); + void setVertexBuffers(MTL4::BufferRange vertexBuffers); + void setVertexFormat(MTL::AttributeFormat vertexFormat); + void setVertexStride(NS::UInteger vertexStride); + MTL4::BufferRange transformationMatrixBuffer() const; + MTL::MatrixLayout transformationMatrixLayout() const; + NS::UInteger triangleCount() const; + MTL4::BufferRange vertexBuffers() const; + MTL::AttributeFormat vertexFormat() const; + NS::UInteger vertexStride() const; - BufferRange indexBuffer() const; - - MTL::IndexType indexType() const; - - AccelerationStructureMotionTriangleGeometryDescriptor* init(); - - void setIndexBuffer(const MTL4::BufferRange indexBuffer); - - void setIndexType(MTL::IndexType indexType); - - void setTransformationMatrixBuffer(const MTL4::BufferRange transformationMatrixBuffer); - - void setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout); - - void setTriangleCount(NS::UInteger triangleCount); - - void setVertexBuffers(const MTL4::BufferRange vertexBuffers); - - void setVertexFormat(MTL::AttributeFormat vertexFormat); - - void setVertexStride(NS::UInteger vertexStride); - - BufferRange transformationMatrixBuffer() const; - - MTL::MatrixLayout transformationMatrixLayout() const; - - NS::UInteger triangleCount() const; - - BufferRange vertexBuffers() const; - - MTL::AttributeFormat vertexFormat() const; - - NS::UInteger vertexStride() const; }; -class AccelerationStructureMotionBoundingBoxGeometryDescriptor : public NS::Copying + +class AccelerationStructureMotionBoundingBoxGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureMotionBoundingBoxGeometryDescriptor* alloc(); + AccelerationStructureMotionBoundingBoxGeometryDescriptor* init() const; - BufferRange boundingBoxBuffers() const; - - NS::UInteger boundingBoxCount() const; - - NS::UInteger boundingBoxStride() const; - - AccelerationStructureMotionBoundingBoxGeometryDescriptor* init(); + MTL4::BufferRange boundingBoxBuffers() const; + NS::UInteger boundingBoxCount() const; + NS::UInteger boundingBoxStride() const; + void setBoundingBoxBuffers(MTL4::BufferRange boundingBoxBuffers); + void setBoundingBoxCount(NS::UInteger boundingBoxCount); + void setBoundingBoxStride(NS::UInteger boundingBoxStride); - void setBoundingBoxBuffers(const MTL4::BufferRange boundingBoxBuffers); - - void setBoundingBoxCount(NS::UInteger boundingBoxCount); - - void setBoundingBoxStride(NS::UInteger boundingBoxStride); }; -class AccelerationStructureCurveGeometryDescriptor : public NS::Copying + +class AccelerationStructureCurveGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureCurveGeometryDescriptor* alloc(); + AccelerationStructureCurveGeometryDescriptor* init() const; + + MTL4::BufferRange controlPointBuffer() const; + NS::UInteger controlPointCount() const; + MTL::AttributeFormat controlPointFormat() const; + NS::UInteger controlPointStride() const; + MTL::CurveBasis curveBasis() const; + MTL::CurveEndCaps curveEndCaps() const; + MTL::CurveType curveType() const; + MTL4::BufferRange indexBuffer() const; + MTL::IndexType indexType() const; + MTL4::BufferRange radiusBuffer() const; + MTL::AttributeFormat radiusFormat() const; + NS::UInteger radiusStride() const; + NS::UInteger segmentControlPointCount() const; + NS::UInteger segmentCount() const; + void setControlPointBuffer(MTL4::BufferRange controlPointBuffer); + void setControlPointCount(NS::UInteger controlPointCount); + void setControlPointFormat(MTL::AttributeFormat controlPointFormat); + void setControlPointStride(NS::UInteger controlPointStride); + void setCurveBasis(MTL::CurveBasis curveBasis); + void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); + void setCurveType(MTL::CurveType curveType); + void setIndexBuffer(MTL4::BufferRange indexBuffer); + void setIndexType(MTL::IndexType indexType); + void setRadiusBuffer(MTL4::BufferRange radiusBuffer); + void setRadiusFormat(MTL::AttributeFormat radiusFormat); + void setRadiusStride(NS::UInteger radiusStride); + void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); + void setSegmentCount(NS::UInteger segmentCount); - BufferRange controlPointBuffer() const; - - NS::UInteger controlPointCount() const; - - MTL::AttributeFormat controlPointFormat() const; - - NS::UInteger controlPointStride() const; - - MTL::CurveBasis curveBasis() const; - - MTL::CurveEndCaps curveEndCaps() const; - - MTL::CurveType curveType() const; - - BufferRange indexBuffer() const; - - MTL::IndexType indexType() const; - - AccelerationStructureCurveGeometryDescriptor* init(); - - BufferRange radiusBuffer() const; - - MTL::AttributeFormat radiusFormat() const; - - NS::UInteger radiusStride() const; - - NS::UInteger segmentControlPointCount() const; - - NS::UInteger segmentCount() const; - - void setControlPointBuffer(const MTL4::BufferRange controlPointBuffer); - - void setControlPointCount(NS::UInteger controlPointCount); - - void setControlPointFormat(MTL::AttributeFormat controlPointFormat); - - void setControlPointStride(NS::UInteger controlPointStride); - - void setCurveBasis(MTL::CurveBasis curveBasis); - - void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); - - void setCurveType(MTL::CurveType curveType); - - void setIndexBuffer(const MTL4::BufferRange indexBuffer); - - void setIndexType(MTL::IndexType indexType); - - void setRadiusBuffer(const MTL4::BufferRange radiusBuffer); - - void setRadiusFormat(MTL::AttributeFormat radiusFormat); - - void setRadiusStride(NS::UInteger radiusStride); - - void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); - - void setSegmentCount(NS::UInteger segmentCount); }; -class AccelerationStructureMotionCurveGeometryDescriptor : public NS::Copying + +class AccelerationStructureMotionCurveGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureMotionCurveGeometryDescriptor* alloc(); + AccelerationStructureMotionCurveGeometryDescriptor* init() const; + + MTL4::BufferRange controlPointBuffers() const; + NS::UInteger controlPointCount() const; + MTL::AttributeFormat controlPointFormat() const; + NS::UInteger controlPointStride() const; + MTL::CurveBasis curveBasis() const; + MTL::CurveEndCaps curveEndCaps() const; + MTL::CurveType curveType() const; + MTL4::BufferRange indexBuffer() const; + MTL::IndexType indexType() const; + MTL4::BufferRange radiusBuffers() const; + MTL::AttributeFormat radiusFormat() const; + NS::UInteger radiusStride() const; + NS::UInteger segmentControlPointCount() const; + NS::UInteger segmentCount() const; + void setControlPointBuffers(MTL4::BufferRange controlPointBuffers); + void setControlPointCount(NS::UInteger controlPointCount); + void setControlPointFormat(MTL::AttributeFormat controlPointFormat); + void setControlPointStride(NS::UInteger controlPointStride); + void setCurveBasis(MTL::CurveBasis curveBasis); + void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); + void setCurveType(MTL::CurveType curveType); + void setIndexBuffer(MTL4::BufferRange indexBuffer); + void setIndexType(MTL::IndexType indexType); + void setRadiusBuffers(MTL4::BufferRange radiusBuffers); + void setRadiusFormat(MTL::AttributeFormat radiusFormat); + void setRadiusStride(NS::UInteger radiusStride); + void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); + void setSegmentCount(NS::UInteger segmentCount); - BufferRange controlPointBuffers() const; - - NS::UInteger controlPointCount() const; - - MTL::AttributeFormat controlPointFormat() const; - - NS::UInteger controlPointStride() const; - - MTL::CurveBasis curveBasis() const; - - MTL::CurveEndCaps curveEndCaps() const; - - MTL::CurveType curveType() const; - - BufferRange indexBuffer() const; - - MTL::IndexType indexType() const; - - AccelerationStructureMotionCurveGeometryDescriptor* init(); - - BufferRange radiusBuffers() const; - - MTL::AttributeFormat radiusFormat() const; - - NS::UInteger radiusStride() const; - - NS::UInteger segmentControlPointCount() const; - - NS::UInteger segmentCount() const; - - void setControlPointBuffers(const MTL4::BufferRange controlPointBuffers); - - void setControlPointCount(NS::UInteger controlPointCount); - - void setControlPointFormat(MTL::AttributeFormat controlPointFormat); - - void setControlPointStride(NS::UInteger controlPointStride); - - void setCurveBasis(MTL::CurveBasis curveBasis); - - void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); - - void setCurveType(MTL::CurveType curveType); - - void setIndexBuffer(const MTL4::BufferRange indexBuffer); - - void setIndexType(MTL::IndexType indexType); - - void setRadiusBuffers(const MTL4::BufferRange radiusBuffers); - - void setRadiusFormat(MTL::AttributeFormat radiusFormat); - - void setRadiusStride(NS::UInteger radiusStride); - - void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); - - void setSegmentCount(NS::UInteger segmentCount); }; -class InstanceAccelerationStructureDescriptor : public NS::Copying + +class InstanceAccelerationStructureDescriptor : public NS::Referencing { public: - static InstanceAccelerationStructureDescriptor* alloc(); - - InstanceAccelerationStructureDescriptor* init(); + static InstanceAccelerationStructureDescriptor* alloc(); + InstanceAccelerationStructureDescriptor* init() const; NS::UInteger instanceCount() const; - - BufferRange instanceDescriptorBuffer() const; - + MTL4::BufferRange instanceDescriptorBuffer() const; NS::UInteger instanceDescriptorStride() const; - MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType() const; - MTL::MatrixLayout instanceTransformationMatrixLayout() const; - - BufferRange motionTransformBuffer() const; - + MTL4::BufferRange motionTransformBuffer() const; NS::UInteger motionTransformCount() const; - NS::UInteger motionTransformStride() const; - MTL::TransformType motionTransformType() const; - void setInstanceCount(NS::UInteger instanceCount); - - void setInstanceDescriptorBuffer(const MTL4::BufferRange instanceDescriptorBuffer); - + void setInstanceDescriptorBuffer(MTL4::BufferRange instanceDescriptorBuffer); void setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride); - void setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType); - void setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout); - - void setMotionTransformBuffer(const MTL4::BufferRange motionTransformBuffer); - + void setMotionTransformBuffer(MTL4::BufferRange motionTransformBuffer); void setMotionTransformCount(NS::UInteger motionTransformCount); - void setMotionTransformStride(NS::UInteger motionTransformStride); - void setMotionTransformType(MTL::TransformType motionTransformType); + }; -class IndirectInstanceAccelerationStructureDescriptor : public NS::Copying + +class IndirectInstanceAccelerationStructureDescriptor : public NS::Referencing { public: static IndirectInstanceAccelerationStructureDescriptor* alloc(); + IndirectInstanceAccelerationStructureDescriptor* init() const; - IndirectInstanceAccelerationStructureDescriptor* init(); - - BufferRange instanceCountBuffer() const; - - BufferRange instanceDescriptorBuffer() const; - - NS::UInteger instanceDescriptorStride() const; - - MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType() const; - - MTL::MatrixLayout instanceTransformationMatrixLayout() const; - - NS::UInteger maxInstanceCount() const; - - NS::UInteger maxMotionTransformCount() const; - - BufferRange motionTransformBuffer() const; - - BufferRange motionTransformCountBuffer() const; - - NS::UInteger motionTransformStride() const; - - MTL::TransformType motionTransformType() const; - - void setInstanceCountBuffer(const MTL4::BufferRange instanceCountBuffer); - - void setInstanceDescriptorBuffer(const MTL4::BufferRange instanceDescriptorBuffer); - - void setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride); - - void setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType); - - void setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout); - - void setMaxInstanceCount(NS::UInteger maxInstanceCount); - - void setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount); + MTL4::BufferRange instanceCountBuffer() const; + MTL4::BufferRange instanceDescriptorBuffer() const; + NS::UInteger instanceDescriptorStride() const; + MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType() const; + MTL::MatrixLayout instanceTransformationMatrixLayout() const; + NS::UInteger maxInstanceCount() const; + NS::UInteger maxMotionTransformCount() const; + MTL4::BufferRange motionTransformBuffer() const; + MTL4::BufferRange motionTransformCountBuffer() const; + NS::UInteger motionTransformStride() const; + MTL::TransformType motionTransformType() const; + void setInstanceCountBuffer(MTL4::BufferRange instanceCountBuffer); + void setInstanceDescriptorBuffer(MTL4::BufferRange instanceDescriptorBuffer); + void setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride); + void setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType); + void setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout); + void setMaxInstanceCount(NS::UInteger maxInstanceCount); + void setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount); + void setMotionTransformBuffer(MTL4::BufferRange motionTransformBuffer); + void setMotionTransformCountBuffer(MTL4::BufferRange motionTransformCountBuffer); + void setMotionTransformStride(NS::UInteger motionTransformStride); + void setMotionTransformType(MTL::TransformType motionTransformType); - void setMotionTransformBuffer(const MTL4::BufferRange motionTransformBuffer); +}; - void setMotionTransformCountBuffer(const MTL4::BufferRange motionTransformCountBuffer); +} // namespace MTL4 - void setMotionTransformStride(NS::UInteger motionTransformStride); +// --- Class symbols + inline implementations --- - void setMotionTransformType(MTL::TransformType motionTransformType); -}; +extern "C" void *OBJC_CLASS_$_MTL4AccelerationStructureDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4AccelerationStructureGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4PrimitiveAccelerationStructureDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4AccelerationStructureTriangleGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4AccelerationStructureBoundingBoxGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4AccelerationStructureMotionTriangleGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4AccelerationStructureMotionBoundingBoxGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4AccelerationStructureCurveGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4AccelerationStructureMotionCurveGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4InstanceAccelerationStructureDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4IndirectInstanceAccelerationStructureDescriptor; -} -_MTL_INLINE MTL4::AccelerationStructureDescriptor* MTL4::AccelerationStructureDescriptor::alloc() +_MTL4_INLINE MTL4::AccelerationStructureDescriptor* MTL4::AccelerationStructureDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4AccelerationStructureDescriptor)); + return _MTL4_msg_MTL4__AccelerationStructureDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4AccelerationStructureDescriptor, nullptr); } -_MTL_INLINE MTL4::AccelerationStructureDescriptor* MTL4::AccelerationStructureDescriptor::init() +_MTL4_INLINE MTL4::AccelerationStructureDescriptor* MTL4::AccelerationStructureDescriptor::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__AccelerationStructureDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::AccelerationStructureGeometryDescriptor* MTL4::AccelerationStructureGeometryDescriptor::alloc() +_MTL4_INLINE MTL4::AccelerationStructureGeometryDescriptor* MTL4::AccelerationStructureGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4AccelerationStructureGeometryDescriptor)); + return _MTL4_msg_MTL4__AccelerationStructureGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4AccelerationStructureGeometryDescriptor, nullptr); } -_MTL_INLINE bool MTL4::AccelerationStructureGeometryDescriptor::allowDuplicateIntersectionFunctionInvocation() const +_MTL4_INLINE MTL4::AccelerationStructureGeometryDescriptor* MTL4::AccelerationStructureGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allowDuplicateIntersectionFunctionInvocation)); + return _MTL4_msg_MTL4__AccelerationStructureGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::AccelerationStructureGeometryDescriptor* MTL4::AccelerationStructureGeometryDescriptor::init() +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureGeometryDescriptor::intersectionFunctionTableOffset() const { - return NS::Object::init(); + return _MTL4_msg_NS__UInteger_intersectionFunctionTableOffset((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureGeometryDescriptor::intersectionFunctionTableOffset() const +_MTL4_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setIntersectionFunctionTableOffset(NS::UInteger intersectionFunctionTableOffset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(intersectionFunctionTableOffset)); + _MTL4_msg_v_setIntersectionFunctionTableOffset__NS__UInteger((const void*)this, nullptr, intersectionFunctionTableOffset); } -_MTL_INLINE NS::String* MTL4::AccelerationStructureGeometryDescriptor::label() const +_MTL4_INLINE bool MTL4::AccelerationStructureGeometryDescriptor::opaque() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL4_msg_bool_opaque((const void*)this, nullptr); } -_MTL_INLINE bool MTL4::AccelerationStructureGeometryDescriptor::opaque() const +_MTL4_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setOpaque(bool opaque) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(opaque)); + _MTL4_msg_v_setOpaque__bool((const void*)this, nullptr, opaque); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureGeometryDescriptor::primitiveDataBuffer() const +_MTL4_INLINE bool MTL4::AccelerationStructureGeometryDescriptor::allowDuplicateIntersectionFunctionInvocation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(primitiveDataBuffer)); + return _MTL4_msg_bool_allowDuplicateIntersectionFunctionInvocation((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureGeometryDescriptor::primitiveDataElementSize() const +_MTL4_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setAllowDuplicateIntersectionFunctionInvocation(bool allowDuplicateIntersectionFunctionInvocation) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(primitiveDataElementSize)); + _MTL4_msg_v_setAllowDuplicateIntersectionFunctionInvocation__bool((const void*)this, nullptr, allowDuplicateIntersectionFunctionInvocation); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureGeometryDescriptor::primitiveDataStride() const +_MTL4_INLINE NS::String* MTL4::AccelerationStructureGeometryDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(primitiveDataStride)); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setAllowDuplicateIntersectionFunctionInvocation(bool allowDuplicateIntersectionFunctionInvocation) +_MTL4_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAllowDuplicateIntersectionFunctionInvocation_), allowDuplicateIntersectionFunctionInvocation); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setIntersectionFunctionTableOffset(NS::UInteger intersectionFunctionTableOffset) +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureGeometryDescriptor::primitiveDataBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIntersectionFunctionTableOffset_), intersectionFunctionTableOffset); + return _MTL4_msg_MTL4__BufferRange_primitiveDataBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setLabel(const NS::String* label) +_MTL4_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setPrimitiveDataBuffer(MTL4::BufferRange primitiveDataBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL4_msg_v_setPrimitiveDataBuffer__MTL4__BufferRange((const void*)this, nullptr, primitiveDataBuffer); } -_MTL_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setOpaque(bool opaque) +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureGeometryDescriptor::primitiveDataStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaque_), opaque); + return _MTL4_msg_NS__UInteger_primitiveDataStride((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setPrimitiveDataBuffer(const MTL4::BufferRange primitiveDataBuffer) +_MTL4_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setPrimitiveDataStride(NS::UInteger primitiveDataStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPrimitiveDataBuffer_), primitiveDataBuffer); + _MTL4_msg_v_setPrimitiveDataStride__NS__UInteger((const void*)this, nullptr, primitiveDataStride); } -_MTL_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setPrimitiveDataElementSize(NS::UInteger primitiveDataElementSize) +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureGeometryDescriptor::primitiveDataElementSize() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPrimitiveDataElementSize_), primitiveDataElementSize); + return _MTL4_msg_NS__UInteger_primitiveDataElementSize((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setPrimitiveDataStride(NS::UInteger primitiveDataStride) +_MTL4_INLINE void MTL4::AccelerationStructureGeometryDescriptor::setPrimitiveDataElementSize(NS::UInteger primitiveDataElementSize) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPrimitiveDataStride_), primitiveDataStride); + _MTL4_msg_v_setPrimitiveDataElementSize__NS__UInteger((const void*)this, nullptr, primitiveDataElementSize); } -_MTL_INLINE MTL4::PrimitiveAccelerationStructureDescriptor* MTL4::PrimitiveAccelerationStructureDescriptor::alloc() +_MTL4_INLINE MTL4::PrimitiveAccelerationStructureDescriptor* MTL4::PrimitiveAccelerationStructureDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4PrimitiveAccelerationStructureDescriptor)); + return _MTL4_msg_MTL4__PrimitiveAccelerationStructureDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4PrimitiveAccelerationStructureDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL4::PrimitiveAccelerationStructureDescriptor::geometryDescriptors() const +_MTL4_INLINE MTL4::PrimitiveAccelerationStructureDescriptor* MTL4::PrimitiveAccelerationStructureDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(geometryDescriptors)); + return _MTL4_msg_MTL4__PrimitiveAccelerationStructureDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::PrimitiveAccelerationStructureDescriptor* MTL4::PrimitiveAccelerationStructureDescriptor::init() +_MTL4_INLINE NS::Array* MTL4::PrimitiveAccelerationStructureDescriptor::geometryDescriptors() const { - return NS::Object::init(); + return _MTL4_msg_NS__Arrayp_geometryDescriptors((const void*)this, nullptr); } -_MTL_INLINE MTL::MotionBorderMode MTL4::PrimitiveAccelerationStructureDescriptor::motionEndBorderMode() const +_MTL4_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setGeometryDescriptors(NS::Array* geometryDescriptors) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionEndBorderMode)); + _MTL4_msg_v_setGeometryDescriptors__NS__Arrayp((const void*)this, nullptr, geometryDescriptors); } -_MTL_INLINE float MTL4::PrimitiveAccelerationStructureDescriptor::motionEndTime() const +_MTL4_INLINE MTL::MotionBorderMode MTL4::PrimitiveAccelerationStructureDescriptor::motionStartBorderMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionEndTime)); + return _MTL4_msg_MTL__MotionBorderMode_motionStartBorderMode((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::PrimitiveAccelerationStructureDescriptor::motionKeyframeCount() const +_MTL4_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setMotionStartBorderMode(MTL::MotionBorderMode motionStartBorderMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionKeyframeCount)); + _MTL4_msg_v_setMotionStartBorderMode__MTL__MotionBorderMode((const void*)this, nullptr, motionStartBorderMode); } -_MTL_INLINE MTL::MotionBorderMode MTL4::PrimitiveAccelerationStructureDescriptor::motionStartBorderMode() const +_MTL4_INLINE MTL::MotionBorderMode MTL4::PrimitiveAccelerationStructureDescriptor::motionEndBorderMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionStartBorderMode)); + return _MTL4_msg_MTL__MotionBorderMode_motionEndBorderMode((const void*)this, nullptr); } -_MTL_INLINE float MTL4::PrimitiveAccelerationStructureDescriptor::motionStartTime() const +_MTL4_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setMotionEndBorderMode(MTL::MotionBorderMode motionEndBorderMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionStartTime)); + _MTL4_msg_v_setMotionEndBorderMode__MTL__MotionBorderMode((const void*)this, nullptr, motionEndBorderMode); } -_MTL_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setGeometryDescriptors(const NS::Array* geometryDescriptors) +_MTL4_INLINE float MTL4::PrimitiveAccelerationStructureDescriptor::motionStartTime() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setGeometryDescriptors_), geometryDescriptors); + return _MTL4_msg_float_motionStartTime((const void*)this, nullptr); } -_MTL_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setMotionEndBorderMode(MTL::MotionBorderMode motionEndBorderMode) +_MTL4_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setMotionStartTime(float motionStartTime) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionEndBorderMode_), motionEndBorderMode); + _MTL4_msg_v_setMotionStartTime__float((const void*)this, nullptr, motionStartTime); } -_MTL_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setMotionEndTime(float motionEndTime) +_MTL4_INLINE float MTL4::PrimitiveAccelerationStructureDescriptor::motionEndTime() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionEndTime_), motionEndTime); + return _MTL4_msg_float_motionEndTime((const void*)this, nullptr); } -_MTL_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setMotionKeyframeCount(NS::UInteger motionKeyframeCount) +_MTL4_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setMotionEndTime(float motionEndTime) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionKeyframeCount_), motionKeyframeCount); + _MTL4_msg_v_setMotionEndTime__float((const void*)this, nullptr, motionEndTime); } -_MTL_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setMotionStartBorderMode(MTL::MotionBorderMode motionStartBorderMode) +_MTL4_INLINE NS::UInteger MTL4::PrimitiveAccelerationStructureDescriptor::motionKeyframeCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionStartBorderMode_), motionStartBorderMode); + return _MTL4_msg_NS__UInteger_motionKeyframeCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setMotionStartTime(float motionStartTime) +_MTL4_INLINE void MTL4::PrimitiveAccelerationStructureDescriptor::setMotionKeyframeCount(NS::UInteger motionKeyframeCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionStartTime_), motionStartTime); + _MTL4_msg_v_setMotionKeyframeCount__NS__UInteger((const void*)this, nullptr, motionKeyframeCount); } -_MTL_INLINE MTL4::AccelerationStructureTriangleGeometryDescriptor* MTL4::AccelerationStructureTriangleGeometryDescriptor::alloc() +_MTL4_INLINE MTL4::AccelerationStructureTriangleGeometryDescriptor* MTL4::AccelerationStructureTriangleGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4AccelerationStructureTriangleGeometryDescriptor)); + return _MTL4_msg_MTL4__AccelerationStructureTriangleGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4AccelerationStructureTriangleGeometryDescriptor, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureTriangleGeometryDescriptor::indexBuffer() const +_MTL4_INLINE MTL4::AccelerationStructureTriangleGeometryDescriptor* MTL4::AccelerationStructureTriangleGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); + return _MTL4_msg_MTL4__AccelerationStructureTriangleGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::IndexType MTL4::AccelerationStructureTriangleGeometryDescriptor::indexType() const +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureTriangleGeometryDescriptor::vertexBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + return _MTL4_msg_MTL4__BufferRange_vertexBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL4::AccelerationStructureTriangleGeometryDescriptor* MTL4::AccelerationStructureTriangleGeometryDescriptor::init() +_MTL4_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setVertexBuffer(MTL4::BufferRange vertexBuffer) { - return NS::Object::init(); + _MTL4_msg_v_setVertexBuffer__MTL4__BufferRange((const void*)this, nullptr, vertexBuffer); } -_MTL_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setIndexBuffer(const MTL4::BufferRange indexBuffer) +_MTL4_INLINE MTL::AttributeFormat MTL4::AccelerationStructureTriangleGeometryDescriptor::vertexFormat() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); + return _MTL4_msg_MTL__AttributeFormat_vertexFormat((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setIndexType(MTL::IndexType indexType) +_MTL4_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setVertexFormat(MTL::AttributeFormat vertexFormat) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); + _MTL4_msg_v_setVertexFormat__MTL__AttributeFormat((const void*)this, nullptr, vertexFormat); } -_MTL_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setTransformationMatrixBuffer(const MTL4::BufferRange transformationMatrixBuffer) +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureTriangleGeometryDescriptor::vertexStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTransformationMatrixBuffer_), transformationMatrixBuffer); + return _MTL4_msg_NS__UInteger_vertexStride((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout) +_MTL4_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setVertexStride(NS::UInteger vertexStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTransformationMatrixLayout_), transformationMatrixLayout); + _MTL4_msg_v_setVertexStride__NS__UInteger((const void*)this, nullptr, vertexStride); } -_MTL_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setTriangleCount(NS::UInteger triangleCount) +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureTriangleGeometryDescriptor::indexBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTriangleCount_), triangleCount); + return _MTL4_msg_MTL4__BufferRange_indexBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setVertexBuffer(const MTL4::BufferRange vertexBuffer) +_MTL4_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setIndexBuffer(MTL4::BufferRange indexBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffer_), vertexBuffer); + _MTL4_msg_v_setIndexBuffer__MTL4__BufferRange((const void*)this, nullptr, indexBuffer); } -_MTL_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setVertexFormat(MTL::AttributeFormat vertexFormat) +_MTL4_INLINE MTL::IndexType MTL4::AccelerationStructureTriangleGeometryDescriptor::indexType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexFormat_), vertexFormat); + return _MTL4_msg_MTL__IndexType_indexType((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setVertexStride(NS::UInteger vertexStride) +_MTL4_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setIndexType(MTL::IndexType indexType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexStride_), vertexStride); + _MTL4_msg_v_setIndexType__MTL__IndexType((const void*)this, nullptr, indexType); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureTriangleGeometryDescriptor::transformationMatrixBuffer() const +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureTriangleGeometryDescriptor::triangleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(transformationMatrixBuffer)); + return _MTL4_msg_NS__UInteger_triangleCount((const void*)this, nullptr); } -_MTL_INLINE MTL::MatrixLayout MTL4::AccelerationStructureTriangleGeometryDescriptor::transformationMatrixLayout() const +_MTL4_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setTriangleCount(NS::UInteger triangleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(transformationMatrixLayout)); + _MTL4_msg_v_setTriangleCount__NS__UInteger((const void*)this, nullptr, triangleCount); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureTriangleGeometryDescriptor::triangleCount() const +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureTriangleGeometryDescriptor::transformationMatrixBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(triangleCount)); + return _MTL4_msg_MTL4__BufferRange_transformationMatrixBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureTriangleGeometryDescriptor::vertexBuffer() const +_MTL4_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setTransformationMatrixBuffer(MTL4::BufferRange transformationMatrixBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexBuffer)); + _MTL4_msg_v_setTransformationMatrixBuffer__MTL4__BufferRange((const void*)this, nullptr, transformationMatrixBuffer); } -_MTL_INLINE MTL::AttributeFormat MTL4::AccelerationStructureTriangleGeometryDescriptor::vertexFormat() const +_MTL4_INLINE MTL::MatrixLayout MTL4::AccelerationStructureTriangleGeometryDescriptor::transformationMatrixLayout() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexFormat)); + return _MTL4_msg_MTL__MatrixLayout_transformationMatrixLayout((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureTriangleGeometryDescriptor::vertexStride() const +_MTL4_INLINE void MTL4::AccelerationStructureTriangleGeometryDescriptor::setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexStride)); + _MTL4_msg_v_setTransformationMatrixLayout__MTL__MatrixLayout((const void*)this, nullptr, transformationMatrixLayout); } -_MTL_INLINE MTL4::AccelerationStructureBoundingBoxGeometryDescriptor* MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::alloc() +_MTL4_INLINE MTL4::AccelerationStructureBoundingBoxGeometryDescriptor* MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4AccelerationStructureBoundingBoxGeometryDescriptor)); + return _MTL4_msg_MTL4__AccelerationStructureBoundingBoxGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4AccelerationStructureBoundingBoxGeometryDescriptor, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxBuffer() const +_MTL4_INLINE MTL4::AccelerationStructureBoundingBoxGeometryDescriptor* MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxBuffer)); + return _MTL4_msg_MTL4__AccelerationStructureBoundingBoxGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxCount() const +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxCount)); + return _MTL4_msg_MTL4__BufferRange_boundingBoxBuffer((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxStride() const +_MTL4_INLINE void MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxBuffer(MTL4::BufferRange boundingBoxBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxStride)); + _MTL4_msg_v_setBoundingBoxBuffer__MTL4__BufferRange((const void*)this, nullptr, boundingBoxBuffer); } -_MTL_INLINE MTL4::AccelerationStructureBoundingBoxGeometryDescriptor* MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::init() +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxStride() const { - return NS::Object::init(); + return _MTL4_msg_NS__UInteger_boundingBoxStride((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxBuffer(const MTL4::BufferRange boundingBoxBuffer) +_MTL4_INLINE void MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxStride(NS::UInteger boundingBoxStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxBuffer_), boundingBoxBuffer); + _MTL4_msg_v_setBoundingBoxStride__NS__UInteger((const void*)this, nullptr, boundingBoxStride); } -_MTL_INLINE void MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxCount(NS::UInteger boundingBoxCount) +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxCount_), boundingBoxCount); + return _MTL4_msg_NS__UInteger_boundingBoxCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxStride(NS::UInteger boundingBoxStride) +_MTL4_INLINE void MTL4::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxCount(NS::UInteger boundingBoxCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxStride_), boundingBoxStride); + _MTL4_msg_v_setBoundingBoxCount__NS__UInteger((const void*)this, nullptr, boundingBoxCount); } -_MTL_INLINE MTL4::AccelerationStructureMotionTriangleGeometryDescriptor* MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::alloc() +_MTL4_INLINE MTL4::AccelerationStructureMotionTriangleGeometryDescriptor* MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4AccelerationStructureMotionTriangleGeometryDescriptor)); + return _MTL4_msg_MTL4__AccelerationStructureMotionTriangleGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4AccelerationStructureMotionTriangleGeometryDescriptor, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::indexBuffer() const +_MTL4_INLINE MTL4::AccelerationStructureMotionTriangleGeometryDescriptor* MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); + return _MTL4_msg_MTL4__AccelerationStructureMotionTriangleGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::IndexType MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::indexType() const +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::vertexBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + return _MTL4_msg_MTL4__BufferRange_vertexBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL4::AccelerationStructureMotionTriangleGeometryDescriptor* MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::init() +_MTL4_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexBuffers(MTL4::BufferRange vertexBuffers) { - return NS::Object::init(); + _MTL4_msg_v_setVertexBuffers__MTL4__BufferRange((const void*)this, nullptr, vertexBuffers); } -_MTL_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setIndexBuffer(const MTL4::BufferRange indexBuffer) +_MTL4_INLINE MTL::AttributeFormat MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::vertexFormat() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); + return _MTL4_msg_MTL__AttributeFormat_vertexFormat((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setIndexType(MTL::IndexType indexType) +_MTL4_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexFormat(MTL::AttributeFormat vertexFormat) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); + _MTL4_msg_v_setVertexFormat__MTL__AttributeFormat((const void*)this, nullptr, vertexFormat); } -_MTL_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setTransformationMatrixBuffer(const MTL4::BufferRange transformationMatrixBuffer) +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::vertexStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTransformationMatrixBuffer_), transformationMatrixBuffer); + return _MTL4_msg_NS__UInteger_vertexStride((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout) +_MTL4_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexStride(NS::UInteger vertexStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTransformationMatrixLayout_), transformationMatrixLayout); + _MTL4_msg_v_setVertexStride__NS__UInteger((const void*)this, nullptr, vertexStride); } -_MTL_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setTriangleCount(NS::UInteger triangleCount) +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::indexBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTriangleCount_), triangleCount); + return _MTL4_msg_MTL4__BufferRange_indexBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexBuffers(const MTL4::BufferRange vertexBuffers) +_MTL4_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setIndexBuffer(MTL4::BufferRange indexBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffers_), vertexBuffers); + _MTL4_msg_v_setIndexBuffer__MTL4__BufferRange((const void*)this, nullptr, indexBuffer); } -_MTL_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexFormat(MTL::AttributeFormat vertexFormat) +_MTL4_INLINE MTL::IndexType MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::indexType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexFormat_), vertexFormat); + return _MTL4_msg_MTL__IndexType_indexType((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexStride(NS::UInteger vertexStride) +_MTL4_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setIndexType(MTL::IndexType indexType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexStride_), vertexStride); + _MTL4_msg_v_setIndexType__MTL__IndexType((const void*)this, nullptr, indexType); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::transformationMatrixBuffer() const +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::triangleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(transformationMatrixBuffer)); + return _MTL4_msg_NS__UInteger_triangleCount((const void*)this, nullptr); } -_MTL_INLINE MTL::MatrixLayout MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::transformationMatrixLayout() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setTriangleCount(NS::UInteger triangleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(transformationMatrixLayout)); + _MTL4_msg_v_setTriangleCount__NS__UInteger((const void*)this, nullptr, triangleCount); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::triangleCount() const +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::transformationMatrixBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(triangleCount)); + return _MTL4_msg_MTL4__BufferRange_transformationMatrixBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::vertexBuffers() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setTransformationMatrixBuffer(MTL4::BufferRange transformationMatrixBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexBuffers)); + _MTL4_msg_v_setTransformationMatrixBuffer__MTL4__BufferRange((const void*)this, nullptr, transformationMatrixBuffer); } -_MTL_INLINE MTL::AttributeFormat MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::vertexFormat() const +_MTL4_INLINE MTL::MatrixLayout MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::transformationMatrixLayout() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexFormat)); + return _MTL4_msg_MTL__MatrixLayout_transformationMatrixLayout((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::vertexStride() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionTriangleGeometryDescriptor::setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexStride)); + _MTL4_msg_v_setTransformationMatrixLayout__MTL__MatrixLayout((const void*)this, nullptr, transformationMatrixLayout); } -_MTL_INLINE MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::alloc() +_MTL4_INLINE MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4AccelerationStructureMotionBoundingBoxGeometryDescriptor)); + return _MTL4_msg_MTL4__AccelerationStructureMotionBoundingBoxGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4AccelerationStructureMotionBoundingBoxGeometryDescriptor, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxBuffers() const +_MTL4_INLINE MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxBuffers)); + return _MTL4_msg_MTL4__AccelerationStructureMotionBoundingBoxGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxCount() const +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxCount)); + return _MTL4_msg_MTL4__BufferRange_boundingBoxBuffers((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxStride() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxBuffers(MTL4::BufferRange boundingBoxBuffers) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxStride)); + _MTL4_msg_v_setBoundingBoxBuffers__MTL4__BufferRange((const void*)this, nullptr, boundingBoxBuffers); } -_MTL_INLINE MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::init() +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxStride() const { - return NS::Object::init(); + return _MTL4_msg_NS__UInteger_boundingBoxStride((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxBuffers(const MTL4::BufferRange boundingBoxBuffers) +_MTL4_INLINE void MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxStride(NS::UInteger boundingBoxStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxBuffers_), boundingBoxBuffers); + _MTL4_msg_v_setBoundingBoxStride__NS__UInteger((const void*)this, nullptr, boundingBoxStride); } -_MTL_INLINE void MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxCount(NS::UInteger boundingBoxCount) +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxCount_), boundingBoxCount); + return _MTL4_msg_NS__UInteger_boundingBoxCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxStride(NS::UInteger boundingBoxStride) +_MTL4_INLINE void MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxCount(NS::UInteger boundingBoxCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxStride_), boundingBoxStride); + _MTL4_msg_v_setBoundingBoxCount__NS__UInteger((const void*)this, nullptr, boundingBoxCount); } -_MTL_INLINE MTL4::AccelerationStructureCurveGeometryDescriptor* MTL4::AccelerationStructureCurveGeometryDescriptor::alloc() +_MTL4_INLINE MTL4::AccelerationStructureCurveGeometryDescriptor* MTL4::AccelerationStructureCurveGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4AccelerationStructureCurveGeometryDescriptor)); + return _MTL4_msg_MTL4__AccelerationStructureCurveGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4AccelerationStructureCurveGeometryDescriptor, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureCurveGeometryDescriptor::controlPointBuffer() const +_MTL4_INLINE MTL4::AccelerationStructureCurveGeometryDescriptor* MTL4::AccelerationStructureCurveGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBuffer)); + return _MTL4_msg_MTL4__AccelerationStructureCurveGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureCurveGeometryDescriptor::controlPointCount() const +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureCurveGeometryDescriptor::controlPointBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointCount)); + return _MTL4_msg_MTL4__BufferRange_controlPointBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::AttributeFormat MTL4::AccelerationStructureCurveGeometryDescriptor::controlPointFormat() const +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setControlPointBuffer(MTL4::BufferRange controlPointBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointFormat)); + _MTL4_msg_v_setControlPointBuffer__MTL4__BufferRange((const void*)this, nullptr, controlPointBuffer); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureCurveGeometryDescriptor::controlPointStride() const +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureCurveGeometryDescriptor::controlPointCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointStride)); + return _MTL4_msg_NS__UInteger_controlPointCount((const void*)this, nullptr); } -_MTL_INLINE MTL::CurveBasis MTL4::AccelerationStructureCurveGeometryDescriptor::curveBasis() const +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveBasis)); + _MTL4_msg_v_setControlPointCount__NS__UInteger((const void*)this, nullptr, controlPointCount); } -_MTL_INLINE MTL::CurveEndCaps MTL4::AccelerationStructureCurveGeometryDescriptor::curveEndCaps() const +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureCurveGeometryDescriptor::controlPointStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveEndCaps)); + return _MTL4_msg_NS__UInteger_controlPointStride((const void*)this, nullptr); } -_MTL_INLINE MTL::CurveType MTL4::AccelerationStructureCurveGeometryDescriptor::curveType() const +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveType)); + _MTL4_msg_v_setControlPointStride__NS__UInteger((const void*)this, nullptr, controlPointStride); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureCurveGeometryDescriptor::indexBuffer() const +_MTL4_INLINE MTL::AttributeFormat MTL4::AccelerationStructureCurveGeometryDescriptor::controlPointFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); + return _MTL4_msg_MTL__AttributeFormat_controlPointFormat((const void*)this, nullptr); } -_MTL_INLINE MTL::IndexType MTL4::AccelerationStructureCurveGeometryDescriptor::indexType() const +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + _MTL4_msg_v_setControlPointFormat__MTL__AttributeFormat((const void*)this, nullptr, controlPointFormat); } -_MTL_INLINE MTL4::AccelerationStructureCurveGeometryDescriptor* MTL4::AccelerationStructureCurveGeometryDescriptor::init() +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureCurveGeometryDescriptor::radiusBuffer() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__BufferRange_radiusBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureCurveGeometryDescriptor::radiusBuffer() const +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setRadiusBuffer(MTL4::BufferRange radiusBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBuffer)); + _MTL4_msg_v_setRadiusBuffer__MTL4__BufferRange((const void*)this, nullptr, radiusBuffer); } -_MTL_INLINE MTL::AttributeFormat MTL4::AccelerationStructureCurveGeometryDescriptor::radiusFormat() const +_MTL4_INLINE MTL::AttributeFormat MTL4::AccelerationStructureCurveGeometryDescriptor::radiusFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusFormat)); + return _MTL4_msg_MTL__AttributeFormat_radiusFormat((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureCurveGeometryDescriptor::radiusStride() const +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusStride)); + _MTL4_msg_v_setRadiusFormat__MTL__AttributeFormat((const void*)this, nullptr, radiusFormat); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureCurveGeometryDescriptor::segmentControlPointCount() const +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureCurveGeometryDescriptor::radiusStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentControlPointCount)); + return _MTL4_msg_NS__UInteger_radiusStride((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureCurveGeometryDescriptor::segmentCount() const +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentCount)); + _MTL4_msg_v_setRadiusStride__NS__UInteger((const void*)this, nullptr, radiusStride); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setControlPointBuffer(const MTL4::BufferRange controlPointBuffer) +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureCurveGeometryDescriptor::indexBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBuffer_), controlPointBuffer); + return _MTL4_msg_MTL4__BufferRange_indexBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setIndexBuffer(MTL4::BufferRange indexBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointCount_), controlPointCount); + _MTL4_msg_v_setIndexBuffer__MTL4__BufferRange((const void*)this, nullptr, indexBuffer); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) +_MTL4_INLINE MTL::IndexType MTL4::AccelerationStructureCurveGeometryDescriptor::indexType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointFormat_), controlPointFormat); + return _MTL4_msg_MTL__IndexType_indexType((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointStride_), controlPointStride); + _MTL4_msg_v_setIndexType__MTL__IndexType((const void*)this, nullptr, indexType); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureCurveGeometryDescriptor::segmentCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveBasis_), curveBasis); + return _MTL4_msg_NS__UInteger_segmentCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveEndCaps_), curveEndCaps); + _MTL4_msg_v_setSegmentCount__NS__UInteger((const void*)this, nullptr, segmentCount); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureCurveGeometryDescriptor::segmentControlPointCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveType_), curveType); + return _MTL4_msg_NS__UInteger_segmentControlPointCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setIndexBuffer(const MTL4::BufferRange indexBuffer) +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); + _MTL4_msg_v_setSegmentControlPointCount__NS__UInteger((const void*)this, nullptr, segmentControlPointCount); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) +_MTL4_INLINE MTL::CurveType MTL4::AccelerationStructureCurveGeometryDescriptor::curveType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); + return _MTL4_msg_MTL__CurveType_curveType((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setRadiusBuffer(const MTL4::BufferRange radiusBuffer) +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBuffer_), radiusBuffer); + _MTL4_msg_v_setCurveType__MTL__CurveType((const void*)this, nullptr, curveType); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) +_MTL4_INLINE MTL::CurveBasis MTL4::AccelerationStructureCurveGeometryDescriptor::curveBasis() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusFormat_), radiusFormat); + return _MTL4_msg_MTL__CurveBasis_curveBasis((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusStride_), radiusStride); + _MTL4_msg_v_setCurveBasis__MTL__CurveBasis((const void*)this, nullptr, curveBasis); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) +_MTL4_INLINE MTL::CurveEndCaps MTL4::AccelerationStructureCurveGeometryDescriptor::curveEndCaps() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentControlPointCount_), segmentControlPointCount); + return _MTL4_msg_MTL__CurveEndCaps_curveEndCaps((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) +_MTL4_INLINE void MTL4::AccelerationStructureCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentCount_), segmentCount); + _MTL4_msg_v_setCurveEndCaps__MTL__CurveEndCaps((const void*)this, nullptr, curveEndCaps); } -_MTL_INLINE MTL4::AccelerationStructureMotionCurveGeometryDescriptor* MTL4::AccelerationStructureMotionCurveGeometryDescriptor::alloc() +_MTL4_INLINE MTL4::AccelerationStructureMotionCurveGeometryDescriptor* MTL4::AccelerationStructureMotionCurveGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4AccelerationStructureMotionCurveGeometryDescriptor)); + return _MTL4_msg_MTL4__AccelerationStructureMotionCurveGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4AccelerationStructureMotionCurveGeometryDescriptor, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionCurveGeometryDescriptor::controlPointBuffers() const +_MTL4_INLINE MTL4::AccelerationStructureMotionCurveGeometryDescriptor* MTL4::AccelerationStructureMotionCurveGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBuffers)); + return _MTL4_msg_MTL4__AccelerationStructureMotionCurveGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureMotionCurveGeometryDescriptor::controlPointCount() const +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionCurveGeometryDescriptor::controlPointBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointCount)); + return _MTL4_msg_MTL4__BufferRange_controlPointBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL::AttributeFormat MTL4::AccelerationStructureMotionCurveGeometryDescriptor::controlPointFormat() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointBuffers(MTL4::BufferRange controlPointBuffers) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointFormat)); + _MTL4_msg_v_setControlPointBuffers__MTL4__BufferRange((const void*)this, nullptr, controlPointBuffers); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureMotionCurveGeometryDescriptor::controlPointStride() const +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureMotionCurveGeometryDescriptor::controlPointCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointStride)); + return _MTL4_msg_NS__UInteger_controlPointCount((const void*)this, nullptr); } -_MTL_INLINE MTL::CurveBasis MTL4::AccelerationStructureMotionCurveGeometryDescriptor::curveBasis() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveBasis)); + _MTL4_msg_v_setControlPointCount__NS__UInteger((const void*)this, nullptr, controlPointCount); } -_MTL_INLINE MTL::CurveEndCaps MTL4::AccelerationStructureMotionCurveGeometryDescriptor::curveEndCaps() const +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureMotionCurveGeometryDescriptor::controlPointStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveEndCaps)); + return _MTL4_msg_NS__UInteger_controlPointStride((const void*)this, nullptr); } -_MTL_INLINE MTL::CurveType MTL4::AccelerationStructureMotionCurveGeometryDescriptor::curveType() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveType)); + _MTL4_msg_v_setControlPointStride__NS__UInteger((const void*)this, nullptr, controlPointStride); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionCurveGeometryDescriptor::indexBuffer() const +_MTL4_INLINE MTL::AttributeFormat MTL4::AccelerationStructureMotionCurveGeometryDescriptor::controlPointFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); + return _MTL4_msg_MTL__AttributeFormat_controlPointFormat((const void*)this, nullptr); } -_MTL_INLINE MTL::IndexType MTL4::AccelerationStructureMotionCurveGeometryDescriptor::indexType() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + _MTL4_msg_v_setControlPointFormat__MTL__AttributeFormat((const void*)this, nullptr, controlPointFormat); } -_MTL_INLINE MTL4::AccelerationStructureMotionCurveGeometryDescriptor* MTL4::AccelerationStructureMotionCurveGeometryDescriptor::init() +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionCurveGeometryDescriptor::radiusBuffers() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__BufferRange_radiusBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionCurveGeometryDescriptor::radiusBuffers() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusBuffers(MTL4::BufferRange radiusBuffers) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBuffers)); + _MTL4_msg_v_setRadiusBuffers__MTL4__BufferRange((const void*)this, nullptr, radiusBuffers); } -_MTL_INLINE MTL::AttributeFormat MTL4::AccelerationStructureMotionCurveGeometryDescriptor::radiusFormat() const +_MTL4_INLINE MTL::AttributeFormat MTL4::AccelerationStructureMotionCurveGeometryDescriptor::radiusFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusFormat)); + return _MTL4_msg_MTL__AttributeFormat_radiusFormat((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureMotionCurveGeometryDescriptor::radiusStride() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusStride)); + _MTL4_msg_v_setRadiusFormat__MTL__AttributeFormat((const void*)this, nullptr, radiusFormat); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureMotionCurveGeometryDescriptor::segmentControlPointCount() const +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureMotionCurveGeometryDescriptor::radiusStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentControlPointCount)); + return _MTL4_msg_NS__UInteger_radiusStride((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::AccelerationStructureMotionCurveGeometryDescriptor::segmentCount() const +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentCount)); + _MTL4_msg_v_setRadiusStride__NS__UInteger((const void*)this, nullptr, radiusStride); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointBuffers(const MTL4::BufferRange controlPointBuffers) +_MTL4_INLINE MTL4::BufferRange MTL4::AccelerationStructureMotionCurveGeometryDescriptor::indexBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBuffers_), controlPointBuffers); + return _MTL4_msg_MTL4__BufferRange_indexBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setIndexBuffer(MTL4::BufferRange indexBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointCount_), controlPointCount); + _MTL4_msg_v_setIndexBuffer__MTL4__BufferRange((const void*)this, nullptr, indexBuffer); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) +_MTL4_INLINE MTL::IndexType MTL4::AccelerationStructureMotionCurveGeometryDescriptor::indexType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointFormat_), controlPointFormat); + return _MTL4_msg_MTL__IndexType_indexType((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointStride_), controlPointStride); + _MTL4_msg_v_setIndexType__MTL__IndexType((const void*)this, nullptr, indexType); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureMotionCurveGeometryDescriptor::segmentCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveBasis_), curveBasis); + return _MTL4_msg_NS__UInteger_segmentCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveEndCaps_), curveEndCaps); + _MTL4_msg_v_setSegmentCount__NS__UInteger((const void*)this, nullptr, segmentCount); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) +_MTL4_INLINE NS::UInteger MTL4::AccelerationStructureMotionCurveGeometryDescriptor::segmentControlPointCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveType_), curveType); + return _MTL4_msg_NS__UInteger_segmentControlPointCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setIndexBuffer(const MTL4::BufferRange indexBuffer) +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); + _MTL4_msg_v_setSegmentControlPointCount__NS__UInteger((const void*)this, nullptr, segmentControlPointCount); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) +_MTL4_INLINE MTL::CurveType MTL4::AccelerationStructureMotionCurveGeometryDescriptor::curveType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); + return _MTL4_msg_MTL__CurveType_curveType((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusBuffers(const MTL4::BufferRange radiusBuffers) +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBuffers_), radiusBuffers); + _MTL4_msg_v_setCurveType__MTL__CurveType((const void*)this, nullptr, curveType); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) +_MTL4_INLINE MTL::CurveBasis MTL4::AccelerationStructureMotionCurveGeometryDescriptor::curveBasis() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusFormat_), radiusFormat); + return _MTL4_msg_MTL__CurveBasis_curveBasis((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusStride_), radiusStride); + _MTL4_msg_v_setCurveBasis__MTL__CurveBasis((const void*)this, nullptr, curveBasis); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) +_MTL4_INLINE MTL::CurveEndCaps MTL4::AccelerationStructureMotionCurveGeometryDescriptor::curveEndCaps() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentControlPointCount_), segmentControlPointCount); + return _MTL4_msg_MTL__CurveEndCaps_curveEndCaps((const void*)this, nullptr); } -_MTL_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) +_MTL4_INLINE void MTL4::AccelerationStructureMotionCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentCount_), segmentCount); + _MTL4_msg_v_setCurveEndCaps__MTL__CurveEndCaps((const void*)this, nullptr, curveEndCaps); } -_MTL_INLINE MTL4::InstanceAccelerationStructureDescriptor* MTL4::InstanceAccelerationStructureDescriptor::alloc() +_MTL4_INLINE MTL4::InstanceAccelerationStructureDescriptor* MTL4::InstanceAccelerationStructureDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4InstanceAccelerationStructureDescriptor)); + return _MTL4_msg_MTL4__InstanceAccelerationStructureDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4InstanceAccelerationStructureDescriptor, nullptr); } -_MTL_INLINE MTL4::InstanceAccelerationStructureDescriptor* MTL4::InstanceAccelerationStructureDescriptor::init() +_MTL4_INLINE MTL4::InstanceAccelerationStructureDescriptor* MTL4::InstanceAccelerationStructureDescriptor::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__InstanceAccelerationStructureDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::InstanceAccelerationStructureDescriptor::instanceCount() const +_MTL4_INLINE MTL4::BufferRange MTL4::InstanceAccelerationStructureDescriptor::instanceDescriptorBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceCount)); + return _MTL4_msg_MTL4__BufferRange_instanceDescriptorBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::InstanceAccelerationStructureDescriptor::instanceDescriptorBuffer() const +_MTL4_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setInstanceDescriptorBuffer(MTL4::BufferRange instanceDescriptorBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorBuffer)); + _MTL4_msg_v_setInstanceDescriptorBuffer__MTL4__BufferRange((const void*)this, nullptr, instanceDescriptorBuffer); } -_MTL_INLINE NS::UInteger MTL4::InstanceAccelerationStructureDescriptor::instanceDescriptorStride() const +_MTL4_INLINE NS::UInteger MTL4::InstanceAccelerationStructureDescriptor::instanceDescriptorStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorStride)); + return _MTL4_msg_NS__UInteger_instanceDescriptorStride((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureInstanceDescriptorType MTL4::InstanceAccelerationStructureDescriptor::instanceDescriptorType() const +_MTL4_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorType)); + _MTL4_msg_v_setInstanceDescriptorStride__NS__UInteger((const void*)this, nullptr, instanceDescriptorStride); } -_MTL_INLINE MTL::MatrixLayout MTL4::InstanceAccelerationStructureDescriptor::instanceTransformationMatrixLayout() const +_MTL4_INLINE NS::UInteger MTL4::InstanceAccelerationStructureDescriptor::instanceCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceTransformationMatrixLayout)); + return _MTL4_msg_NS__UInteger_instanceCount((const void*)this, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::InstanceAccelerationStructureDescriptor::motionTransformBuffer() const +_MTL4_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setInstanceCount(NS::UInteger instanceCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformBuffer)); + _MTL4_msg_v_setInstanceCount__NS__UInteger((const void*)this, nullptr, instanceCount); } -_MTL_INLINE NS::UInteger MTL4::InstanceAccelerationStructureDescriptor::motionTransformCount() const +_MTL4_INLINE MTL::AccelerationStructureInstanceDescriptorType MTL4::InstanceAccelerationStructureDescriptor::instanceDescriptorType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformCount)); + return _MTL4_msg_MTL__AccelerationStructureInstanceDescriptorType_instanceDescriptorType((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::InstanceAccelerationStructureDescriptor::motionTransformStride() const +_MTL4_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformStride)); + _MTL4_msg_v_setInstanceDescriptorType__MTL__AccelerationStructureInstanceDescriptorType((const void*)this, nullptr, instanceDescriptorType); } -_MTL_INLINE MTL::TransformType MTL4::InstanceAccelerationStructureDescriptor::motionTransformType() const +_MTL4_INLINE MTL4::BufferRange MTL4::InstanceAccelerationStructureDescriptor::motionTransformBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformType)); + return _MTL4_msg_MTL4__BufferRange_motionTransformBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setInstanceCount(NS::UInteger instanceCount) +_MTL4_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setMotionTransformBuffer(MTL4::BufferRange motionTransformBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceCount_), instanceCount); + _MTL4_msg_v_setMotionTransformBuffer__MTL4__BufferRange((const void*)this, nullptr, motionTransformBuffer); } -_MTL_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setInstanceDescriptorBuffer(const MTL4::BufferRange instanceDescriptorBuffer) +_MTL4_INLINE NS::UInteger MTL4::InstanceAccelerationStructureDescriptor::motionTransformCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorBuffer_), instanceDescriptorBuffer); + return _MTL4_msg_NS__UInteger_motionTransformCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride) +_MTL4_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setMotionTransformCount(NS::UInteger motionTransformCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorStride_), instanceDescriptorStride); + _MTL4_msg_v_setMotionTransformCount__NS__UInteger((const void*)this, nullptr, motionTransformCount); } -_MTL_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType) +_MTL4_INLINE MTL::MatrixLayout MTL4::InstanceAccelerationStructureDescriptor::instanceTransformationMatrixLayout() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorType_), instanceDescriptorType); + return _MTL4_msg_MTL__MatrixLayout_instanceTransformationMatrixLayout((const void*)this, nullptr); } -_MTL_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout) +_MTL4_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceTransformationMatrixLayout_), instanceTransformationMatrixLayout); + _MTL4_msg_v_setInstanceTransformationMatrixLayout__MTL__MatrixLayout((const void*)this, nullptr, instanceTransformationMatrixLayout); } -_MTL_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setMotionTransformBuffer(const MTL4::BufferRange motionTransformBuffer) +_MTL4_INLINE MTL::TransformType MTL4::InstanceAccelerationStructureDescriptor::motionTransformType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformBuffer_), motionTransformBuffer); + return _MTL4_msg_MTL__TransformType_motionTransformType((const void*)this, nullptr); } -_MTL_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setMotionTransformCount(NS::UInteger motionTransformCount) +_MTL4_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setMotionTransformType(MTL::TransformType motionTransformType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformCount_), motionTransformCount); + _MTL4_msg_v_setMotionTransformType__MTL__TransformType((const void*)this, nullptr, motionTransformType); } -_MTL_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setMotionTransformStride(NS::UInteger motionTransformStride) +_MTL4_INLINE NS::UInteger MTL4::InstanceAccelerationStructureDescriptor::motionTransformStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformStride_), motionTransformStride); + return _MTL4_msg_NS__UInteger_motionTransformStride((const void*)this, nullptr); } -_MTL_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setMotionTransformType(MTL::TransformType motionTransformType) +_MTL4_INLINE void MTL4::InstanceAccelerationStructureDescriptor::setMotionTransformStride(NS::UInteger motionTransformStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformType_), motionTransformType); + _MTL4_msg_v_setMotionTransformStride__NS__UInteger((const void*)this, nullptr, motionTransformStride); } -_MTL_INLINE MTL4::IndirectInstanceAccelerationStructureDescriptor* MTL4::IndirectInstanceAccelerationStructureDescriptor::alloc() +_MTL4_INLINE MTL4::IndirectInstanceAccelerationStructureDescriptor* MTL4::IndirectInstanceAccelerationStructureDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4IndirectInstanceAccelerationStructureDescriptor)); + return _MTL4_msg_MTL4__IndirectInstanceAccelerationStructureDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4IndirectInstanceAccelerationStructureDescriptor, nullptr); } -_MTL_INLINE MTL4::IndirectInstanceAccelerationStructureDescriptor* MTL4::IndirectInstanceAccelerationStructureDescriptor::init() +_MTL4_INLINE MTL4::IndirectInstanceAccelerationStructureDescriptor* MTL4::IndirectInstanceAccelerationStructureDescriptor::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__IndirectInstanceAccelerationStructureDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::IndirectInstanceAccelerationStructureDescriptor::instanceCountBuffer() const +_MTL4_INLINE MTL4::BufferRange MTL4::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceCountBuffer)); + return _MTL4_msg_MTL4__BufferRange_instanceDescriptorBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorBuffer() const +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorBuffer(MTL4::BufferRange instanceDescriptorBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorBuffer)); + _MTL4_msg_v_setInstanceDescriptorBuffer__MTL4__BufferRange((const void*)this, nullptr, instanceDescriptorBuffer); } -_MTL_INLINE NS::UInteger MTL4::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorStride() const +_MTL4_INLINE NS::UInteger MTL4::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorStride)); + return _MTL4_msg_NS__UInteger_instanceDescriptorStride((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureInstanceDescriptorType MTL4::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorType() const +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorType)); + _MTL4_msg_v_setInstanceDescriptorStride__NS__UInteger((const void*)this, nullptr, instanceDescriptorStride); } -_MTL_INLINE MTL::MatrixLayout MTL4::IndirectInstanceAccelerationStructureDescriptor::instanceTransformationMatrixLayout() const +_MTL4_INLINE NS::UInteger MTL4::IndirectInstanceAccelerationStructureDescriptor::maxInstanceCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceTransformationMatrixLayout)); + return _MTL4_msg_NS__UInteger_maxInstanceCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::IndirectInstanceAccelerationStructureDescriptor::maxInstanceCount() const +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMaxInstanceCount(NS::UInteger maxInstanceCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxInstanceCount)); + _MTL4_msg_v_setMaxInstanceCount__NS__UInteger((const void*)this, nullptr, maxInstanceCount); } -_MTL_INLINE NS::UInteger MTL4::IndirectInstanceAccelerationStructureDescriptor::maxMotionTransformCount() const +_MTL4_INLINE MTL4::BufferRange MTL4::IndirectInstanceAccelerationStructureDescriptor::instanceCountBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxMotionTransformCount)); + return _MTL4_msg_MTL4__BufferRange_instanceCountBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL4::BufferRange MTL4::IndirectInstanceAccelerationStructureDescriptor::motionTransformBuffer() const +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setInstanceCountBuffer(MTL4::BufferRange instanceCountBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformBuffer)); + _MTL4_msg_v_setInstanceCountBuffer__MTL4__BufferRange((const void*)this, nullptr, instanceCountBuffer); } -_MTL_INLINE MTL4::BufferRange MTL4::IndirectInstanceAccelerationStructureDescriptor::motionTransformCountBuffer() const +_MTL4_INLINE MTL::AccelerationStructureInstanceDescriptorType MTL4::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformCountBuffer)); + return _MTL4_msg_MTL__AccelerationStructureInstanceDescriptorType_instanceDescriptorType((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::IndirectInstanceAccelerationStructureDescriptor::motionTransformStride() const +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformStride)); + _MTL4_msg_v_setInstanceDescriptorType__MTL__AccelerationStructureInstanceDescriptorType((const void*)this, nullptr, instanceDescriptorType); } -_MTL_INLINE MTL::TransformType MTL4::IndirectInstanceAccelerationStructureDescriptor::motionTransformType() const +_MTL4_INLINE MTL4::BufferRange MTL4::IndirectInstanceAccelerationStructureDescriptor::motionTransformBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformType)); + return _MTL4_msg_MTL4__BufferRange_motionTransformBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setInstanceCountBuffer(const MTL4::BufferRange instanceCountBuffer) +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformBuffer(MTL4::BufferRange motionTransformBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceCountBuffer_), instanceCountBuffer); + _MTL4_msg_v_setMotionTransformBuffer__MTL4__BufferRange((const void*)this, nullptr, motionTransformBuffer); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorBuffer(const MTL4::BufferRange instanceDescriptorBuffer) +_MTL4_INLINE NS::UInteger MTL4::IndirectInstanceAccelerationStructureDescriptor::maxMotionTransformCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorBuffer_), instanceDescriptorBuffer); + return _MTL4_msg_NS__UInteger_maxMotionTransformCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride) +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorStride_), instanceDescriptorStride); + _MTL4_msg_v_setMaxMotionTransformCount__NS__UInteger((const void*)this, nullptr, maxMotionTransformCount); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType) +_MTL4_INLINE MTL4::BufferRange MTL4::IndirectInstanceAccelerationStructureDescriptor::motionTransformCountBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorType_), instanceDescriptorType); + return _MTL4_msg_MTL4__BufferRange_motionTransformCountBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout) +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformCountBuffer(MTL4::BufferRange motionTransformCountBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceTransformationMatrixLayout_), instanceTransformationMatrixLayout); + _MTL4_msg_v_setMotionTransformCountBuffer__MTL4__BufferRange((const void*)this, nullptr, motionTransformCountBuffer); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMaxInstanceCount(NS::UInteger maxInstanceCount) +_MTL4_INLINE MTL::MatrixLayout MTL4::IndirectInstanceAccelerationStructureDescriptor::instanceTransformationMatrixLayout() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxInstanceCount_), maxInstanceCount); + return _MTL4_msg_MTL__MatrixLayout_instanceTransformationMatrixLayout((const void*)this, nullptr); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount) +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxMotionTransformCount_), maxMotionTransformCount); + _MTL4_msg_v_setInstanceTransformationMatrixLayout__MTL__MatrixLayout((const void*)this, nullptr, instanceTransformationMatrixLayout); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformBuffer(const MTL4::BufferRange motionTransformBuffer) +_MTL4_INLINE MTL::TransformType MTL4::IndirectInstanceAccelerationStructureDescriptor::motionTransformType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformBuffer_), motionTransformBuffer); + return _MTL4_msg_MTL__TransformType_motionTransformType((const void*)this, nullptr); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformCountBuffer(const MTL4::BufferRange motionTransformCountBuffer) +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformType(MTL::TransformType motionTransformType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformCountBuffer_), motionTransformCountBuffer); + _MTL4_msg_v_setMotionTransformType__MTL__TransformType((const void*)this, nullptr, motionTransformType); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformStride(NS::UInteger motionTransformStride) +_MTL4_INLINE NS::UInteger MTL4::IndirectInstanceAccelerationStructureDescriptor::motionTransformStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformStride_), motionTransformStride); + return _MTL4_msg_NS__UInteger_motionTransformStride((const void*)this, nullptr); } -_MTL_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformType(MTL::TransformType motionTransformType) +_MTL4_INLINE void MTL4::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformStride(NS::UInteger motionTransformStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformType_), motionTransformType); + _MTL4_msg_v_setMotionTransformStride__NS__UInteger((const void*)this, nullptr, motionTransformStride); } diff --git a/thirdparty/metal-cpp/Metal/MTL4Archive.hpp b/thirdparty/metal-cpp/Metal/MTL4Archive.hpp index c83ef6389a96..0455b27da552 100644 --- a/thirdparty/metal-cpp/Metal/MTL4Archive.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4Archive.hpp @@ -1,93 +1,83 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4Archive.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" - -namespace MTL -{ -class ComputePipelineState; -class RenderPipelineState; +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class ComputePipelineState; + class RenderPipelineState; +} +namespace MTL4 { + class BinaryFunction; + class BinaryFunctionDescriptor; + class ComputePipelineDescriptor; + class PipelineDescriptor; + class PipelineStageDynamicLinkingDescriptor; + class RenderPipelineDynamicLinkingDescriptor; +} +namespace NS { + class Error; + class String; } namespace MTL4 { -class BinaryFunction; -class BinaryFunctionDescriptor; -class ComputePipelineDescriptor; -class PipelineDescriptor; -class PipelineStageDynamicLinkingDescriptor; -class RenderPipelineDynamicLinkingDescriptor; class Archive : public NS::Referencing { public: NS::String* label() const; + MTL4::BinaryFunction* newBinaryFunction(MTL4::BinaryFunctionDescriptor* descriptor, NS::Error** error); + MTL::ComputePipelineState* newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, NS::Error** error); + MTL::ComputePipelineState* newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, NS::Error** error); + MTL::RenderPipelineState* newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, NS::Error** error); + MTL::RenderPipelineState* newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, NS::Error** error); + void setLabel(NS::String* label); - BinaryFunction* newBinaryFunction(const MTL4::BinaryFunctionDescriptor* descriptor, NS::Error** error); +}; - MTL::ComputePipelineState* newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, NS::Error** error); - MTL::ComputePipelineState* newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, const MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, NS::Error** error); +} // namespace MTL4 - MTL::RenderPipelineState* newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, NS::Error** error); - MTL::RenderPipelineState* newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, const MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, NS::Error** error); +// --- Class symbols + inline implementations --- - void setLabel(const NS::String* label); -}; +extern "C" void *OBJC_CLASS_$_MTL4Archive; -} -_MTL_INLINE NS::String* MTL4::Archive::label() const +_MTL4_INLINE NS::String* MTL4::Archive::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL4::BinaryFunction* MTL4::Archive::newBinaryFunction(const MTL4::BinaryFunctionDescriptor* descriptor, NS::Error** error) +_MTL4_INLINE void MTL4::Archive::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBinaryFunctionWithDescriptor_error_), descriptor, error); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE MTL::ComputePipelineState* MTL4::Archive::newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, NS::Error** error) +_MTL4_INLINE MTL::ComputePipelineState* MTL4::Archive::newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithDescriptor_error_), descriptor, error); + return _MTL4_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithDescriptor_error__MTL4__ComputePipelineDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL::ComputePipelineState* MTL4::Archive::newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, const MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, NS::Error** error) +_MTL4_INLINE MTL::ComputePipelineState* MTL4::Archive::newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_error_), descriptor, dynamicLinkingDescriptor, error); + return _MTL4_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_error__MTL4__ComputePipelineDescriptorp_MTL4__PipelineStageDynamicLinkingDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, dynamicLinkingDescriptor, error); } -_MTL_INLINE MTL::RenderPipelineState* MTL4::Archive::newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, NS::Error** error) +_MTL4_INLINE MTL::RenderPipelineState* MTL4::Archive::newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_error_), descriptor, error); + return _MTL4_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_error__MTL4__PipelineDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL::RenderPipelineState* MTL4::Archive::newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, const MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, NS::Error** error) +_MTL4_INLINE MTL::RenderPipelineState* MTL4::Archive::newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_error_), descriptor, dynamicLinkingDescriptor, error); + return _MTL4_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_error__MTL4__PipelineDescriptorp_MTL4__RenderPipelineDynamicLinkingDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, dynamicLinkingDescriptor, error); } -_MTL_INLINE void MTL4::Archive::setLabel(const NS::String* label) +_MTL4_INLINE MTL4::BinaryFunction* MTL4::Archive::newBinaryFunction(MTL4::BinaryFunctionDescriptor* descriptor, NS::Error** error) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL4_msg_MTL4__BinaryFunctionp_newBinaryFunctionWithDescriptor_error__MTL4__BinaryFunctionDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } diff --git a/thirdparty/metal-cpp/Metal/MTL4ArgumentTable.hpp b/thirdparty/metal-cpp/Metal/MTL4ArgumentTable.hpp index 7788ed94fd84..e693286994ce 100644 --- a/thirdparty/metal-cpp/Metal/MTL4ArgumentTable.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4ArgumentTable.hpp @@ -1,187 +1,169 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4ArgumentTable.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLGPUAddress.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLStructs.hpp" -namespace MTL -{ -class Device; +namespace MTL { + class Device; +} +namespace NS { + class String; } namespace MTL4 { + +class ArgumentTableDescriptor; +class ArgumentTable; + class ArgumentTableDescriptor : public NS::Copying { public: static ArgumentTableDescriptor* alloc(); + ArgumentTableDescriptor* init() const; - ArgumentTableDescriptor* init(); - bool initializeBindings() const; - - NS::String* label() const; - - NS::UInteger maxBufferBindCount() const; - - NS::UInteger maxSamplerStateBindCount() const; - - NS::UInteger maxTextureBindCount() const; - - void setInitializeBindings(bool initializeBindings); - - void setLabel(const NS::String* label); - - void setMaxBufferBindCount(NS::UInteger maxBufferBindCount); - - void setMaxSamplerStateBindCount(NS::UInteger maxSamplerStateBindCount); - - void setMaxTextureBindCount(NS::UInteger maxTextureBindCount); + bool initializeBindings() const; + NS::String* label() const; + NS::UInteger maxBufferBindCount() const; + NS::UInteger maxSamplerStateBindCount() const; + NS::UInteger maxTextureBindCount() const; + void setInitializeBindings(bool initializeBindings); + void setLabel(NS::String* label); + void setMaxBufferBindCount(NS::UInteger maxBufferBindCount); + void setMaxSamplerStateBindCount(NS::UInteger maxSamplerStateBindCount); + void setMaxTextureBindCount(NS::UInteger maxTextureBindCount); + void setSupportAttributeStrides(bool supportAttributeStrides); + bool supportAttributeStrides() const; - void setSupportAttributeStrides(bool supportAttributeStrides); - bool supportAttributeStrides() const; }; + class ArgumentTable : public NS::Referencing { public: MTL::Device* device() const; - NS::String* label() const; - void setAddress(MTL::GPUAddress gpuAddress, NS::UInteger bindingIndex); void setAddress(MTL::GPUAddress gpuAddress, NS::UInteger stride, NS::UInteger bindingIndex); - void setResource(MTL::ResourceID resourceID, NS::UInteger bindingIndex); - void setSamplerState(MTL::ResourceID resourceID, NS::UInteger bindingIndex); - void setTexture(MTL::ResourceID resourceID, NS::UInteger bindingIndex); + }; -} -_MTL_INLINE MTL4::ArgumentTableDescriptor* MTL4::ArgumentTableDescriptor::alloc() +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4ArgumentTableDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4ArgumentTable; + +_MTL4_INLINE MTL4::ArgumentTableDescriptor* MTL4::ArgumentTableDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4ArgumentTableDescriptor)); + return _MTL4_msg_MTL4__ArgumentTableDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4ArgumentTableDescriptor, nullptr); } -_MTL_INLINE MTL4::ArgumentTableDescriptor* MTL4::ArgumentTableDescriptor::init() +_MTL4_INLINE MTL4::ArgumentTableDescriptor* MTL4::ArgumentTableDescriptor::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__ArgumentTableDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE bool MTL4::ArgumentTableDescriptor::initializeBindings() const +_MTL4_INLINE NS::UInteger MTL4::ArgumentTableDescriptor::maxBufferBindCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(initializeBindings)); + return _MTL4_msg_NS__UInteger_maxBufferBindCount((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::ArgumentTableDescriptor::label() const +_MTL4_INLINE void MTL4::ArgumentTableDescriptor::setMaxBufferBindCount(NS::UInteger maxBufferBindCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL4_msg_v_setMaxBufferBindCount__NS__UInteger((const void*)this, nullptr, maxBufferBindCount); } -_MTL_INLINE NS::UInteger MTL4::ArgumentTableDescriptor::maxBufferBindCount() const +_MTL4_INLINE NS::UInteger MTL4::ArgumentTableDescriptor::maxTextureBindCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxBufferBindCount)); + return _MTL4_msg_NS__UInteger_maxTextureBindCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::ArgumentTableDescriptor::maxSamplerStateBindCount() const +_MTL4_INLINE void MTL4::ArgumentTableDescriptor::setMaxTextureBindCount(NS::UInteger maxTextureBindCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxSamplerStateBindCount)); + _MTL4_msg_v_setMaxTextureBindCount__NS__UInteger((const void*)this, nullptr, maxTextureBindCount); } -_MTL_INLINE NS::UInteger MTL4::ArgumentTableDescriptor::maxTextureBindCount() const +_MTL4_INLINE NS::UInteger MTL4::ArgumentTableDescriptor::maxSamplerStateBindCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTextureBindCount)); + return _MTL4_msg_NS__UInteger_maxSamplerStateBindCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::ArgumentTableDescriptor::setInitializeBindings(bool initializeBindings) +_MTL4_INLINE void MTL4::ArgumentTableDescriptor::setMaxSamplerStateBindCount(NS::UInteger maxSamplerStateBindCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInitializeBindings_), initializeBindings); + _MTL4_msg_v_setMaxSamplerStateBindCount__NS__UInteger((const void*)this, nullptr, maxSamplerStateBindCount); } -_MTL_INLINE void MTL4::ArgumentTableDescriptor::setLabel(const NS::String* label) +_MTL4_INLINE bool MTL4::ArgumentTableDescriptor::initializeBindings() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL4_msg_bool_initializeBindings((const void*)this, nullptr); } -_MTL_INLINE void MTL4::ArgumentTableDescriptor::setMaxBufferBindCount(NS::UInteger maxBufferBindCount) +_MTL4_INLINE void MTL4::ArgumentTableDescriptor::setInitializeBindings(bool initializeBindings) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxBufferBindCount_), maxBufferBindCount); + _MTL4_msg_v_setInitializeBindings__bool((const void*)this, nullptr, initializeBindings); } -_MTL_INLINE void MTL4::ArgumentTableDescriptor::setMaxSamplerStateBindCount(NS::UInteger maxSamplerStateBindCount) +_MTL4_INLINE bool MTL4::ArgumentTableDescriptor::supportAttributeStrides() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxSamplerStateBindCount_), maxSamplerStateBindCount); + return _MTL4_msg_bool_supportAttributeStrides((const void*)this, nullptr); } -_MTL_INLINE void MTL4::ArgumentTableDescriptor::setMaxTextureBindCount(NS::UInteger maxTextureBindCount) +_MTL4_INLINE void MTL4::ArgumentTableDescriptor::setSupportAttributeStrides(bool supportAttributeStrides) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTextureBindCount_), maxTextureBindCount); + _MTL4_msg_v_setSupportAttributeStrides__bool((const void*)this, nullptr, supportAttributeStrides); } -_MTL_INLINE void MTL4::ArgumentTableDescriptor::setSupportAttributeStrides(bool supportAttributeStrides) +_MTL4_INLINE NS::String* MTL4::ArgumentTableDescriptor::label() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportAttributeStrides_), supportAttributeStrides); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE bool MTL4::ArgumentTableDescriptor::supportAttributeStrides() const +_MTL4_INLINE void MTL4::ArgumentTableDescriptor::setLabel(NS::String* label) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportAttributeStrides)); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE MTL::Device* MTL4::ArgumentTable::device() const +_MTL4_INLINE MTL::Device* MTL4::ArgumentTable::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL4_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::ArgumentTable::label() const +_MTL4_INLINE NS::String* MTL4::ArgumentTable::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL4::ArgumentTable::setAddress(MTL::GPUAddress gpuAddress, NS::UInteger bindingIndex) +_MTL4_INLINE void MTL4::ArgumentTable::setAddress(MTL::GPUAddress gpuAddress, NS::UInteger bindingIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAddress_atIndex_), gpuAddress, bindingIndex); + _MTL4_msg_v_setAddress_atIndex__MTL__GPUAddress_NS__UInteger((const void*)this, nullptr, gpuAddress, bindingIndex); } -_MTL_INLINE void MTL4::ArgumentTable::setAddress(MTL::GPUAddress gpuAddress, NS::UInteger stride, NS::UInteger bindingIndex) +_MTL4_INLINE void MTL4::ArgumentTable::setAddress(MTL::GPUAddress gpuAddress, NS::UInteger stride, NS::UInteger bindingIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAddress_attributeStride_atIndex_), gpuAddress, stride, bindingIndex); + _MTL4_msg_v_setAddress_attributeStride_atIndex__MTL__GPUAddress_NS__UInteger_NS__UInteger((const void*)this, nullptr, gpuAddress, stride, bindingIndex); } -_MTL_INLINE void MTL4::ArgumentTable::setResource(MTL::ResourceID resourceID, NS::UInteger bindingIndex) +_MTL4_INLINE void MTL4::ArgumentTable::setResource(MTL::ResourceID resourceID, NS::UInteger bindingIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setResource_atBufferIndex_), resourceID, bindingIndex); + _MTL4_msg_v_setResource_atBufferIndex__MTL__ResourceID_NS__UInteger((const void*)this, nullptr, resourceID, bindingIndex); } -_MTL_INLINE void MTL4::ArgumentTable::setSamplerState(MTL::ResourceID resourceID, NS::UInteger bindingIndex) +_MTL4_INLINE void MTL4::ArgumentTable::setTexture(MTL::ResourceID resourceID, NS::UInteger bindingIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSamplerState_atIndex_), resourceID, bindingIndex); + _MTL4_msg_v_setTexture_atIndex__MTL__ResourceID_NS__UInteger((const void*)this, nullptr, resourceID, bindingIndex); } -_MTL_INLINE void MTL4::ArgumentTable::setTexture(MTL::ResourceID resourceID, NS::UInteger bindingIndex) +_MTL4_INLINE void MTL4::ArgumentTable::setSamplerState(MTL::ResourceID resourceID, NS::UInteger bindingIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTexture_atIndex_), resourceID, bindingIndex); + _MTL4_msg_v_setSamplerState_atIndex__MTL__ResourceID_NS__UInteger((const void*)this, nullptr, resourceID, bindingIndex); } diff --git a/thirdparty/metal-cpp/Metal/MTL4BinaryFunction.hpp b/thirdparty/metal-cpp/Metal/MTL4BinaryFunction.hpp index 30d90a6b2afc..d34e679754ca 100644 --- a/thirdparty/metal-cpp/Metal/MTL4BinaryFunction.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4BinaryFunction.hpp @@ -1,30 +1,19 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4BinaryFunction.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLLibrary.hpp" -#include "MTLPrivate.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + enum FunctionType : NS::UInteger; +} +namespace NS { + class String; +} namespace MTL4 { @@ -33,18 +22,22 @@ class BinaryFunction : public NS::Referencing { public: MTL::FunctionType functionType() const; - NS::String* name() const; + }; -} +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4BinaryFunction; -_MTL_INLINE MTL::FunctionType MTL4::BinaryFunction::functionType() const +_MTL4_INLINE NS::String* MTL4::BinaryFunction::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionType)); + return _MTL4_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::BinaryFunction::name() const +_MTL4_INLINE MTL::FunctionType MTL4::BinaryFunction::functionType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL4_msg_MTL__FunctionType_functionType((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4BinaryFunctionDescriptor.hpp b/thirdparty/metal-cpp/Metal/MTL4BinaryFunctionDescriptor.hpp index ce173ce00486..958c4406fab0 100644 --- a/thirdparty/metal-cpp/Metal/MTL4BinaryFunctionDescriptor.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4BinaryFunctionDescriptor.hpp @@ -1,97 +1,86 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4BinaryFunctionDescriptor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL4 { + class FunctionDescriptor; +} +namespace NS { + class String; +} namespace MTL4 { -class BinaryFunctionDescriptor; -class FunctionDescriptor; -_MTL_OPTIONS(NS::UInteger, BinaryFunctionOptions) { +_MTL4_OPTIONS(NS::UInteger, BinaryFunctionOptions) { BinaryFunctionOptionNone = 0, BinaryFunctionOptionPipelineIndependent = 1 << 1, }; + class BinaryFunctionDescriptor : public NS::Copying { public: static BinaryFunctionDescriptor* alloc(); + BinaryFunctionDescriptor* init() const; - FunctionDescriptor* functionDescriptor() const; + MTL4::FunctionDescriptor* functionDescriptor() const; + NS::String* name() const; + MTL4::BinaryFunctionOptions options() const; + void setFunctionDescriptor(MTL4::FunctionDescriptor* functionDescriptor); + void setName(NS::String* name); + void setOptions(MTL4::BinaryFunctionOptions options); - BinaryFunctionDescriptor* init(); - - NS::String* name() const; +}; - BinaryFunctionOptions options() const; +} // namespace MTL4 - void setFunctionDescriptor(const MTL4::FunctionDescriptor* functionDescriptor); +// --- Class symbols + inline implementations --- - void setName(const NS::String* name); +extern "C" void *OBJC_CLASS_$_MTL4BinaryFunctionDescriptor; - void setOptions(MTL4::BinaryFunctionOptions options); -}; - -} -_MTL_INLINE MTL4::BinaryFunctionDescriptor* MTL4::BinaryFunctionDescriptor::alloc() +_MTL4_INLINE MTL4::BinaryFunctionDescriptor* MTL4::BinaryFunctionDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4BinaryFunctionDescriptor)); + return _MTL4_msg_MTL4__BinaryFunctionDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4BinaryFunctionDescriptor, nullptr); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::BinaryFunctionDescriptor::functionDescriptor() const +_MTL4_INLINE MTL4::BinaryFunctionDescriptor* MTL4::BinaryFunctionDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionDescriptor)); + return _MTL4_msg_MTL4__BinaryFunctionDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::BinaryFunctionDescriptor* MTL4::BinaryFunctionDescriptor::init() +_MTL4_INLINE NS::String* MTL4::BinaryFunctionDescriptor::name() const { - return NS::Object::init(); + return _MTL4_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::BinaryFunctionDescriptor::name() const +_MTL4_INLINE void MTL4::BinaryFunctionDescriptor::setName(NS::String* name) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + _MTL4_msg_v_setName__NS__Stringp((const void*)this, nullptr, name); } -_MTL_INLINE MTL4::BinaryFunctionOptions MTL4::BinaryFunctionDescriptor::options() const +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::BinaryFunctionDescriptor::functionDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(options)); + return _MTL4_msg_MTL4__FunctionDescriptorp_functionDescriptor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::BinaryFunctionDescriptor::setFunctionDescriptor(const MTL4::FunctionDescriptor* functionDescriptor) +_MTL4_INLINE void MTL4::BinaryFunctionDescriptor::setFunctionDescriptor(MTL4::FunctionDescriptor* functionDescriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctionDescriptor_), functionDescriptor); + _MTL4_msg_v_setFunctionDescriptor__MTL4__FunctionDescriptorp((const void*)this, nullptr, functionDescriptor); } -_MTL_INLINE void MTL4::BinaryFunctionDescriptor::setName(const NS::String* name) +_MTL4_INLINE MTL4::BinaryFunctionOptions MTL4::BinaryFunctionDescriptor::options() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setName_), name); + return _MTL4_msg_MTL4__BinaryFunctionOptions_options((const void*)this, nullptr); } -_MTL_INLINE void MTL4::BinaryFunctionDescriptor::setOptions(MTL4::BinaryFunctionOptions options) +_MTL4_INLINE void MTL4::BinaryFunctionDescriptor::setOptions(MTL4::BinaryFunctionOptions options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOptions_), options); + _MTL4_msg_v_setOptions__MTL4__BinaryFunctionOptions((const void*)this, nullptr, options); } diff --git a/thirdparty/metal-cpp/Metal/MTL4Blocks.hpp b/thirdparty/metal-cpp/Metal/MTL4Blocks.hpp new file mode 100644 index 000000000000..504934e2c2fe --- /dev/null +++ b/thirdparty/metal-cpp/Metal/MTL4Blocks.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include "MTL4Defines.hpp" +#include "../Foundation/NSObjCRuntime.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +#include + +namespace MTL4 { + +class BinaryFunction; +class CommitFeedback; +class MachineLearningPipelineState; + +} namespace NS { +class Error; +} namespace MTL4 { + +using CommitFeedbackHandler = void (^)(MTL4::CommitFeedback*); +using CommitFeedbackHandlerFunction = std::function; + +using NewBinaryFunctionCompletionHandler = void (^)(MTL4::BinaryFunction*, NS::Error*); +using NewBinaryFunctionCompletionHandlerFunction = std::function; + +using NewMachineLearningPipelineStateCompletionHandler = void (^)(MTL4::MachineLearningPipelineState*, NS::Error*); +using NewMachineLearningPipelineStateCompletionHandlerFunction = std::function; + +} // MTL4 diff --git a/thirdparty/metal-cpp/Metal/MTL4Bridge.hpp b/thirdparty/metal-cpp/Metal/MTL4Bridge.hpp new file mode 100644 index 000000000000..435426e9f262 --- /dev/null +++ b/thirdparty/metal-cpp/Metal/MTL4Bridge.hpp @@ -0,0 +1,711 @@ +#pragma once + +// Consolidated extern "C" trampoline decls for this framework. +// One entry per (return, args, selector) — identical C++ signatures +// across multiple classes collapse to a single linker alias of +// `_objc_msgSend$`. Per-class headers include this file +// instead of declaring their own externs. + +#include "MTL4Defines.hpp" +#include +#include "../Foundation/NSTypes.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "../Metal/MTLBlocks.hpp" +#include "../Metal/MTLStructs.hpp" + +namespace MTL { + class AccelerationStructure; + class Buffer; + class CompileOptions; + class ComputePipelineState; + class DepthStencilState; + class Device; + class Drawable; + class DynamicLibrary; + class Event; + class Fence; + class FunctionConstantValues; + class FunctionStitchingGraph; + class Heap; + class IndirectCommandBuffer; + class Library; + class LogState; + class LogicalToPhysicalColorAttachmentMap; + class RasterizationRateMap; + class RenderPassColorAttachmentDescriptorArray; + class RenderPassDepthAttachmentDescriptor; + class RenderPassStencilAttachmentDescriptor; + class RenderPipelineState; + class ResidencySet; + class Tensor; + class TensorExtents; + class Texture; + class TileRenderPipelineColorAttachmentDescriptorArray; + class VertexDescriptor; + enum AccelerationStructureInstanceDescriptorType : NS::UInteger; + using AccelerationStructureRefitOptions = NS::UInteger; + enum AttributeFormat : NS::UInteger; + enum BlendFactor : NS::UInteger; + enum BlendOperation : NS::UInteger; + using BlitOption = NS::UInteger; + using ColorWriteMask = NS::UInteger; + enum CullMode : NS::UInteger; + enum CurveBasis : NS::Integer; + enum CurveEndCaps : NS::Integer; + enum CurveType : NS::Integer; + enum DepthClipMode : NS::UInteger; + enum FunctionType : NS::UInteger; + enum IndexType : NS::UInteger; + enum MatrixLayout : NS::Integer; + enum MotionBorderMode : uint32_t; + enum PixelFormat : NS::UInteger; + enum PrimitiveTopologyClass : NS::UInteger; + enum PrimitiveType : NS::UInteger; + using RenderStages = NS::UInteger; + enum ShaderValidation : NS::Integer; + using Stages = NS::UInteger; + enum StoreAction : NS::UInteger; + enum TransformType : NS::Integer; + enum TriangleFillMode : NS::UInteger; + enum VisibilityResultMode : NS::UInteger; + enum VisibilityResultType : NS::Integer; + enum Winding : NS::UInteger; +} +namespace MTL4 { + class AccelerationStructureBoundingBoxGeometryDescriptor; + class AccelerationStructureCurveGeometryDescriptor; + class AccelerationStructureDescriptor; + class AccelerationStructureGeometryDescriptor; + class AccelerationStructureMotionBoundingBoxGeometryDescriptor; + class AccelerationStructureMotionCurveGeometryDescriptor; + class AccelerationStructureMotionTriangleGeometryDescriptor; + class AccelerationStructureTriangleGeometryDescriptor; + class ArgumentTable; + class ArgumentTableDescriptor; + class BinaryFunction; + class BinaryFunctionDescriptor; + class CommandAllocator; + class CommandAllocatorDescriptor; + class CommandBuffer; + class CommandBufferOptions; + class CommandQueueDescriptor; + class CommitOptions; + class Compiler; + class CompilerDescriptor; + class CompilerTask; + class CompilerTaskOptions; + class ComputeCommandEncoder; + class ComputePipelineDescriptor; + class CounterHeap; + class CounterHeapDescriptor; + class FunctionDescriptor; + class IndirectInstanceAccelerationStructureDescriptor; + class InstanceAccelerationStructureDescriptor; + class LibraryDescriptor; + class LibraryFunctionDescriptor; + class MachineLearningCommandEncoder; + class MachineLearningPipelineDescriptor; + class MachineLearningPipelineReflection; + class MachineLearningPipelineState; + class MeshRenderPipelineDescriptor; + class PipelineDataSetSerializer; + class PipelineDataSetSerializerDescriptor; + class PipelineDescriptor; + class PipelineOptions; + class PipelineStageDynamicLinkingDescriptor; + class PrimitiveAccelerationStructureDescriptor; + class RenderCommandEncoder; + class RenderPassDescriptor; + class RenderPipelineBinaryFunctionsDescriptor; + class RenderPipelineColorAttachmentDescriptor; + class RenderPipelineColorAttachmentDescriptorArray; + class RenderPipelineDescriptor; + class RenderPipelineDynamicLinkingDescriptor; + class SpecializedFunctionDescriptor; + class StaticLinkingDescriptor; + class StitchedFunctionDescriptor; + class TileRenderPipelineDescriptor; + enum AlphaToCoverageState : NS::Integer; + enum AlphaToOneState : NS::Integer; + using BinaryFunctionOptions = NS::UInteger; + enum BlendState : NS::Integer; + enum CompilerTaskStatus : NS::Integer; + enum CounterHeapType : NS::Integer; + enum IndirectCommandBufferSupportState : NS::Integer; + enum LogicalToPhysicalColorAttachmentMappingState : NS::Integer; + using PipelineDataSetSerializerConfiguration = NS::UInteger; + using RenderEncoderOptions = NS::UInteger; + using ShaderReflection = NS::UInteger; + enum TimestampGranularity : NS::Integer; + using VisibilityOptions = NS::UInteger; +} +namespace NS { + class Array; + class Data; + class Dictionary; + class Error; + class String; + class URL; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +#pragma clang diagnostic ignored "-Wunguarded-availability-new" + +extern "C" { +CFTimeInterval _MTL4_msg_CFTimeInterval_GPUEndTime(const void*, SEL) __asm__("_objc_msgSend$" "GPUEndTime"); +CFTimeInterval _MTL4_msg_CFTimeInterval_GPUStartTime(const void*, SEL) __asm__("_objc_msgSend$" "GPUStartTime"); +void _MTL4_msg_v_addFeedbackHandler__MTL4__CommitFeedbackHandler(const void*, SEL, MTL4::CommitFeedbackHandler) __asm__("_objc_msgSend$" "addFeedbackHandler:"); +void _MTL4_msg_v_addResidencySet__MTL__ResidencySetp(const void*, SEL, MTL::ResidencySet*) __asm__("_objc_msgSend$" "addResidencySet:"); +void _MTL4_msg_v_addResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger(const void*, SEL, const MTL::ResidencySet* const *, NS::UInteger) __asm__("_objc_msgSend$" "addResidencySets:count:"); +MTL4::AccelerationStructureBoundingBoxGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureBoundingBoxGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::AccelerationStructureCurveGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureCurveGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::AccelerationStructureDescriptor* _MTL4_msg_MTL4__AccelerationStructureDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::AccelerationStructureGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureMotionBoundingBoxGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::AccelerationStructureMotionCurveGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureMotionCurveGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::AccelerationStructureMotionTriangleGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureMotionTriangleGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::AccelerationStructureTriangleGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureTriangleGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::ArgumentTableDescriptor* _MTL4_msg_MTL4__ArgumentTableDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::BinaryFunctionDescriptor* _MTL4_msg_MTL4__BinaryFunctionDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::CommandAllocatorDescriptor* _MTL4_msg_MTL4__CommandAllocatorDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::CommandBufferOptions* _MTL4_msg_MTL4__CommandBufferOptionsp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::CommandQueueDescriptor* _MTL4_msg_MTL4__CommandQueueDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::CommitOptions* _MTL4_msg_MTL4__CommitOptionsp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::CompilerDescriptor* _MTL4_msg_MTL4__CompilerDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::CompilerTaskOptions* _MTL4_msg_MTL4__CompilerTaskOptionsp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::ComputePipelineDescriptor* _MTL4_msg_MTL4__ComputePipelineDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::CounterHeapDescriptor* _MTL4_msg_MTL4__CounterHeapDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::FunctionDescriptor* _MTL4_msg_MTL4__FunctionDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::IndirectInstanceAccelerationStructureDescriptor* _MTL4_msg_MTL4__IndirectInstanceAccelerationStructureDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::InstanceAccelerationStructureDescriptor* _MTL4_msg_MTL4__InstanceAccelerationStructureDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::LibraryDescriptor* _MTL4_msg_MTL4__LibraryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::LibraryFunctionDescriptor* _MTL4_msg_MTL4__LibraryFunctionDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::MachineLearningPipelineDescriptor* _MTL4_msg_MTL4__MachineLearningPipelineDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::MachineLearningPipelineReflection* _MTL4_msg_MTL4__MachineLearningPipelineReflectionp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::MeshRenderPipelineDescriptor* _MTL4_msg_MTL4__MeshRenderPipelineDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::PipelineDataSetSerializerDescriptor* _MTL4_msg_MTL4__PipelineDataSetSerializerDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::PipelineDescriptor* _MTL4_msg_MTL4__PipelineDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::PipelineOptions* _MTL4_msg_MTL4__PipelineOptionsp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::PipelineStageDynamicLinkingDescriptor* _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::PrimitiveAccelerationStructureDescriptor* _MTL4_msg_MTL4__PrimitiveAccelerationStructureDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::RenderPassDescriptor* _MTL4_msg_MTL4__RenderPassDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::RenderPipelineBinaryFunctionsDescriptor* _MTL4_msg_MTL4__RenderPipelineBinaryFunctionsDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::RenderPipelineColorAttachmentDescriptorArray* _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::RenderPipelineColorAttachmentDescriptor* _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::RenderPipelineDescriptor* _MTL4_msg_MTL4__RenderPipelineDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::RenderPipelineDynamicLinkingDescriptor* _MTL4_msg_MTL4__RenderPipelineDynamicLinkingDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::SpecializedFunctionDescriptor* _MTL4_msg_MTL4__SpecializedFunctionDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::StaticLinkingDescriptor* _MTL4_msg_MTL4__StaticLinkingDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::StitchedFunctionDescriptor* _MTL4_msg_MTL4__StitchedFunctionDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL4::TileRenderPipelineDescriptor* _MTL4_msg_MTL4__TileRenderPipelineDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +uint64_t _MTL4_msg_uint64_t_allocatedSize(const void*, SEL) __asm__("_objc_msgSend$" "allocatedSize"); +bool _MTL4_msg_bool_allowDuplicateIntersectionFunctionInvocation(const void*, SEL) __asm__("_objc_msgSend$" "allowDuplicateIntersectionFunctionInvocation"); +MTL::BlendOperation _MTL4_msg_MTL__BlendOperation_alphaBlendOperation(const void*, SEL) __asm__("_objc_msgSend$" "alphaBlendOperation"); +MTL4::AlphaToCoverageState _MTL4_msg_MTL4__AlphaToCoverageState_alphaToCoverageState(const void*, SEL) __asm__("_objc_msgSend$" "alphaToCoverageState"); +MTL4::AlphaToOneState _MTL4_msg_MTL4__AlphaToOneState_alphaToOneState(const void*, SEL) __asm__("_objc_msgSend$" "alphaToOneState"); +void _MTL4_msg_v_barrierAfterEncoderStages_beforeEncoderStages_visibilityOptions__MTL__Stages_MTL__Stages_MTL4__VisibilityOptions(const void*, SEL, MTL::Stages, MTL::Stages, MTL4::VisibilityOptions) __asm__("_objc_msgSend$" "barrierAfterEncoderStages:beforeEncoderStages:visibilityOptions:"); +void _MTL4_msg_v_barrierAfterQueueStages_beforeStages_visibilityOptions__MTL__Stages_MTL__Stages_MTL4__VisibilityOptions(const void*, SEL, MTL::Stages, MTL::Stages, MTL4::VisibilityOptions) __asm__("_objc_msgSend$" "barrierAfterQueueStages:beforeStages:visibilityOptions:"); +void _MTL4_msg_v_barrierAfterStages_beforeQueueStages_visibilityOptions__MTL__Stages_MTL__Stages_MTL4__VisibilityOptions(const void*, SEL, MTL::Stages, MTL::Stages, MTL4::VisibilityOptions) __asm__("_objc_msgSend$" "barrierAfterStages:beforeQueueStages:visibilityOptions:"); +void _MTL4_msg_v_beginCommandBufferWithAllocator__MTL4__CommandAllocatorp(const void*, SEL, MTL4::CommandAllocator*) __asm__("_objc_msgSend$" "beginCommandBufferWithAllocator:"); +void _MTL4_msg_v_beginCommandBufferWithAllocator_options__MTL4__CommandAllocatorp_MTL4__CommandBufferOptionsp(const void*, SEL, MTL4::CommandAllocator*, MTL4::CommandBufferOptions*) __asm__("_objc_msgSend$" "beginCommandBufferWithAllocator:options:"); +NS::Array* _MTL4_msg_NS__Arrayp_binaryLinkedFunctions(const void*, SEL) __asm__("_objc_msgSend$" "binaryLinkedFunctions"); +NS::Array* _MTL4_msg_NS__Arrayp_bindings(const void*, SEL) __asm__("_objc_msgSend$" "bindings"); +MTL4::BlendState _MTL4_msg_MTL4__BlendState_blendingState(const void*, SEL) __asm__("_objc_msgSend$" "blendingState"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_boundingBoxBuffer(const void*, SEL) __asm__("_objc_msgSend$" "boundingBoxBuffer"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_boundingBoxBuffers(const void*, SEL) __asm__("_objc_msgSend$" "boundingBoxBuffers"); +NS::UInteger _MTL4_msg_NS__UInteger_boundingBoxCount(const void*, SEL) __asm__("_objc_msgSend$" "boundingBoxCount"); +NS::UInteger _MTL4_msg_NS__UInteger_boundingBoxStride(const void*, SEL) __asm__("_objc_msgSend$" "boundingBoxStride"); +void _MTL4_msg_v_buildAccelerationStructure_descriptor_scratchBuffer__MTL__AccelerationStructurep_MTL4__AccelerationStructureDescriptorp_MTL4__BufferRange(const void*, SEL, MTL::AccelerationStructure*, MTL4::AccelerationStructureDescriptor*, MTL4::BufferRange) __asm__("_objc_msgSend$" "buildAccelerationStructure:descriptor:scratchBuffer:"); +MTL4::LogicalToPhysicalColorAttachmentMappingState _MTL4_msg_MTL4__LogicalToPhysicalColorAttachmentMappingState_colorAttachmentMappingState(const void*, SEL) __asm__("_objc_msgSend$" "colorAttachmentMappingState"); +MTL4::RenderPipelineColorAttachmentDescriptorArray* _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorArrayp_colorAttachments(const void*, SEL) __asm__("_objc_msgSend$" "colorAttachments"); +MTL::RenderPassColorAttachmentDescriptorArray* _MTL4_msg_MTL__RenderPassColorAttachmentDescriptorArrayp_colorAttachments(const void*, SEL) __asm__("_objc_msgSend$" "colorAttachments"); +MTL::TileRenderPipelineColorAttachmentDescriptorArray* _MTL4_msg_MTL__TileRenderPipelineColorAttachmentDescriptorArrayp_colorAttachments(const void*, SEL) __asm__("_objc_msgSend$" "colorAttachments"); +MTL4::CommandBuffer* _MTL4_msg_MTL4__CommandBufferp_commandBuffer(const void*, SEL) __asm__("_objc_msgSend$" "commandBuffer"); +void _MTL4_msg_v_commit_count__constMTL4__CommandBufferpconstp_NS__UInteger(const void*, SEL, const MTL4::CommandBuffer* const *, NS::UInteger) __asm__("_objc_msgSend$" "commit:count:"); +void _MTL4_msg_v_commit_count_options__constMTL4__CommandBufferpconstp_NS__UInteger_MTL4__CommitOptionsp(const void*, SEL, const MTL4::CommandBuffer* const *, NS::UInteger, MTL4::CommitOptions*) __asm__("_objc_msgSend$" "commit:count:options:"); +MTL4::Compiler* _MTL4_msg_MTL4__Compilerp_compiler(const void*, SEL) __asm__("_objc_msgSend$" "compiler"); +MTL4::ComputeCommandEncoder* _MTL4_msg_MTL4__ComputeCommandEncoderp_computeCommandEncoder(const void*, SEL) __asm__("_objc_msgSend$" "computeCommandEncoder"); +MTL4::FunctionDescriptor* _MTL4_msg_MTL4__FunctionDescriptorp_computeFunctionDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "computeFunctionDescriptor"); +MTL4::PipelineDataSetSerializerConfiguration _MTL4_msg_MTL4__PipelineDataSetSerializerConfiguration_configuration(const void*, SEL) __asm__("_objc_msgSend$" "configuration"); +MTL::FunctionConstantValues* _MTL4_msg_MTL__FunctionConstantValuesp_constantValues(const void*, SEL) __asm__("_objc_msgSend$" "constantValues"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_controlPointBuffer(const void*, SEL) __asm__("_objc_msgSend$" "controlPointBuffer"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_controlPointBuffers(const void*, SEL) __asm__("_objc_msgSend$" "controlPointBuffers"); +NS::UInteger _MTL4_msg_NS__UInteger_controlPointCount(const void*, SEL) __asm__("_objc_msgSend$" "controlPointCount"); +MTL::AttributeFormat _MTL4_msg_MTL__AttributeFormat_controlPointFormat(const void*, SEL) __asm__("_objc_msgSend$" "controlPointFormat"); +NS::UInteger _MTL4_msg_NS__UInteger_controlPointStride(const void*, SEL) __asm__("_objc_msgSend$" "controlPointStride"); +void _MTL4_msg_v_copyAccelerationStructure_toAccelerationStructure__MTL__AccelerationStructurep_MTL__AccelerationStructurep(const void*, SEL, MTL::AccelerationStructure*, MTL::AccelerationStructure*) __asm__("_objc_msgSend$" "copyAccelerationStructure:toAccelerationStructure:"); +void _MTL4_msg_v_copyAndCompactAccelerationStructure_toAccelerationStructure__MTL__AccelerationStructurep_MTL__AccelerationStructurep(const void*, SEL, MTL::AccelerationStructure*, MTL::AccelerationStructure*) __asm__("_objc_msgSend$" "copyAndCompactAccelerationStructure:toAccelerationStructure:"); +void _MTL4_msg_v_copyBufferMappingsFromBuffer_toBuffer_operations_count__MTL__Bufferp_MTL__Bufferp_constMTL4__CopySparseBufferMappingOperationp_NS__UInteger(const void*, SEL, MTL::Buffer*, MTL::Buffer*, const MTL4::CopySparseBufferMappingOperation *, NS::UInteger) __asm__("_objc_msgSend$" "copyBufferMappingsFromBuffer:toBuffer:operations:count:"); +void _MTL4_msg_v_copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger, MTL::Size, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin) __asm__("_objc_msgSend$" "copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:"); +void _MTL4_msg_v_copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_options__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__BlitOption(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger, MTL::Size, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin, MTL::BlitOption) __asm__("_objc_msgSend$" "copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:"); +void _MTL4_msg_v_copyFromBuffer_sourceOffset_toBuffer_destinationOffset_size__MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "copyFromBuffer:sourceOffset:toBuffer:destinationOffset:size:"); +void _MTL4_msg_v_copyFromTensor_sourceOrigin_sourceDimensions_toTensor_destinationOrigin_destinationDimensions__MTL__Tensorp_MTL__TensorExtentsp_MTL__TensorExtentsp_MTL__Tensorp_MTL__TensorExtentsp_MTL__TensorExtentsp(const void*, SEL, MTL::Tensor*, MTL::TensorExtents*, MTL::TensorExtents*, MTL::Tensor*, MTL::TensorExtents*, MTL::TensorExtents*) __asm__("_objc_msgSend$" "copyFromTensor:sourceOrigin:sourceDimensions:toTensor:destinationOrigin:destinationDimensions:"); +void _MTL4_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin, MTL::Size, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage:"); +void _MTL4_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage_options__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__BlitOption(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin, MTL::Size, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger, MTL::BlitOption) __asm__("_objc_msgSend$" "copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage:options:"); +void _MTL4_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin, MTL::Size, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin) __asm__("_objc_msgSend$" "copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:"); +void _MTL4_msg_v_copyFromTexture_sourceSlice_sourceLevel_toTexture_destinationSlice_destinationLevel_sliceCount_levelCount__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Texturep_NS__UInteger_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Texture*, NS::UInteger, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount:"); +void _MTL4_msg_v_copyFromTexture_toTexture__MTL__Texturep_MTL__Texturep(const void*, SEL, MTL::Texture*, MTL::Texture*) __asm__("_objc_msgSend$" "copyFromTexture:toTexture:"); +void _MTL4_msg_v_copyIndirectCommandBuffer_sourceRange_destination_destinationIndex__MTL__IndirectCommandBufferp_NS__Range_MTL__IndirectCommandBufferp_NS__UInteger(const void*, SEL, MTL::IndirectCommandBuffer*, NS::Range, MTL::IndirectCommandBuffer*, NS::UInteger) __asm__("_objc_msgSend$" "copyIndirectCommandBuffer:sourceRange:destination:destinationIndex:"); +void _MTL4_msg_v_copyTextureMappingsFromTexture_toTexture_operations_count__MTL__Texturep_MTL__Texturep_constMTL4__CopySparseTextureMappingOperationp_NS__UInteger(const void*, SEL, MTL::Texture*, MTL::Texture*, const MTL4::CopySparseTextureMappingOperation *, NS::UInteger) __asm__("_objc_msgSend$" "copyTextureMappingsFromTexture:toTexture:operations:count:"); +NS::UInteger _MTL4_msg_NS__UInteger_count(const void*, SEL) __asm__("_objc_msgSend$" "count"); +MTL::CurveBasis _MTL4_msg_MTL__CurveBasis_curveBasis(const void*, SEL) __asm__("_objc_msgSend$" "curveBasis"); +MTL::CurveEndCaps _MTL4_msg_MTL__CurveEndCaps_curveEndCaps(const void*, SEL) __asm__("_objc_msgSend$" "curveEndCaps"); +MTL::CurveType _MTL4_msg_MTL__CurveType_curveType(const void*, SEL) __asm__("_objc_msgSend$" "curveType"); +NS::UInteger _MTL4_msg_NS__UInteger_defaultRasterSampleCount(const void*, SEL) __asm__("_objc_msgSend$" "defaultRasterSampleCount"); +MTL::RenderPassDepthAttachmentDescriptor* _MTL4_msg_MTL__RenderPassDepthAttachmentDescriptorp_depthAttachment(const void*, SEL) __asm__("_objc_msgSend$" "depthAttachment"); +MTL::BlendFactor _MTL4_msg_MTL__BlendFactor_destinationAlphaBlendFactor(const void*, SEL) __asm__("_objc_msgSend$" "destinationAlphaBlendFactor"); +MTL::BlendFactor _MTL4_msg_MTL__BlendFactor_destinationRGBBlendFactor(const void*, SEL) __asm__("_objc_msgSend$" "destinationRGBBlendFactor"); +MTL::Device* _MTL4_msg_MTL__Devicep_device(const void*, SEL) __asm__("_objc_msgSend$" "device"); +void _MTL4_msg_v_dispatchNetworkWithIntermediatesHeap__MTL__Heapp(const void*, SEL, MTL::Heap*) __asm__("_objc_msgSend$" "dispatchNetworkWithIntermediatesHeap:"); +void _MTL4_msg_v_dispatchThreadgroups_threadsPerThreadgroup__MTL__Size_MTL__Size(const void*, SEL, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "dispatchThreadgroups:threadsPerThreadgroup:"); +void _MTL4_msg_v_dispatchThreadgroupsWithIndirectBuffer_threadsPerThreadgroup__MTL__GPUAddress_MTL__Size(const void*, SEL, MTL::GPUAddress, MTL::Size) __asm__("_objc_msgSend$" "dispatchThreadgroupsWithIndirectBuffer:threadsPerThreadgroup:"); +void _MTL4_msg_v_dispatchThreads_threadsPerThreadgroup__MTL__Size_MTL__Size(const void*, SEL, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "dispatchThreads:threadsPerThreadgroup:"); +void _MTL4_msg_v_dispatchThreadsPerTile__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "dispatchThreadsPerTile:"); +void _MTL4_msg_v_dispatchThreadsWithIndirectBuffer__MTL__GPUAddress(const void*, SEL, MTL::GPUAddress) __asm__("_objc_msgSend$" "dispatchThreadsWithIndirectBuffer:"); +void _MTL4_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__GPUAddress_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, MTL::IndexType, MTL::GPUAddress, NS::UInteger) __asm__("_objc_msgSend$" "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferLength:"); +void _MTL4_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength_instanceCount__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__GPUAddress_NS__UInteger_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, MTL::IndexType, MTL::GPUAddress, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferLength:instanceCount:"); +void _MTL4_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength_instanceCount_baseVertex_baseInstance__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__GPUAddress_NS__UInteger_NS__UInteger_NS__Integer_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, MTL::IndexType, MTL::GPUAddress, NS::UInteger, NS::UInteger, NS::Integer, NS::UInteger) __asm__("_objc_msgSend$" "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferLength:instanceCount:baseVertex:baseInstance:"); +void _MTL4_msg_v_drawIndexedPrimitives_indexType_indexBuffer_indexBufferLength_indirectBuffer__MTL__PrimitiveType_MTL__IndexType_MTL__GPUAddress_NS__UInteger_MTL__GPUAddress(const void*, SEL, MTL::PrimitiveType, MTL::IndexType, MTL::GPUAddress, NS::UInteger, MTL::GPUAddress) __asm__("_objc_msgSend$" "drawIndexedPrimitives:indexType:indexBuffer:indexBufferLength:indirectBuffer:"); +void _MTL4_msg_v_drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Size_MTL__Size_MTL__Size(const void*, SEL, MTL::Size, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:"); +void _MTL4_msg_v_drawMeshThreadgroupsWithIndirectBuffer_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__GPUAddress_MTL__Size_MTL__Size(const void*, SEL, MTL::GPUAddress, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "drawMeshThreadgroupsWithIndirectBuffer:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:"); +void _MTL4_msg_v_drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Size_MTL__Size_MTL__Size(const void*, SEL, MTL::Size, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "drawMeshThreads:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:"); +void _MTL4_msg_v_drawPrimitives_indirectBuffer__MTL__PrimitiveType_MTL__GPUAddress(const void*, SEL, MTL::PrimitiveType, MTL::GPUAddress) __asm__("_objc_msgSend$" "drawPrimitives:indirectBuffer:"); +void _MTL4_msg_v_drawPrimitives_vertexStart_vertexCount__MTL__PrimitiveType_NS__UInteger_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawPrimitives:vertexStart:vertexCount:"); +void _MTL4_msg_v_drawPrimitives_vertexStart_vertexCount_instanceCount__MTL__PrimitiveType_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawPrimitives:vertexStart:vertexCount:instanceCount:"); +void _MTL4_msg_v_drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance__MTL__PrimitiveType_NS__UInteger_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawPrimitives:vertexStart:vertexCount:instanceCount:baseInstance:"); +void _MTL4_msg_v_endCommandBuffer(const void*, SEL) __asm__("_objc_msgSend$" "endCommandBuffer"); +void _MTL4_msg_v_endEncoding(const void*, SEL) __asm__("_objc_msgSend$" "endEncoding"); +NS::Error* _MTL4_msg_NS__Errorp_error(const void*, SEL) __asm__("_objc_msgSend$" "error"); +void _MTL4_msg_v_executeCommandsInBuffer_indirectBuffer__MTL__IndirectCommandBufferp_MTL__GPUAddress(const void*, SEL, MTL::IndirectCommandBuffer*, MTL::GPUAddress) __asm__("_objc_msgSend$" "executeCommandsInBuffer:indirectBuffer:"); +void _MTL4_msg_v_executeCommandsInBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range(const void*, SEL, MTL::IndirectCommandBuffer*, NS::Range) __asm__("_objc_msgSend$" "executeCommandsInBuffer:withRange:"); +dispatch_queue_t _MTL4_msg_dispatch_queue_t_feedbackQueue(const void*, SEL) __asm__("_objc_msgSend$" "feedbackQueue"); +void _MTL4_msg_v_fillBuffer_range_value__MTL__Bufferp_NS__Range_uint8_t(const void*, SEL, MTL::Buffer*, NS::Range, uint8_t) __asm__("_objc_msgSend$" "fillBuffer:range:value:"); +NS::Array* _MTL4_msg_NS__Arrayp_fragmentAdditionalBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "fragmentAdditionalBinaryFunctions"); +MTL4::FunctionDescriptor* _MTL4_msg_MTL4__FunctionDescriptorp_fragmentFunctionDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "fragmentFunctionDescriptor"); +MTL4::PipelineStageDynamicLinkingDescriptor* _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_fragmentLinkingDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "fragmentLinkingDescriptor"); +MTL4::StaticLinkingDescriptor* _MTL4_msg_MTL4__StaticLinkingDescriptorp_fragmentStaticLinkingDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "fragmentStaticLinkingDescriptor"); +MTL4::FunctionDescriptor* _MTL4_msg_MTL4__FunctionDescriptorp_functionDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "functionDescriptor"); +NS::Array* _MTL4_msg_NS__Arrayp_functionDescriptors(const void*, SEL) __asm__("_objc_msgSend$" "functionDescriptors"); +MTL::FunctionStitchingGraph* _MTL4_msg_MTL__FunctionStitchingGraphp_functionGraph(const void*, SEL) __asm__("_objc_msgSend$" "functionGraph"); +MTL::FunctionType _MTL4_msg_MTL__FunctionType_functionType(const void*, SEL) __asm__("_objc_msgSend$" "functionType"); +void _MTL4_msg_v_generateMipmapsForTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "generateMipmapsForTexture:"); +NS::Array* _MTL4_msg_NS__Arrayp_geometryDescriptors(const void*, SEL) __asm__("_objc_msgSend$" "geometryDescriptors"); +NS::UInteger _MTL4_msg_NS__UInteger_getSamplePositions_count__MTL__SamplePositionp_NS__UInteger(const void*, SEL, MTL::SamplePosition*, NS::UInteger) __asm__("_objc_msgSend$" "getSamplePositions:count:"); +NS::Dictionary* _MTL4_msg_NS__Dictionaryp_groups(const void*, SEL) __asm__("_objc_msgSend$" "groups"); +NS::UInteger _MTL4_msg_NS__UInteger_imageblockSampleLength(const void*, SEL) __asm__("_objc_msgSend$" "imageblockSampleLength"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_indexBuffer(const void*, SEL) __asm__("_objc_msgSend$" "indexBuffer"); +MTL::IndexType _MTL4_msg_MTL__IndexType_indexType(const void*, SEL) __asm__("_objc_msgSend$" "indexType"); +MTL4::AccelerationStructureBoundingBoxGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureBoundingBoxGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::AccelerationStructureCurveGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureCurveGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::AccelerationStructureDescriptor* _MTL4_msg_MTL4__AccelerationStructureDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::AccelerationStructureGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::AccelerationStructureMotionBoundingBoxGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureMotionBoundingBoxGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::AccelerationStructureMotionCurveGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureMotionCurveGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::AccelerationStructureMotionTriangleGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureMotionTriangleGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::AccelerationStructureTriangleGeometryDescriptor* _MTL4_msg_MTL4__AccelerationStructureTriangleGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::ArgumentTableDescriptor* _MTL4_msg_MTL4__ArgumentTableDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::BinaryFunctionDescriptor* _MTL4_msg_MTL4__BinaryFunctionDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::CommandAllocatorDescriptor* _MTL4_msg_MTL4__CommandAllocatorDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::CommandBufferOptions* _MTL4_msg_MTL4__CommandBufferOptionsp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::CommandQueueDescriptor* _MTL4_msg_MTL4__CommandQueueDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::CommitOptions* _MTL4_msg_MTL4__CommitOptionsp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::CompilerDescriptor* _MTL4_msg_MTL4__CompilerDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::CompilerTaskOptions* _MTL4_msg_MTL4__CompilerTaskOptionsp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::ComputePipelineDescriptor* _MTL4_msg_MTL4__ComputePipelineDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::CounterHeapDescriptor* _MTL4_msg_MTL4__CounterHeapDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::FunctionDescriptor* _MTL4_msg_MTL4__FunctionDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::IndirectInstanceAccelerationStructureDescriptor* _MTL4_msg_MTL4__IndirectInstanceAccelerationStructureDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::InstanceAccelerationStructureDescriptor* _MTL4_msg_MTL4__InstanceAccelerationStructureDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::LibraryDescriptor* _MTL4_msg_MTL4__LibraryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::LibraryFunctionDescriptor* _MTL4_msg_MTL4__LibraryFunctionDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::MachineLearningPipelineDescriptor* _MTL4_msg_MTL4__MachineLearningPipelineDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::MachineLearningPipelineReflection* _MTL4_msg_MTL4__MachineLearningPipelineReflectionp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::MeshRenderPipelineDescriptor* _MTL4_msg_MTL4__MeshRenderPipelineDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::PipelineDataSetSerializerDescriptor* _MTL4_msg_MTL4__PipelineDataSetSerializerDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::PipelineDescriptor* _MTL4_msg_MTL4__PipelineDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::PipelineOptions* _MTL4_msg_MTL4__PipelineOptionsp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::PipelineStageDynamicLinkingDescriptor* _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::PrimitiveAccelerationStructureDescriptor* _MTL4_msg_MTL4__PrimitiveAccelerationStructureDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::RenderPassDescriptor* _MTL4_msg_MTL4__RenderPassDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::RenderPipelineBinaryFunctionsDescriptor* _MTL4_msg_MTL4__RenderPipelineBinaryFunctionsDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::RenderPipelineColorAttachmentDescriptorArray* _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::RenderPipelineColorAttachmentDescriptor* _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::RenderPipelineDescriptor* _MTL4_msg_MTL4__RenderPipelineDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::RenderPipelineDynamicLinkingDescriptor* _MTL4_msg_MTL4__RenderPipelineDynamicLinkingDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::SpecializedFunctionDescriptor* _MTL4_msg_MTL4__SpecializedFunctionDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::StaticLinkingDescriptor* _MTL4_msg_MTL4__StaticLinkingDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::StitchedFunctionDescriptor* _MTL4_msg_MTL4__StitchedFunctionDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL4::TileRenderPipelineDescriptor* _MTL4_msg_MTL4__TileRenderPipelineDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +bool _MTL4_msg_bool_initializeBindings(const void*, SEL) __asm__("_objc_msgSend$" "initializeBindings"); +MTL::TensorExtents* _MTL4_msg_MTL__TensorExtentsp_inputDimensionsAtBufferIndex__NS__Integer(const void*, SEL, NS::Integer) __asm__("_objc_msgSend$" "inputDimensionsAtBufferIndex:"); +MTL::PrimitiveTopologyClass _MTL4_msg_MTL__PrimitiveTopologyClass_inputPrimitiveTopology(const void*, SEL) __asm__("_objc_msgSend$" "inputPrimitiveTopology"); +void _MTL4_msg_v_insertDebugSignpost__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "insertDebugSignpost:"); +NS::UInteger _MTL4_msg_NS__UInteger_instanceCount(const void*, SEL) __asm__("_objc_msgSend$" "instanceCount"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_instanceCountBuffer(const void*, SEL) __asm__("_objc_msgSend$" "instanceCountBuffer"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_instanceDescriptorBuffer(const void*, SEL) __asm__("_objc_msgSend$" "instanceDescriptorBuffer"); +NS::UInteger _MTL4_msg_NS__UInteger_instanceDescriptorStride(const void*, SEL) __asm__("_objc_msgSend$" "instanceDescriptorStride"); +MTL::AccelerationStructureInstanceDescriptorType _MTL4_msg_MTL__AccelerationStructureInstanceDescriptorType_instanceDescriptorType(const void*, SEL) __asm__("_objc_msgSend$" "instanceDescriptorType"); +MTL::MatrixLayout _MTL4_msg_MTL__MatrixLayout_instanceTransformationMatrixLayout(const void*, SEL) __asm__("_objc_msgSend$" "instanceTransformationMatrixLayout"); +NS::UInteger _MTL4_msg_NS__UInteger_intermediatesHeapSize(const void*, SEL) __asm__("_objc_msgSend$" "intermediatesHeapSize"); +NS::UInteger _MTL4_msg_NS__UInteger_intersectionFunctionTableOffset(const void*, SEL) __asm__("_objc_msgSend$" "intersectionFunctionTableOffset"); +void _MTL4_msg_v_invalidateCounterRange__NS__Range(const void*, SEL, NS::Range) __asm__("_objc_msgSend$" "invalidateCounterRange:"); +bool _MTL4_msg_bool_isRasterizationEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isRasterizationEnabled"); +NS::String* _MTL4_msg_NS__Stringp_label(const void*, SEL) __asm__("_objc_msgSend$" "label"); +MTL::Library* _MTL4_msg_MTL__Libraryp_library(const void*, SEL) __asm__("_objc_msgSend$" "library"); +MTL::LogState* _MTL4_msg_MTL__LogStatep_logState(const void*, SEL) __asm__("_objc_msgSend$" "logState"); +NS::Array* _MTL4_msg_NS__Arrayp_lookupArchives(const void*, SEL) __asm__("_objc_msgSend$" "lookupArchives"); +MTL4::MachineLearningCommandEncoder* _MTL4_msg_MTL4__MachineLearningCommandEncoderp_machineLearningCommandEncoder(const void*, SEL) __asm__("_objc_msgSend$" "machineLearningCommandEncoder"); +MTL4::FunctionDescriptor* _MTL4_msg_MTL4__FunctionDescriptorp_machineLearningFunctionDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "machineLearningFunctionDescriptor"); +NS::UInteger _MTL4_msg_NS__UInteger_maxBufferBindCount(const void*, SEL) __asm__("_objc_msgSend$" "maxBufferBindCount"); +NS::UInteger _MTL4_msg_NS__UInteger_maxCallStackDepth(const void*, SEL) __asm__("_objc_msgSend$" "maxCallStackDepth"); +NS::UInteger _MTL4_msg_NS__UInteger_maxInstanceCount(const void*, SEL) __asm__("_objc_msgSend$" "maxInstanceCount"); +NS::UInteger _MTL4_msg_NS__UInteger_maxMotionTransformCount(const void*, SEL) __asm__("_objc_msgSend$" "maxMotionTransformCount"); +NS::UInteger _MTL4_msg_NS__UInteger_maxSamplerStateBindCount(const void*, SEL) __asm__("_objc_msgSend$" "maxSamplerStateBindCount"); +NS::UInteger _MTL4_msg_NS__UInteger_maxTextureBindCount(const void*, SEL) __asm__("_objc_msgSend$" "maxTextureBindCount"); +NS::UInteger _MTL4_msg_NS__UInteger_maxTotalThreadgroupsPerMeshGrid(const void*, SEL) __asm__("_objc_msgSend$" "maxTotalThreadgroupsPerMeshGrid"); +NS::UInteger _MTL4_msg_NS__UInteger_maxTotalThreadsPerMeshThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "maxTotalThreadsPerMeshThreadgroup"); +NS::UInteger _MTL4_msg_NS__UInteger_maxTotalThreadsPerObjectThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "maxTotalThreadsPerObjectThreadgroup"); +NS::UInteger _MTL4_msg_NS__UInteger_maxTotalThreadsPerThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "maxTotalThreadsPerThreadgroup"); +NS::UInteger _MTL4_msg_NS__UInteger_maxVertexAmplificationCount(const void*, SEL) __asm__("_objc_msgSend$" "maxVertexAmplificationCount"); +NS::Array* _MTL4_msg_NS__Arrayp_meshAdditionalBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "meshAdditionalBinaryFunctions"); +MTL4::FunctionDescriptor* _MTL4_msg_MTL4__FunctionDescriptorp_meshFunctionDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "meshFunctionDescriptor"); +MTL4::PipelineStageDynamicLinkingDescriptor* _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_meshLinkingDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "meshLinkingDescriptor"); +MTL4::StaticLinkingDescriptor* _MTL4_msg_MTL4__StaticLinkingDescriptorp_meshStaticLinkingDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "meshStaticLinkingDescriptor"); +bool _MTL4_msg_bool_meshThreadgroupSizeIsMultipleOfThreadExecutionWidth(const void*, SEL) __asm__("_objc_msgSend$" "meshThreadgroupSizeIsMultipleOfThreadExecutionWidth"); +MTL::MotionBorderMode _MTL4_msg_MTL__MotionBorderMode_motionEndBorderMode(const void*, SEL) __asm__("_objc_msgSend$" "motionEndBorderMode"); +float _MTL4_msg_float_motionEndTime(const void*, SEL) __asm__("_objc_msgSend$" "motionEndTime"); +NS::UInteger _MTL4_msg_NS__UInteger_motionKeyframeCount(const void*, SEL) __asm__("_objc_msgSend$" "motionKeyframeCount"); +MTL::MotionBorderMode _MTL4_msg_MTL__MotionBorderMode_motionStartBorderMode(const void*, SEL) __asm__("_objc_msgSend$" "motionStartBorderMode"); +float _MTL4_msg_float_motionStartTime(const void*, SEL) __asm__("_objc_msgSend$" "motionStartTime"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_motionTransformBuffer(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformBuffer"); +NS::UInteger _MTL4_msg_NS__UInteger_motionTransformCount(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformCount"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_motionTransformCountBuffer(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformCountBuffer"); +NS::UInteger _MTL4_msg_NS__UInteger_motionTransformStride(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformStride"); +MTL::TransformType _MTL4_msg_MTL__TransformType_motionTransformType(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformType"); +NS::String* _MTL4_msg_NS__Stringp_name(const void*, SEL) __asm__("_objc_msgSend$" "name"); +MTL4::CompilerTask* _MTL4_msg_MTL4__CompilerTaskp_newBinaryFunctionWithDescriptor_compilerTaskOptions_completionHandler__MTL4__BinaryFunctionDescriptorp_MTL4__CompilerTaskOptionsp_MTL4__NewBinaryFunctionCompletionHandler(const void*, SEL, MTL4::BinaryFunctionDescriptor*, MTL4::CompilerTaskOptions*, MTL4::NewBinaryFunctionCompletionHandler) __asm__("_objc_msgSend$" "newBinaryFunctionWithDescriptor:compilerTaskOptions:completionHandler:"); +MTL4::BinaryFunction* _MTL4_msg_MTL4__BinaryFunctionp_newBinaryFunctionWithDescriptor_compilerTaskOptions_error__MTL4__BinaryFunctionDescriptorp_MTL4__CompilerTaskOptionsp_NS__Errorpp(const void*, SEL, MTL4::BinaryFunctionDescriptor*, MTL4::CompilerTaskOptions*, NS::Error**) __asm__("_objc_msgSend$" "newBinaryFunctionWithDescriptor:compilerTaskOptions:error:"); +MTL4::BinaryFunction* _MTL4_msg_MTL4__BinaryFunctionp_newBinaryFunctionWithDescriptor_error__MTL4__BinaryFunctionDescriptorp_NS__Errorpp(const void*, SEL, MTL4::BinaryFunctionDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newBinaryFunctionWithDescriptor:error:"); +MTL4::CompilerTask* _MTL4_msg_MTL4__CompilerTaskp_newComputePipelineStateWithDescriptor_compilerTaskOptions_completionHandler__MTL4__ComputePipelineDescriptorp_MTL4__CompilerTaskOptionsp_MTL__NewComputePipelineStateCompletionHandler(const void*, SEL, MTL4::ComputePipelineDescriptor*, MTL4::CompilerTaskOptions*, MTL::NewComputePipelineStateCompletionHandler) __asm__("_objc_msgSend$" "newComputePipelineStateWithDescriptor:compilerTaskOptions:completionHandler:"); +MTL::ComputePipelineState* _MTL4_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithDescriptor_compilerTaskOptions_error__MTL4__ComputePipelineDescriptorp_MTL4__CompilerTaskOptionsp_NS__Errorpp(const void*, SEL, MTL4::ComputePipelineDescriptor*, MTL4::CompilerTaskOptions*, NS::Error**) __asm__("_objc_msgSend$" "newComputePipelineStateWithDescriptor:compilerTaskOptions:error:"); +MTL4::CompilerTask* _MTL4_msg_MTL4__CompilerTaskp_newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_completionHandler__MTL4__ComputePipelineDescriptorp_MTL4__PipelineStageDynamicLinkingDescriptorp_MTL4__CompilerTaskOptionsp_MTL__NewComputePipelineStateCompletionHandler(const void*, SEL, MTL4::ComputePipelineDescriptor*, MTL4::PipelineStageDynamicLinkingDescriptor*, MTL4::CompilerTaskOptions*, MTL::NewComputePipelineStateCompletionHandler) __asm__("_objc_msgSend$" "newComputePipelineStateWithDescriptor:dynamicLinkingDescriptor:compilerTaskOptions:completionHandler:"); +MTL::ComputePipelineState* _MTL4_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_error__MTL4__ComputePipelineDescriptorp_MTL4__PipelineStageDynamicLinkingDescriptorp_MTL4__CompilerTaskOptionsp_NS__Errorpp(const void*, SEL, MTL4::ComputePipelineDescriptor*, MTL4::PipelineStageDynamicLinkingDescriptor*, MTL4::CompilerTaskOptions*, NS::Error**) __asm__("_objc_msgSend$" "newComputePipelineStateWithDescriptor:dynamicLinkingDescriptor:compilerTaskOptions:error:"); +MTL::ComputePipelineState* _MTL4_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_error__MTL4__ComputePipelineDescriptorp_MTL4__PipelineStageDynamicLinkingDescriptorp_NS__Errorpp(const void*, SEL, MTL4::ComputePipelineDescriptor*, MTL4::PipelineStageDynamicLinkingDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newComputePipelineStateWithDescriptor:dynamicLinkingDescriptor:error:"); +MTL::ComputePipelineState* _MTL4_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithDescriptor_error__MTL4__ComputePipelineDescriptorp_NS__Errorpp(const void*, SEL, MTL4::ComputePipelineDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newComputePipelineStateWithDescriptor:error:"); +MTL4::CompilerTask* _MTL4_msg_MTL4__CompilerTaskp_newDynamicLibrary_completionHandler__MTL__Libraryp_MTL__NewDynamicLibraryCompletionHandler(const void*, SEL, MTL::Library*, MTL::NewDynamicLibraryCompletionHandler) __asm__("_objc_msgSend$" "newDynamicLibrary:completionHandler:"); +MTL::DynamicLibrary* _MTL4_msg_MTL__DynamicLibraryp_newDynamicLibrary_error__MTL__Libraryp_NS__Errorpp(const void*, SEL, MTL::Library*, NS::Error**) __asm__("_objc_msgSend$" "newDynamicLibrary:error:"); +MTL4::CompilerTask* _MTL4_msg_MTL4__CompilerTaskp_newDynamicLibraryWithURL_completionHandler__NS__URLp_MTL__NewDynamicLibraryCompletionHandler(const void*, SEL, NS::URL*, MTL::NewDynamicLibraryCompletionHandler) __asm__("_objc_msgSend$" "newDynamicLibraryWithURL:completionHandler:"); +MTL::DynamicLibrary* _MTL4_msg_MTL__DynamicLibraryp_newDynamicLibraryWithURL_error__NS__URLp_NS__Errorpp(const void*, SEL, NS::URL*, NS::Error**) __asm__("_objc_msgSend$" "newDynamicLibraryWithURL:error:"); +MTL4::CompilerTask* _MTL4_msg_MTL4__CompilerTaskp_newLibraryWithDescriptor_completionHandler__MTL4__LibraryDescriptorp_MTL__NewLibraryCompletionHandler(const void*, SEL, MTL4::LibraryDescriptor*, MTL::NewLibraryCompletionHandler) __asm__("_objc_msgSend$" "newLibraryWithDescriptor:completionHandler:"); +MTL::Library* _MTL4_msg_MTL__Libraryp_newLibraryWithDescriptor_error__MTL4__LibraryDescriptorp_NS__Errorpp(const void*, SEL, MTL4::LibraryDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newLibraryWithDescriptor:error:"); +MTL4::CompilerTask* _MTL4_msg_MTL4__CompilerTaskp_newMachineLearningPipelineStateWithDescriptor_completionHandler__MTL4__MachineLearningPipelineDescriptorp_MTL4__NewMachineLearningPipelineStateCompletionHandler(const void*, SEL, MTL4::MachineLearningPipelineDescriptor*, MTL4::NewMachineLearningPipelineStateCompletionHandler) __asm__("_objc_msgSend$" "newMachineLearningPipelineStateWithDescriptor:completionHandler:"); +MTL4::MachineLearningPipelineState* _MTL4_msg_MTL4__MachineLearningPipelineStatep_newMachineLearningPipelineStateWithDescriptor_error__MTL4__MachineLearningPipelineDescriptorp_NS__Errorpp(const void*, SEL, MTL4::MachineLearningPipelineDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newMachineLearningPipelineStateWithDescriptor:error:"); +MTL4::CompilerTask* _MTL4_msg_MTL4__CompilerTaskp_newRenderPipelineStateBySpecializationWithDescriptor_pipeline_completionHandler__MTL4__PipelineDescriptorp_MTL__RenderPipelineStatep_MTL__NewRenderPipelineStateCompletionHandler(const void*, SEL, MTL4::PipelineDescriptor*, MTL::RenderPipelineState*, MTL::NewRenderPipelineStateCompletionHandler) __asm__("_objc_msgSend$" "newRenderPipelineStateBySpecializationWithDescriptor:pipeline:completionHandler:"); +MTL::RenderPipelineState* _MTL4_msg_MTL__RenderPipelineStatep_newRenderPipelineStateBySpecializationWithDescriptor_pipeline_error__MTL4__PipelineDescriptorp_MTL__RenderPipelineStatep_NS__Errorpp(const void*, SEL, MTL4::PipelineDescriptor*, MTL::RenderPipelineState*, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateBySpecializationWithDescriptor:pipeline:error:"); +MTL4::CompilerTask* _MTL4_msg_MTL4__CompilerTaskp_newRenderPipelineStateWithDescriptor_compilerTaskOptions_completionHandler__MTL4__PipelineDescriptorp_MTL4__CompilerTaskOptionsp_MTL__NewRenderPipelineStateCompletionHandler(const void*, SEL, MTL4::PipelineDescriptor*, MTL4::CompilerTaskOptions*, MTL::NewRenderPipelineStateCompletionHandler) __asm__("_objc_msgSend$" "newRenderPipelineStateWithDescriptor:compilerTaskOptions:completionHandler:"); +MTL::RenderPipelineState* _MTL4_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_compilerTaskOptions_error__MTL4__PipelineDescriptorp_MTL4__CompilerTaskOptionsp_NS__Errorpp(const void*, SEL, MTL4::PipelineDescriptor*, MTL4::CompilerTaskOptions*, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateWithDescriptor:compilerTaskOptions:error:"); +MTL4::CompilerTask* _MTL4_msg_MTL4__CompilerTaskp_newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_completionHandler__MTL4__PipelineDescriptorp_MTL4__RenderPipelineDynamicLinkingDescriptorp_MTL4__CompilerTaskOptionsp_MTL__NewRenderPipelineStateCompletionHandler(const void*, SEL, MTL4::PipelineDescriptor*, MTL4::RenderPipelineDynamicLinkingDescriptor*, MTL4::CompilerTaskOptions*, MTL::NewRenderPipelineStateCompletionHandler) __asm__("_objc_msgSend$" "newRenderPipelineStateWithDescriptor:dynamicLinkingDescriptor:compilerTaskOptions:completionHandler:"); +MTL::RenderPipelineState* _MTL4_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_error__MTL4__PipelineDescriptorp_MTL4__RenderPipelineDynamicLinkingDescriptorp_MTL4__CompilerTaskOptionsp_NS__Errorpp(const void*, SEL, MTL4::PipelineDescriptor*, MTL4::RenderPipelineDynamicLinkingDescriptor*, MTL4::CompilerTaskOptions*, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateWithDescriptor:dynamicLinkingDescriptor:compilerTaskOptions:error:"); +MTL::RenderPipelineState* _MTL4_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_error__MTL4__PipelineDescriptorp_MTL4__RenderPipelineDynamicLinkingDescriptorp_NS__Errorpp(const void*, SEL, MTL4::PipelineDescriptor*, MTL4::RenderPipelineDynamicLinkingDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateWithDescriptor:dynamicLinkingDescriptor:error:"); +MTL::RenderPipelineState* _MTL4_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_error__MTL4__PipelineDescriptorp_NS__Errorpp(const void*, SEL, MTL4::PipelineDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateWithDescriptor:error:"); +NS::Array* _MTL4_msg_NS__Arrayp_objectAdditionalBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "objectAdditionalBinaryFunctions"); +MTL4::RenderPipelineColorAttachmentDescriptor* _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL4::FunctionDescriptor* _MTL4_msg_MTL4__FunctionDescriptorp_objectFunctionDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "objectFunctionDescriptor"); +MTL4::PipelineStageDynamicLinkingDescriptor* _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_objectLinkingDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "objectLinkingDescriptor"); +MTL4::StaticLinkingDescriptor* _MTL4_msg_MTL4__StaticLinkingDescriptorp_objectStaticLinkingDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "objectStaticLinkingDescriptor"); +bool _MTL4_msg_bool_objectThreadgroupSizeIsMultipleOfThreadExecutionWidth(const void*, SEL) __asm__("_objc_msgSend$" "objectThreadgroupSizeIsMultipleOfThreadExecutionWidth"); +bool _MTL4_msg_bool_opaque(const void*, SEL) __asm__("_objc_msgSend$" "opaque"); +void _MTL4_msg_v_optimizeContentsForGPUAccess__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "optimizeContentsForGPUAccess:"); +void _MTL4_msg_v_optimizeContentsForGPUAccess_slice_level__MTL__Texturep_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "optimizeContentsForGPUAccess:slice:level:"); +void _MTL4_msg_v_optimizeIndirectCommandBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range(const void*, SEL, MTL::IndirectCommandBuffer*, NS::Range) __asm__("_objc_msgSend$" "optimizeIndirectCommandBuffer:withRange:"); +MTL4::BinaryFunctionOptions _MTL4_msg_MTL4__BinaryFunctionOptions_options(const void*, SEL) __asm__("_objc_msgSend$" "options"); +MTL4::PipelineOptions* _MTL4_msg_MTL4__PipelineOptionsp_options(const void*, SEL) __asm__("_objc_msgSend$" "options"); +MTL::CompileOptions* _MTL4_msg_MTL__CompileOptionsp_options(const void*, SEL) __asm__("_objc_msgSend$" "options"); +NS::UInteger _MTL4_msg_NS__UInteger_payloadMemoryLength(const void*, SEL) __asm__("_objc_msgSend$" "payloadMemoryLength"); +MTL4::PipelineDataSetSerializer* _MTL4_msg_MTL4__PipelineDataSetSerializerp_pipelineDataSetSerializer(const void*, SEL) __asm__("_objc_msgSend$" "pipelineDataSetSerializer"); +MTL::PixelFormat _MTL4_msg_MTL__PixelFormat_pixelFormat(const void*, SEL) __asm__("_objc_msgSend$" "pixelFormat"); +void _MTL4_msg_v_popDebugGroup(const void*, SEL) __asm__("_objc_msgSend$" "popDebugGroup"); +NS::Array* _MTL4_msg_NS__Arrayp_preloadedLibraries(const void*, SEL) __asm__("_objc_msgSend$" "preloadedLibraries"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_primitiveDataBuffer(const void*, SEL) __asm__("_objc_msgSend$" "primitiveDataBuffer"); +NS::UInteger _MTL4_msg_NS__UInteger_primitiveDataElementSize(const void*, SEL) __asm__("_objc_msgSend$" "primitiveDataElementSize"); +NS::UInteger _MTL4_msg_NS__UInteger_primitiveDataStride(const void*, SEL) __asm__("_objc_msgSend$" "primitiveDataStride"); +NS::Array* _MTL4_msg_NS__Arrayp_privateFunctionDescriptors(const void*, SEL) __asm__("_objc_msgSend$" "privateFunctionDescriptors"); +void _MTL4_msg_v_pushDebugGroup__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "pushDebugGroup:"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_radiusBuffer(const void*, SEL) __asm__("_objc_msgSend$" "radiusBuffer"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_radiusBuffers(const void*, SEL) __asm__("_objc_msgSend$" "radiusBuffers"); +MTL::AttributeFormat _MTL4_msg_MTL__AttributeFormat_radiusFormat(const void*, SEL) __asm__("_objc_msgSend$" "radiusFormat"); +NS::UInteger _MTL4_msg_NS__UInteger_radiusStride(const void*, SEL) __asm__("_objc_msgSend$" "radiusStride"); +NS::UInteger _MTL4_msg_NS__UInteger_rasterSampleCount(const void*, SEL) __asm__("_objc_msgSend$" "rasterSampleCount"); +bool _MTL4_msg_bool_rasterizationEnabled(const void*, SEL) __asm__("_objc_msgSend$" "rasterizationEnabled"); +MTL::RasterizationRateMap* _MTL4_msg_MTL__RasterizationRateMapp_rasterizationRateMap(const void*, SEL) __asm__("_objc_msgSend$" "rasterizationRateMap"); +void _MTL4_msg_v_refitAccelerationStructure_descriptor_destination_scratchBuffer__MTL__AccelerationStructurep_MTL4__AccelerationStructureDescriptorp_MTL__AccelerationStructurep_MTL4__BufferRange(const void*, SEL, MTL::AccelerationStructure*, MTL4::AccelerationStructureDescriptor*, MTL::AccelerationStructure*, MTL4::BufferRange) __asm__("_objc_msgSend$" "refitAccelerationStructure:descriptor:destination:scratchBuffer:"); +void _MTL4_msg_v_refitAccelerationStructure_descriptor_destination_scratchBuffer_options__MTL__AccelerationStructurep_MTL4__AccelerationStructureDescriptorp_MTL__AccelerationStructurep_MTL4__BufferRange_MTL__AccelerationStructureRefitOptions(const void*, SEL, MTL::AccelerationStructure*, MTL4::AccelerationStructureDescriptor*, MTL::AccelerationStructure*, MTL4::BufferRange, MTL::AccelerationStructureRefitOptions) __asm__("_objc_msgSend$" "refitAccelerationStructure:descriptor:destination:scratchBuffer:options:"); +MTL4::MachineLearningPipelineReflection* _MTL4_msg_MTL4__MachineLearningPipelineReflectionp_reflection(const void*, SEL) __asm__("_objc_msgSend$" "reflection"); +void _MTL4_msg_v_removeResidencySet__MTL__ResidencySetp(const void*, SEL, MTL::ResidencySet*) __asm__("_objc_msgSend$" "removeResidencySet:"); +void _MTL4_msg_v_removeResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger(const void*, SEL, const MTL::ResidencySet* const *, NS::UInteger) __asm__("_objc_msgSend$" "removeResidencySets:count:"); +MTL4::RenderCommandEncoder* _MTL4_msg_MTL4__RenderCommandEncoderp_renderCommandEncoderWithDescriptor__MTL4__RenderPassDescriptorp(const void*, SEL, MTL4::RenderPassDescriptor*) __asm__("_objc_msgSend$" "renderCommandEncoderWithDescriptor:"); +MTL4::RenderCommandEncoder* _MTL4_msg_MTL4__RenderCommandEncoderp_renderCommandEncoderWithDescriptor_options__MTL4__RenderPassDescriptorp_MTL4__RenderEncoderOptions(const void*, SEL, MTL4::RenderPassDescriptor*, MTL4::RenderEncoderOptions) __asm__("_objc_msgSend$" "renderCommandEncoderWithDescriptor:options:"); +NS::UInteger _MTL4_msg_NS__UInteger_renderTargetArrayLength(const void*, SEL) __asm__("_objc_msgSend$" "renderTargetArrayLength"); +NS::UInteger _MTL4_msg_NS__UInteger_renderTargetHeight(const void*, SEL) __asm__("_objc_msgSend$" "renderTargetHeight"); +NS::UInteger _MTL4_msg_NS__UInteger_renderTargetWidth(const void*, SEL) __asm__("_objc_msgSend$" "renderTargetWidth"); +MTL::Size _MTL4_msg_MTL__Size_requiredThreadsPerMeshThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "requiredThreadsPerMeshThreadgroup"); +MTL::Size _MTL4_msg_MTL__Size_requiredThreadsPerObjectThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "requiredThreadsPerObjectThreadgroup"); +MTL::Size _MTL4_msg_MTL__Size_requiredThreadsPerThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "requiredThreadsPerThreadgroup"); +void _MTL4_msg_v_reset(const void*, SEL) __asm__("_objc_msgSend$" "reset"); +void _MTL4_msg_v_resetCommandsInBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range(const void*, SEL, MTL::IndirectCommandBuffer*, NS::Range) __asm__("_objc_msgSend$" "resetCommandsInBuffer:withRange:"); +void _MTL4_msg_v_resolveCounterHeap_withRange_intoBuffer_waitFence_updateFence__MTL4__CounterHeapp_NS__Range_MTL4__BufferRange_MTL__Fencep_MTL__Fencep(const void*, SEL, MTL4::CounterHeap*, NS::Range, MTL4::BufferRange, MTL::Fence*, MTL::Fence*) __asm__("_objc_msgSend$" "resolveCounterHeap:withRange:intoBuffer:waitFence:updateFence:"); +NS::Data* _MTL4_msg_NS__Datap_resolveCounterRange__NS__Range(const void*, SEL, NS::Range) __asm__("_objc_msgSend$" "resolveCounterRange:"); +MTL::BlendOperation _MTL4_msg_MTL__BlendOperation_rgbBlendOperation(const void*, SEL) __asm__("_objc_msgSend$" "rgbBlendOperation"); +NS::UInteger _MTL4_msg_NS__UInteger_segmentControlPointCount(const void*, SEL) __asm__("_objc_msgSend$" "segmentControlPointCount"); +NS::UInteger _MTL4_msg_NS__UInteger_segmentCount(const void*, SEL) __asm__("_objc_msgSend$" "segmentCount"); +bool _MTL4_msg_bool_serializeAsArchiveAndFlushToURL_error__NS__URLp_NS__Errorpp(const void*, SEL, NS::URL*, NS::Error**) __asm__("_objc_msgSend$" "serializeAsArchiveAndFlushToURL:error:"); +NS::Data* _MTL4_msg_NS__Datap_serializeAsPipelinesScriptWithError__NS__Errorpp(const void*, SEL, NS::Error**) __asm__("_objc_msgSend$" "serializeAsPipelinesScriptWithError:"); +void _MTL4_msg_v_setAddress_atIndex__MTL__GPUAddress_NS__UInteger(const void*, SEL, MTL::GPUAddress, NS::UInteger) __asm__("_objc_msgSend$" "setAddress:atIndex:"); +void _MTL4_msg_v_setAddress_attributeStride_atIndex__MTL__GPUAddress_NS__UInteger_NS__UInteger(const void*, SEL, MTL::GPUAddress, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setAddress:attributeStride:atIndex:"); +void _MTL4_msg_v_setAllowDuplicateIntersectionFunctionInvocation__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setAllowDuplicateIntersectionFunctionInvocation:"); +void _MTL4_msg_v_setAlphaBlendOperation__MTL__BlendOperation(const void*, SEL, MTL::BlendOperation) __asm__("_objc_msgSend$" "setAlphaBlendOperation:"); +void _MTL4_msg_v_setAlphaToCoverageState__MTL4__AlphaToCoverageState(const void*, SEL, MTL4::AlphaToCoverageState) __asm__("_objc_msgSend$" "setAlphaToCoverageState:"); +void _MTL4_msg_v_setAlphaToOneState__MTL4__AlphaToOneState(const void*, SEL, MTL4::AlphaToOneState) __asm__("_objc_msgSend$" "setAlphaToOneState:"); +void _MTL4_msg_v_setArgumentTable__MTL4__ArgumentTablep(const void*, SEL, MTL4::ArgumentTable*) __asm__("_objc_msgSend$" "setArgumentTable:"); +void _MTL4_msg_v_setArgumentTable_atStages__MTL4__ArgumentTablep_MTL__RenderStages(const void*, SEL, MTL4::ArgumentTable*, MTL::RenderStages) __asm__("_objc_msgSend$" "setArgumentTable:atStages:"); +void _MTL4_msg_v_setBinaryLinkedFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setBinaryLinkedFunctions:"); +void _MTL4_msg_v_setBlendColorRed_green_blue_alpha__float_float_float_float(const void*, SEL, float, float, float, float) __asm__("_objc_msgSend$" "setBlendColorRed:green:blue:alpha:"); +void _MTL4_msg_v_setBlendingState__MTL4__BlendState(const void*, SEL, MTL4::BlendState) __asm__("_objc_msgSend$" "setBlendingState:"); +void _MTL4_msg_v_setBoundingBoxBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setBoundingBoxBuffer:"); +void _MTL4_msg_v_setBoundingBoxBuffers__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setBoundingBoxBuffers:"); +void _MTL4_msg_v_setBoundingBoxCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setBoundingBoxCount:"); +void _MTL4_msg_v_setBoundingBoxStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setBoundingBoxStride:"); +void _MTL4_msg_v_setColorAttachmentMap__MTL__LogicalToPhysicalColorAttachmentMapp(const void*, SEL, MTL::LogicalToPhysicalColorAttachmentMap*) __asm__("_objc_msgSend$" "setColorAttachmentMap:"); +void _MTL4_msg_v_setColorAttachmentMappingState__MTL4__LogicalToPhysicalColorAttachmentMappingState(const void*, SEL, MTL4::LogicalToPhysicalColorAttachmentMappingState) __asm__("_objc_msgSend$" "setColorAttachmentMappingState:"); +void _MTL4_msg_v_setColorStoreAction_atIndex__MTL__StoreAction_NS__UInteger(const void*, SEL, MTL::StoreAction, NS::UInteger) __asm__("_objc_msgSend$" "setColorStoreAction:atIndex:"); +void _MTL4_msg_v_setComputeFunctionDescriptor__MTL4__FunctionDescriptorp(const void*, SEL, MTL4::FunctionDescriptor*) __asm__("_objc_msgSend$" "setComputeFunctionDescriptor:"); +void _MTL4_msg_v_setComputePipelineState__MTL__ComputePipelineStatep(const void*, SEL, MTL::ComputePipelineState*) __asm__("_objc_msgSend$" "setComputePipelineState:"); +void _MTL4_msg_v_setConfiguration__MTL4__PipelineDataSetSerializerConfiguration(const void*, SEL, MTL4::PipelineDataSetSerializerConfiguration) __asm__("_objc_msgSend$" "setConfiguration:"); +void _MTL4_msg_v_setConstantValues__MTL__FunctionConstantValuesp(const void*, SEL, MTL::FunctionConstantValues*) __asm__("_objc_msgSend$" "setConstantValues:"); +void _MTL4_msg_v_setControlPointBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setControlPointBuffer:"); +void _MTL4_msg_v_setControlPointBuffers__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setControlPointBuffers:"); +void _MTL4_msg_v_setControlPointCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setControlPointCount:"); +void _MTL4_msg_v_setControlPointFormat__MTL__AttributeFormat(const void*, SEL, MTL::AttributeFormat) __asm__("_objc_msgSend$" "setControlPointFormat:"); +void _MTL4_msg_v_setControlPointStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setControlPointStride:"); +void _MTL4_msg_v_setCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setCount:"); +void _MTL4_msg_v_setCullMode__MTL__CullMode(const void*, SEL, MTL::CullMode) __asm__("_objc_msgSend$" "setCullMode:"); +void _MTL4_msg_v_setCurveBasis__MTL__CurveBasis(const void*, SEL, MTL::CurveBasis) __asm__("_objc_msgSend$" "setCurveBasis:"); +void _MTL4_msg_v_setCurveEndCaps__MTL__CurveEndCaps(const void*, SEL, MTL::CurveEndCaps) __asm__("_objc_msgSend$" "setCurveEndCaps:"); +void _MTL4_msg_v_setCurveType__MTL__CurveType(const void*, SEL, MTL::CurveType) __asm__("_objc_msgSend$" "setCurveType:"); +void _MTL4_msg_v_setDefaultRasterSampleCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setDefaultRasterSampleCount:"); +void _MTL4_msg_v_setDepthAttachment__MTL__RenderPassDepthAttachmentDescriptorp(const void*, SEL, MTL::RenderPassDepthAttachmentDescriptor*) __asm__("_objc_msgSend$" "setDepthAttachment:"); +void _MTL4_msg_v_setDepthBias_slopeScale_clamp__float_float_float(const void*, SEL, float, float, float) __asm__("_objc_msgSend$" "setDepthBias:slopeScale:clamp:"); +void _MTL4_msg_v_setDepthClipMode__MTL__DepthClipMode(const void*, SEL, MTL::DepthClipMode) __asm__("_objc_msgSend$" "setDepthClipMode:"); +void _MTL4_msg_v_setDepthStencilState__MTL__DepthStencilStatep(const void*, SEL, MTL::DepthStencilState*) __asm__("_objc_msgSend$" "setDepthStencilState:"); +void _MTL4_msg_v_setDepthStoreAction__MTL__StoreAction(const void*, SEL, MTL::StoreAction) __asm__("_objc_msgSend$" "setDepthStoreAction:"); +void _MTL4_msg_v_setDepthTestMinBound_maxBound__float_float(const void*, SEL, float, float) __asm__("_objc_msgSend$" "setDepthTestMinBound:maxBound:"); +void _MTL4_msg_v_setDestinationAlphaBlendFactor__MTL__BlendFactor(const void*, SEL, MTL::BlendFactor) __asm__("_objc_msgSend$" "setDestinationAlphaBlendFactor:"); +void _MTL4_msg_v_setDestinationRGBBlendFactor__MTL__BlendFactor(const void*, SEL, MTL::BlendFactor) __asm__("_objc_msgSend$" "setDestinationRGBBlendFactor:"); +void _MTL4_msg_v_setFeedbackQueue__dispatch_queue_t(const void*, SEL, dispatch_queue_t) __asm__("_objc_msgSend$" "setFeedbackQueue:"); +void _MTL4_msg_v_setFragmentAdditionalBinaryFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setFragmentAdditionalBinaryFunctions:"); +void _MTL4_msg_v_setFragmentFunctionDescriptor__MTL4__FunctionDescriptorp(const void*, SEL, MTL4::FunctionDescriptor*) __asm__("_objc_msgSend$" "setFragmentFunctionDescriptor:"); +void _MTL4_msg_v_setFragmentStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp(const void*, SEL, MTL4::StaticLinkingDescriptor*) __asm__("_objc_msgSend$" "setFragmentStaticLinkingDescriptor:"); +void _MTL4_msg_v_setFrontFacingWinding__MTL__Winding(const void*, SEL, MTL::Winding) __asm__("_objc_msgSend$" "setFrontFacingWinding:"); +void _MTL4_msg_v_setFunctionDescriptor__MTL4__FunctionDescriptorp(const void*, SEL, MTL4::FunctionDescriptor*) __asm__("_objc_msgSend$" "setFunctionDescriptor:"); +void _MTL4_msg_v_setFunctionDescriptors__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setFunctionDescriptors:"); +void _MTL4_msg_v_setFunctionGraph__MTL__FunctionStitchingGraphp(const void*, SEL, MTL::FunctionStitchingGraph*) __asm__("_objc_msgSend$" "setFunctionGraph:"); +void _MTL4_msg_v_setGeometryDescriptors__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setGeometryDescriptors:"); +void _MTL4_msg_v_setGroups__NS__Dictionaryp(const void*, SEL, NS::Dictionary*) __asm__("_objc_msgSend$" "setGroups:"); +void _MTL4_msg_v_setImageblockSampleLength__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setImageblockSampleLength:"); +void _MTL4_msg_v_setImageblockWidth_height__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setImageblockWidth:height:"); +void _MTL4_msg_v_setIndexBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setIndexBuffer:"); +void _MTL4_msg_v_setIndexType__MTL__IndexType(const void*, SEL, MTL::IndexType) __asm__("_objc_msgSend$" "setIndexType:"); +void _MTL4_msg_v_setInitializeBindings__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setInitializeBindings:"); +void _MTL4_msg_v_setInputDimensions_atBufferIndex__MTL__TensorExtentsp_NS__Integer(const void*, SEL, MTL::TensorExtents*, NS::Integer) __asm__("_objc_msgSend$" "setInputDimensions:atBufferIndex:"); +void _MTL4_msg_v_setInputDimensions_withRange__NS__Arrayp_NS__Range(const void*, SEL, NS::Array*, NS::Range) __asm__("_objc_msgSend$" "setInputDimensions:withRange:"); +void _MTL4_msg_v_setInputPrimitiveTopology__MTL__PrimitiveTopologyClass(const void*, SEL, MTL::PrimitiveTopologyClass) __asm__("_objc_msgSend$" "setInputPrimitiveTopology:"); +void _MTL4_msg_v_setInstanceCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInstanceCount:"); +void _MTL4_msg_v_setInstanceCountBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setInstanceCountBuffer:"); +void _MTL4_msg_v_setInstanceDescriptorBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setInstanceDescriptorBuffer:"); +void _MTL4_msg_v_setInstanceDescriptorStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInstanceDescriptorStride:"); +void _MTL4_msg_v_setInstanceDescriptorType__MTL__AccelerationStructureInstanceDescriptorType(const void*, SEL, MTL::AccelerationStructureInstanceDescriptorType) __asm__("_objc_msgSend$" "setInstanceDescriptorType:"); +void _MTL4_msg_v_setInstanceTransformationMatrixLayout__MTL__MatrixLayout(const void*, SEL, MTL::MatrixLayout) __asm__("_objc_msgSend$" "setInstanceTransformationMatrixLayout:"); +void _MTL4_msg_v_setIntersectionFunctionTableOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setIntersectionFunctionTableOffset:"); +void _MTL4_msg_v_setLabel__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setLabel:"); +void _MTL4_msg_v_setLibrary__MTL__Libraryp(const void*, SEL, MTL::Library*) __asm__("_objc_msgSend$" "setLibrary:"); +void _MTL4_msg_v_setLogState__MTL__LogStatep(const void*, SEL, MTL::LogState*) __asm__("_objc_msgSend$" "setLogState:"); +void _MTL4_msg_v_setLookupArchives__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setLookupArchives:"); +void _MTL4_msg_v_setMachineLearningFunctionDescriptor__MTL4__FunctionDescriptorp(const void*, SEL, MTL4::FunctionDescriptor*) __asm__("_objc_msgSend$" "setMachineLearningFunctionDescriptor:"); +void _MTL4_msg_v_setMaxBufferBindCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxBufferBindCount:"); +void _MTL4_msg_v_setMaxCallStackDepth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxCallStackDepth:"); +void _MTL4_msg_v_setMaxInstanceCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxInstanceCount:"); +void _MTL4_msg_v_setMaxMotionTransformCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxMotionTransformCount:"); +void _MTL4_msg_v_setMaxSamplerStateBindCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxSamplerStateBindCount:"); +void _MTL4_msg_v_setMaxTextureBindCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxTextureBindCount:"); +void _MTL4_msg_v_setMaxTotalThreadgroupsPerMeshGrid__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxTotalThreadgroupsPerMeshGrid:"); +void _MTL4_msg_v_setMaxTotalThreadsPerMeshThreadgroup__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxTotalThreadsPerMeshThreadgroup:"); +void _MTL4_msg_v_setMaxTotalThreadsPerObjectThreadgroup__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxTotalThreadsPerObjectThreadgroup:"); +void _MTL4_msg_v_setMaxTotalThreadsPerThreadgroup__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxTotalThreadsPerThreadgroup:"); +void _MTL4_msg_v_setMaxVertexAmplificationCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxVertexAmplificationCount:"); +void _MTL4_msg_v_setMeshAdditionalBinaryFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setMeshAdditionalBinaryFunctions:"); +void _MTL4_msg_v_setMeshFunctionDescriptor__MTL4__FunctionDescriptorp(const void*, SEL, MTL4::FunctionDescriptor*) __asm__("_objc_msgSend$" "setMeshFunctionDescriptor:"); +void _MTL4_msg_v_setMeshStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp(const void*, SEL, MTL4::StaticLinkingDescriptor*) __asm__("_objc_msgSend$" "setMeshStaticLinkingDescriptor:"); +void _MTL4_msg_v_setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth:"); +void _MTL4_msg_v_setMotionEndBorderMode__MTL__MotionBorderMode(const void*, SEL, MTL::MotionBorderMode) __asm__("_objc_msgSend$" "setMotionEndBorderMode:"); +void _MTL4_msg_v_setMotionEndTime__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setMotionEndTime:"); +void _MTL4_msg_v_setMotionKeyframeCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMotionKeyframeCount:"); +void _MTL4_msg_v_setMotionStartBorderMode__MTL__MotionBorderMode(const void*, SEL, MTL::MotionBorderMode) __asm__("_objc_msgSend$" "setMotionStartBorderMode:"); +void _MTL4_msg_v_setMotionStartTime__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setMotionStartTime:"); +void _MTL4_msg_v_setMotionTransformBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setMotionTransformBuffer:"); +void _MTL4_msg_v_setMotionTransformCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMotionTransformCount:"); +void _MTL4_msg_v_setMotionTransformCountBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setMotionTransformCountBuffer:"); +void _MTL4_msg_v_setMotionTransformStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMotionTransformStride:"); +void _MTL4_msg_v_setMotionTransformType__MTL__TransformType(const void*, SEL, MTL::TransformType) __asm__("_objc_msgSend$" "setMotionTransformType:"); +void _MTL4_msg_v_setName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setName:"); +void _MTL4_msg_v_setObject_atIndexedSubscript__MTL4__RenderPipelineColorAttachmentDescriptorp_NS__UInteger(const void*, SEL, MTL4::RenderPipelineColorAttachmentDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL4_msg_v_setObjectAdditionalBinaryFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setObjectAdditionalBinaryFunctions:"); +void _MTL4_msg_v_setObjectFunctionDescriptor__MTL4__FunctionDescriptorp(const void*, SEL, MTL4::FunctionDescriptor*) __asm__("_objc_msgSend$" "setObjectFunctionDescriptor:"); +void _MTL4_msg_v_setObjectStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp(const void*, SEL, MTL4::StaticLinkingDescriptor*) __asm__("_objc_msgSend$" "setObjectStaticLinkingDescriptor:"); +void _MTL4_msg_v_setObjectThreadgroupMemoryLength_atIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setObjectThreadgroupMemoryLength:atIndex:"); +void _MTL4_msg_v_setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth:"); +void _MTL4_msg_v_setOpaque__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setOpaque:"); +void _MTL4_msg_v_setOptions__MTL4__BinaryFunctionOptions(const void*, SEL, MTL4::BinaryFunctionOptions) __asm__("_objc_msgSend$" "setOptions:"); +void _MTL4_msg_v_setOptions__MTL4__PipelineOptionsp(const void*, SEL, MTL4::PipelineOptions*) __asm__("_objc_msgSend$" "setOptions:"); +void _MTL4_msg_v_setOptions__MTL__CompileOptionsp(const void*, SEL, MTL::CompileOptions*) __asm__("_objc_msgSend$" "setOptions:"); +void _MTL4_msg_v_setPayloadMemoryLength__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setPayloadMemoryLength:"); +void _MTL4_msg_v_setPipelineDataSetSerializer__MTL4__PipelineDataSetSerializerp(const void*, SEL, MTL4::PipelineDataSetSerializer*) __asm__("_objc_msgSend$" "setPipelineDataSetSerializer:"); +void _MTL4_msg_v_setPipelineState__MTL4__MachineLearningPipelineStatep(const void*, SEL, MTL4::MachineLearningPipelineState*) __asm__("_objc_msgSend$" "setPipelineState:"); +void _MTL4_msg_v_setPixelFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setPixelFormat:"); +void _MTL4_msg_v_setPreloadedLibraries__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setPreloadedLibraries:"); +void _MTL4_msg_v_setPrimitiveDataBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setPrimitiveDataBuffer:"); +void _MTL4_msg_v_setPrimitiveDataElementSize__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setPrimitiveDataElementSize:"); +void _MTL4_msg_v_setPrimitiveDataStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setPrimitiveDataStride:"); +void _MTL4_msg_v_setPrivateFunctionDescriptors__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setPrivateFunctionDescriptors:"); +void _MTL4_msg_v_setRadiusBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setRadiusBuffer:"); +void _MTL4_msg_v_setRadiusBuffers__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setRadiusBuffers:"); +void _MTL4_msg_v_setRadiusFormat__MTL__AttributeFormat(const void*, SEL, MTL::AttributeFormat) __asm__("_objc_msgSend$" "setRadiusFormat:"); +void _MTL4_msg_v_setRadiusStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRadiusStride:"); +void _MTL4_msg_v_setRasterSampleCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRasterSampleCount:"); +void _MTL4_msg_v_setRasterizationEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setRasterizationEnabled:"); +void _MTL4_msg_v_setRasterizationRateMap__MTL__RasterizationRateMapp(const void*, SEL, MTL::RasterizationRateMap*) __asm__("_objc_msgSend$" "setRasterizationRateMap:"); +void _MTL4_msg_v_setRenderPipelineState__MTL__RenderPipelineStatep(const void*, SEL, MTL::RenderPipelineState*) __asm__("_objc_msgSend$" "setRenderPipelineState:"); +void _MTL4_msg_v_setRenderTargetArrayLength__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRenderTargetArrayLength:"); +void _MTL4_msg_v_setRenderTargetHeight__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRenderTargetHeight:"); +void _MTL4_msg_v_setRenderTargetWidth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRenderTargetWidth:"); +void _MTL4_msg_v_setRequiredThreadsPerMeshThreadgroup__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "setRequiredThreadsPerMeshThreadgroup:"); +void _MTL4_msg_v_setRequiredThreadsPerObjectThreadgroup__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "setRequiredThreadsPerObjectThreadgroup:"); +void _MTL4_msg_v_setRequiredThreadsPerThreadgroup__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "setRequiredThreadsPerThreadgroup:"); +void _MTL4_msg_v_setResource_atBufferIndex__MTL__ResourceID_NS__UInteger(const void*, SEL, MTL::ResourceID, NS::UInteger) __asm__("_objc_msgSend$" "setResource:atBufferIndex:"); +void _MTL4_msg_v_setRgbBlendOperation__MTL__BlendOperation(const void*, SEL, MTL::BlendOperation) __asm__("_objc_msgSend$" "setRgbBlendOperation:"); +void _MTL4_msg_v_setSamplePositions_count__constMTL__SamplePositionp_NS__UInteger(const void*, SEL, const MTL::SamplePosition *, NS::UInteger) __asm__("_objc_msgSend$" "setSamplePositions:count:"); +void _MTL4_msg_v_setSamplerState_atIndex__MTL__ResourceID_NS__UInteger(const void*, SEL, MTL::ResourceID, NS::UInteger) __asm__("_objc_msgSend$" "setSamplerState:atIndex:"); +void _MTL4_msg_v_setScissorRect__MTL__ScissorRect(const void*, SEL, MTL::ScissorRect) __asm__("_objc_msgSend$" "setScissorRect:"); +void _MTL4_msg_v_setScissorRects_count__constMTL__ScissorRectp_NS__UInteger(const void*, SEL, const MTL::ScissorRect *, NS::UInteger) __asm__("_objc_msgSend$" "setScissorRects:count:"); +void _MTL4_msg_v_setSegmentControlPointCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setSegmentControlPointCount:"); +void _MTL4_msg_v_setSegmentCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setSegmentCount:"); +void _MTL4_msg_v_setShaderReflection__MTL4__ShaderReflection(const void*, SEL, MTL4::ShaderReflection) __asm__("_objc_msgSend$" "setShaderReflection:"); +void _MTL4_msg_v_setShaderValidation__MTL__ShaderValidation(const void*, SEL, MTL::ShaderValidation) __asm__("_objc_msgSend$" "setShaderValidation:"); +void _MTL4_msg_v_setSource__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setSource:"); +void _MTL4_msg_v_setSourceAlphaBlendFactor__MTL__BlendFactor(const void*, SEL, MTL::BlendFactor) __asm__("_objc_msgSend$" "setSourceAlphaBlendFactor:"); +void _MTL4_msg_v_setSourceRGBBlendFactor__MTL__BlendFactor(const void*, SEL, MTL::BlendFactor) __asm__("_objc_msgSend$" "setSourceRGBBlendFactor:"); +void _MTL4_msg_v_setSpecializedName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setSpecializedName:"); +void _MTL4_msg_v_setStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp(const void*, SEL, MTL4::StaticLinkingDescriptor*) __asm__("_objc_msgSend$" "setStaticLinkingDescriptor:"); +void _MTL4_msg_v_setStencilAttachment__MTL__RenderPassStencilAttachmentDescriptorp(const void*, SEL, MTL::RenderPassStencilAttachmentDescriptor*) __asm__("_objc_msgSend$" "setStencilAttachment:"); +void _MTL4_msg_v_setStencilFrontReferenceValue_backReferenceValue__uint32_t_uint32_t(const void*, SEL, uint32_t, uint32_t) __asm__("_objc_msgSend$" "setStencilFrontReferenceValue:backReferenceValue:"); +void _MTL4_msg_v_setStencilReferenceValue__uint32_t(const void*, SEL, uint32_t) __asm__("_objc_msgSend$" "setStencilReferenceValue:"); +void _MTL4_msg_v_setStencilStoreAction__MTL__StoreAction(const void*, SEL, MTL::StoreAction) __asm__("_objc_msgSend$" "setStencilStoreAction:"); +void _MTL4_msg_v_setSupportAttributeStrides__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportAttributeStrides:"); +void _MTL4_msg_v_setSupportBinaryLinking__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportBinaryLinking:"); +void _MTL4_msg_v_setSupportColorAttachmentMapping__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportColorAttachmentMapping:"); +void _MTL4_msg_v_setSupportFragmentBinaryLinking__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportFragmentBinaryLinking:"); +void _MTL4_msg_v_setSupportIndirectCommandBuffers__MTL4__IndirectCommandBufferSupportState(const void*, SEL, MTL4::IndirectCommandBufferSupportState) __asm__("_objc_msgSend$" "setSupportIndirectCommandBuffers:"); +void _MTL4_msg_v_setSupportMeshBinaryLinking__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportMeshBinaryLinking:"); +void _MTL4_msg_v_setSupportObjectBinaryLinking__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportObjectBinaryLinking:"); +void _MTL4_msg_v_setSupportVertexBinaryLinking__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportVertexBinaryLinking:"); +void _MTL4_msg_v_setTexture_atIndex__MTL__ResourceID_NS__UInteger(const void*, SEL, MTL::ResourceID, NS::UInteger) __asm__("_objc_msgSend$" "setTexture:atIndex:"); +void _MTL4_msg_v_setThreadGroupSizeIsMultipleOfThreadExecutionWidth__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setThreadGroupSizeIsMultipleOfThreadExecutionWidth:"); +void _MTL4_msg_v_setThreadgroupMemoryLength__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setThreadgroupMemoryLength:"); +void _MTL4_msg_v_setThreadgroupMemoryLength_atIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setThreadgroupMemoryLength:atIndex:"); +void _MTL4_msg_v_setThreadgroupMemoryLength_offset_atIndex__NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setThreadgroupMemoryLength:offset:atIndex:"); +void _MTL4_msg_v_setThreadgroupSizeMatchesTileSize__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setThreadgroupSizeMatchesTileSize:"); +void _MTL4_msg_v_setTileAdditionalBinaryFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setTileAdditionalBinaryFunctions:"); +void _MTL4_msg_v_setTileFunctionDescriptor__MTL4__FunctionDescriptorp(const void*, SEL, MTL4::FunctionDescriptor*) __asm__("_objc_msgSend$" "setTileFunctionDescriptor:"); +void _MTL4_msg_v_setTileHeight__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setTileHeight:"); +void _MTL4_msg_v_setTileWidth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setTileWidth:"); +void _MTL4_msg_v_setTransformationMatrixBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setTransformationMatrixBuffer:"); +void _MTL4_msg_v_setTransformationMatrixLayout__MTL__MatrixLayout(const void*, SEL, MTL::MatrixLayout) __asm__("_objc_msgSend$" "setTransformationMatrixLayout:"); +void _MTL4_msg_v_setTriangleCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setTriangleCount:"); +void _MTL4_msg_v_setTriangleFillMode__MTL__TriangleFillMode(const void*, SEL, MTL::TriangleFillMode) __asm__("_objc_msgSend$" "setTriangleFillMode:"); +void _MTL4_msg_v_setType__MTL4__CounterHeapType(const void*, SEL, MTL4::CounterHeapType) __asm__("_objc_msgSend$" "setType:"); +void _MTL4_msg_v_setVertexAdditionalBinaryFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setVertexAdditionalBinaryFunctions:"); +void _MTL4_msg_v_setVertexAmplificationCount_viewMappings__NS__UInteger_constMTL__VertexAmplificationViewMappingp(const void*, SEL, NS::UInteger, const MTL::VertexAmplificationViewMapping *) __asm__("_objc_msgSend$" "setVertexAmplificationCount:viewMappings:"); +void _MTL4_msg_v_setVertexBuffer__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setVertexBuffer:"); +void _MTL4_msg_v_setVertexBuffers__MTL4__BufferRange(const void*, SEL, MTL4::BufferRange) __asm__("_objc_msgSend$" "setVertexBuffers:"); +void _MTL4_msg_v_setVertexDescriptor__MTL__VertexDescriptorp(const void*, SEL, MTL::VertexDescriptor*) __asm__("_objc_msgSend$" "setVertexDescriptor:"); +void _MTL4_msg_v_setVertexFormat__MTL__AttributeFormat(const void*, SEL, MTL::AttributeFormat) __asm__("_objc_msgSend$" "setVertexFormat:"); +void _MTL4_msg_v_setVertexFunctionDescriptor__MTL4__FunctionDescriptorp(const void*, SEL, MTL4::FunctionDescriptor*) __asm__("_objc_msgSend$" "setVertexFunctionDescriptor:"); +void _MTL4_msg_v_setVertexStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp(const void*, SEL, MTL4::StaticLinkingDescriptor*) __asm__("_objc_msgSend$" "setVertexStaticLinkingDescriptor:"); +void _MTL4_msg_v_setVertexStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setVertexStride:"); +void _MTL4_msg_v_setViewport__MTL__Viewport(const void*, SEL, MTL::Viewport) __asm__("_objc_msgSend$" "setViewport:"); +void _MTL4_msg_v_setViewports_count__constMTL__Viewportp_NS__UInteger(const void*, SEL, const MTL::Viewport *, NS::UInteger) __asm__("_objc_msgSend$" "setViewports:count:"); +void _MTL4_msg_v_setVisibilityResultBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setVisibilityResultBuffer:"); +void _MTL4_msg_v_setVisibilityResultMode_offset__MTL__VisibilityResultMode_NS__UInteger(const void*, SEL, MTL::VisibilityResultMode, NS::UInteger) __asm__("_objc_msgSend$" "setVisibilityResultMode:offset:"); +void _MTL4_msg_v_setVisibilityResultType__MTL__VisibilityResultType(const void*, SEL, MTL::VisibilityResultType) __asm__("_objc_msgSend$" "setVisibilityResultType:"); +void _MTL4_msg_v_setWriteMask__MTL__ColorWriteMask(const void*, SEL, MTL::ColorWriteMask) __asm__("_objc_msgSend$" "setWriteMask:"); +MTL4::ShaderReflection _MTL4_msg_MTL4__ShaderReflection_shaderReflection(const void*, SEL) __asm__("_objc_msgSend$" "shaderReflection"); +MTL::ShaderValidation _MTL4_msg_MTL__ShaderValidation_shaderValidation(const void*, SEL) __asm__("_objc_msgSend$" "shaderValidation"); +void _MTL4_msg_v_signalDrawable__MTL__Drawablep(const void*, SEL, MTL::Drawable*) __asm__("_objc_msgSend$" "signalDrawable:"); +void _MTL4_msg_v_signalEvent_value__MTL__Eventp_uint64_t(const void*, SEL, MTL::Event*, uint64_t) __asm__("_objc_msgSend$" "signalEvent:value:"); +NS::String* _MTL4_msg_NS__Stringp_source(const void*, SEL) __asm__("_objc_msgSend$" "source"); +MTL::BlendFactor _MTL4_msg_MTL__BlendFactor_sourceAlphaBlendFactor(const void*, SEL) __asm__("_objc_msgSend$" "sourceAlphaBlendFactor"); +MTL::BlendFactor _MTL4_msg_MTL__BlendFactor_sourceRGBBlendFactor(const void*, SEL) __asm__("_objc_msgSend$" "sourceRGBBlendFactor"); +NS::String* _MTL4_msg_NS__Stringp_specializedName(const void*, SEL) __asm__("_objc_msgSend$" "specializedName"); +MTL::Stages _MTL4_msg_MTL__Stages_stages(const void*, SEL) __asm__("_objc_msgSend$" "stages"); +MTL4::StaticLinkingDescriptor* _MTL4_msg_MTL4__StaticLinkingDescriptorp_staticLinkingDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "staticLinkingDescriptor"); +MTL4::CompilerTaskStatus _MTL4_msg_MTL4__CompilerTaskStatus_status(const void*, SEL) __asm__("_objc_msgSend$" "status"); +MTL::RenderPassStencilAttachmentDescriptor* _MTL4_msg_MTL__RenderPassStencilAttachmentDescriptorp_stencilAttachment(const void*, SEL) __asm__("_objc_msgSend$" "stencilAttachment"); +bool _MTL4_msg_bool_supportAttributeStrides(const void*, SEL) __asm__("_objc_msgSend$" "supportAttributeStrides"); +bool _MTL4_msg_bool_supportBinaryLinking(const void*, SEL) __asm__("_objc_msgSend$" "supportBinaryLinking"); +bool _MTL4_msg_bool_supportColorAttachmentMapping(const void*, SEL) __asm__("_objc_msgSend$" "supportColorAttachmentMapping"); +bool _MTL4_msg_bool_supportFragmentBinaryLinking(const void*, SEL) __asm__("_objc_msgSend$" "supportFragmentBinaryLinking"); +MTL4::IndirectCommandBufferSupportState _MTL4_msg_MTL4__IndirectCommandBufferSupportState_supportIndirectCommandBuffers(const void*, SEL) __asm__("_objc_msgSend$" "supportIndirectCommandBuffers"); +bool _MTL4_msg_bool_supportMeshBinaryLinking(const void*, SEL) __asm__("_objc_msgSend$" "supportMeshBinaryLinking"); +bool _MTL4_msg_bool_supportObjectBinaryLinking(const void*, SEL) __asm__("_objc_msgSend$" "supportObjectBinaryLinking"); +bool _MTL4_msg_bool_supportVertexBinaryLinking(const void*, SEL) __asm__("_objc_msgSend$" "supportVertexBinaryLinking"); +bool _MTL4_msg_bool_threadGroupSizeIsMultipleOfThreadExecutionWidth(const void*, SEL) __asm__("_objc_msgSend$" "threadGroupSizeIsMultipleOfThreadExecutionWidth"); +NS::UInteger _MTL4_msg_NS__UInteger_threadgroupMemoryLength(const void*, SEL) __asm__("_objc_msgSend$" "threadgroupMemoryLength"); +bool _MTL4_msg_bool_threadgroupSizeMatchesTileSize(const void*, SEL) __asm__("_objc_msgSend$" "threadgroupSizeMatchesTileSize"); +NS::Array* _MTL4_msg_NS__Arrayp_tileAdditionalBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "tileAdditionalBinaryFunctions"); +MTL4::FunctionDescriptor* _MTL4_msg_MTL4__FunctionDescriptorp_tileFunctionDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "tileFunctionDescriptor"); +NS::UInteger _MTL4_msg_NS__UInteger_tileHeight(const void*, SEL) __asm__("_objc_msgSend$" "tileHeight"); +MTL4::PipelineStageDynamicLinkingDescriptor* _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_tileLinkingDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "tileLinkingDescriptor"); +NS::UInteger _MTL4_msg_NS__UInteger_tileWidth(const void*, SEL) __asm__("_objc_msgSend$" "tileWidth"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_transformationMatrixBuffer(const void*, SEL) __asm__("_objc_msgSend$" "transformationMatrixBuffer"); +MTL::MatrixLayout _MTL4_msg_MTL__MatrixLayout_transformationMatrixLayout(const void*, SEL) __asm__("_objc_msgSend$" "transformationMatrixLayout"); +NS::UInteger _MTL4_msg_NS__UInteger_triangleCount(const void*, SEL) __asm__("_objc_msgSend$" "triangleCount"); +MTL4::CounterHeapType _MTL4_msg_MTL4__CounterHeapType_type(const void*, SEL) __asm__("_objc_msgSend$" "type"); +void _MTL4_msg_v_updateBufferMappings_heap_operations_count__MTL__Bufferp_MTL__Heapp_constMTL4__UpdateSparseBufferMappingOperationp_NS__UInteger(const void*, SEL, MTL::Buffer*, MTL::Heap*, const MTL4::UpdateSparseBufferMappingOperation *, NS::UInteger) __asm__("_objc_msgSend$" "updateBufferMappings:heap:operations:count:"); +void _MTL4_msg_v_updateFence_afterEncoderStages__MTL__Fencep_MTL__Stages(const void*, SEL, MTL::Fence*, MTL::Stages) __asm__("_objc_msgSend$" "updateFence:afterEncoderStages:"); +void _MTL4_msg_v_updateTextureMappings_heap_operations_count__MTL__Texturep_MTL__Heapp_constMTL4__UpdateSparseTextureMappingOperationp_NS__UInteger(const void*, SEL, MTL::Texture*, MTL::Heap*, const MTL4::UpdateSparseTextureMappingOperation *, NS::UInteger) __asm__("_objc_msgSend$" "updateTextureMappings:heap:operations:count:"); +void _MTL4_msg_v_useResidencySet__MTL__ResidencySetp(const void*, SEL, MTL::ResidencySet*) __asm__("_objc_msgSend$" "useResidencySet:"); +void _MTL4_msg_v_useResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger(const void*, SEL, const MTL::ResidencySet* const *, NS::UInteger) __asm__("_objc_msgSend$" "useResidencySets:count:"); +NS::Array* _MTL4_msg_NS__Arrayp_vertexAdditionalBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "vertexAdditionalBinaryFunctions"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_vertexBuffer(const void*, SEL) __asm__("_objc_msgSend$" "vertexBuffer"); +MTL4::BufferRange _MTL4_msg_MTL4__BufferRange_vertexBuffers(const void*, SEL) __asm__("_objc_msgSend$" "vertexBuffers"); +MTL::VertexDescriptor* _MTL4_msg_MTL__VertexDescriptorp_vertexDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "vertexDescriptor"); +MTL::AttributeFormat _MTL4_msg_MTL__AttributeFormat_vertexFormat(const void*, SEL) __asm__("_objc_msgSend$" "vertexFormat"); +MTL4::FunctionDescriptor* _MTL4_msg_MTL4__FunctionDescriptorp_vertexFunctionDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "vertexFunctionDescriptor"); +MTL4::PipelineStageDynamicLinkingDescriptor* _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_vertexLinkingDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "vertexLinkingDescriptor"); +MTL4::StaticLinkingDescriptor* _MTL4_msg_MTL4__StaticLinkingDescriptorp_vertexStaticLinkingDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "vertexStaticLinkingDescriptor"); +NS::UInteger _MTL4_msg_NS__UInteger_vertexStride(const void*, SEL) __asm__("_objc_msgSend$" "vertexStride"); +MTL::Buffer* _MTL4_msg_MTL__Bufferp_visibilityResultBuffer(const void*, SEL) __asm__("_objc_msgSend$" "visibilityResultBuffer"); +MTL::VisibilityResultType _MTL4_msg_MTL__VisibilityResultType_visibilityResultType(const void*, SEL) __asm__("_objc_msgSend$" "visibilityResultType"); +void _MTL4_msg_v_waitForDrawable__MTL__Drawablep(const void*, SEL, MTL::Drawable*) __asm__("_objc_msgSend$" "waitForDrawable:"); +void _MTL4_msg_v_waitForEvent_value__MTL__Eventp_uint64_t(const void*, SEL, MTL::Event*, uint64_t) __asm__("_objc_msgSend$" "waitForEvent:value:"); +void _MTL4_msg_v_waitForFence_beforeEncoderStages__MTL__Fencep_MTL__Stages(const void*, SEL, MTL::Fence*, MTL::Stages) __asm__("_objc_msgSend$" "waitForFence:beforeEncoderStages:"); +void _MTL4_msg_v_waitUntilCompleted(const void*, SEL) __asm__("_objc_msgSend$" "waitUntilCompleted"); +void _MTL4_msg_v_writeCompactedAccelerationStructureSize_toBuffer__MTL__AccelerationStructurep_MTL4__BufferRange(const void*, SEL, MTL::AccelerationStructure*, MTL4::BufferRange) __asm__("_objc_msgSend$" "writeCompactedAccelerationStructureSize:toBuffer:"); +MTL::ColorWriteMask _MTL4_msg_MTL__ColorWriteMask_writeMask(const void*, SEL) __asm__("_objc_msgSend$" "writeMask"); +void _MTL4_msg_v_writeTimestampIntoHeap_atIndex__MTL4__CounterHeapp_NS__UInteger(const void*, SEL, MTL4::CounterHeap*, NS::UInteger) __asm__("_objc_msgSend$" "writeTimestampIntoHeap:atIndex:"); +void _MTL4_msg_v_writeTimestampWithGranularity_afterStage_intoHeap_atIndex__MTL4__TimestampGranularity_MTL__RenderStages_MTL4__CounterHeapp_NS__UInteger(const void*, SEL, MTL4::TimestampGranularity, MTL::RenderStages, MTL4::CounterHeap*, NS::UInteger) __asm__("_objc_msgSend$" "writeTimestampWithGranularity:afterStage:intoHeap:atIndex:"); +void _MTL4_msg_v_writeTimestampWithGranularity_intoHeap_atIndex__MTL4__TimestampGranularity_MTL4__CounterHeapp_NS__UInteger(const void*, SEL, MTL4::TimestampGranularity, MTL4::CounterHeap*, NS::UInteger) __asm__("_objc_msgSend$" "writeTimestampWithGranularity:intoHeap:atIndex:"); +} // extern "C" + +#pragma clang diagnostic pop diff --git a/thirdparty/metal-cpp/Metal/MTL4CommandAllocator.hpp b/thirdparty/metal-cpp/Metal/MTL4CommandAllocator.hpp index a36b05081dd0..fff16d701b76 100644 --- a/thirdparty/metal-cpp/Metal/MTL4CommandAllocator.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4CommandAllocator.hpp @@ -1,100 +1,90 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4CommandAllocator.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" -namespace MTL -{ -class Device; +namespace MTL { + class Device; +} +namespace NS { + class String; } namespace MTL4 { +class CommandAllocatorDescriptor; +class CommandAllocator; + class CommandAllocatorDescriptor : public NS::Copying { public: static CommandAllocatorDescriptor* alloc(); + CommandAllocatorDescriptor* init() const; - CommandAllocatorDescriptor* init(); + NS::String* label() const; + void setLabel(NS::String* label); - NS::String* label() const; - void setLabel(const NS::String* label); }; class CommandAllocator : public NS::Referencing { public: uint64_t allocatedSize(); - MTL::Device* device() const; - NS::String* label() const; - void reset(); + }; -} +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4CommandAllocatorDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4CommandAllocator; -_MTL_INLINE MTL4::CommandAllocatorDescriptor* MTL4::CommandAllocatorDescriptor::alloc() +_MTL4_INLINE MTL4::CommandAllocatorDescriptor* MTL4::CommandAllocatorDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4CommandAllocatorDescriptor)); + return _MTL4_msg_MTL4__CommandAllocatorDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4CommandAllocatorDescriptor, nullptr); } -_MTL_INLINE MTL4::CommandAllocatorDescriptor* MTL4::CommandAllocatorDescriptor::init() +_MTL4_INLINE MTL4::CommandAllocatorDescriptor* MTL4::CommandAllocatorDescriptor::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__CommandAllocatorDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::CommandAllocatorDescriptor::label() const +_MTL4_INLINE NS::String* MTL4::CommandAllocatorDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CommandAllocatorDescriptor::setLabel(const NS::String* label) +_MTL4_INLINE void MTL4::CommandAllocatorDescriptor::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE uint64_t MTL4::CommandAllocator::allocatedSize() +_MTL4_INLINE MTL::Device* MTL4::CommandAllocator::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allocatedSize)); + return _MTL4_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE MTL::Device* MTL4::CommandAllocator::device() const +_MTL4_INLINE NS::String* MTL4::CommandAllocator::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::CommandAllocator::label() const +_MTL4_INLINE uint64_t MTL4::CommandAllocator::allocatedSize() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL4_msg_uint64_t_allocatedSize((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CommandAllocator::reset() +_MTL4_INLINE void MTL4::CommandAllocator::reset() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL4_msg_v_reset((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4CommandBuffer.hpp b/thirdparty/metal-cpp/Metal/MTL4CommandBuffer.hpp index a69cc9413b72..3e5e1d3ee133 100644 --- a/thirdparty/metal-cpp/Metal/MTL4CommandBuffer.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4CommandBuffer.hpp @@ -1,193 +1,174 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4CommandBuffer.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTL4RenderCommandEncoder.hpp" -#include "MTLAccelerationStructureTypes.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Device; + class Fence; + class LogState; + class ResidencySet; +} +namespace MTL4 { + class CommandAllocator; + class ComputeCommandEncoder; + class CounterHeap; + class MachineLearningCommandEncoder; + class RenderCommandEncoder; + class RenderPassDescriptor; + using RenderEncoderOptions = NS::UInteger; +} +namespace NS { + class String; +} namespace MTL4 { -class CommandAllocator; -class CommandBufferOptions; -class ComputeCommandEncoder; -class CounterHeap; -class MachineLearningCommandEncoder; -class RenderCommandEncoder; -class RenderPassDescriptor; -} -namespace MTL -{ -class Device; -class Fence; -class LogState; -class ResidencySet; -} +class CommandBufferOptions; +class CommandBuffer; -namespace MTL4 -{ class CommandBufferOptions : public NS::Copying { public: static CommandBufferOptions* alloc(); + CommandBufferOptions* init() const; - CommandBufferOptions* init(); + MTL::LogState* logState() const; + void setLogState(MTL::LogState* logState); - MTL::LogState* logState() const; - void setLogState(const MTL::LogState* logState); }; + class CommandBuffer : public NS::Referencing { public: - void beginCommandBuffer(const MTL4::CommandAllocator* allocator); - void beginCommandBuffer(const MTL4::CommandAllocator* allocator, const MTL4::CommandBufferOptions* options); - - ComputeCommandEncoder* computeCommandEncoder(); + void beginCommandBuffer(MTL4::CommandAllocator* allocator); + void beginCommandBuffer(MTL4::CommandAllocator* allocator, MTL4::CommandBufferOptions* options); + MTL4::ComputeCommandEncoder* computeCommandEncoder(); + MTL::Device* device() const; + void endCommandBuffer(); + NS::String* label() const; + MTL4::MachineLearningCommandEncoder* machineLearningCommandEncoder(); + void popDebugGroup(); + void pushDebugGroup(NS::String* string); + MTL4::RenderCommandEncoder* renderCommandEncoder(MTL4::RenderPassDescriptor* descriptor); + MTL4::RenderCommandEncoder* renderCommandEncoder(MTL4::RenderPassDescriptor* descriptor, MTL4::RenderEncoderOptions options); + void resolveCounterHeap(MTL4::CounterHeap* counterHeap, NS::Range range, MTL4::BufferRange bufferRange, MTL::Fence* fenceToWait, MTL::Fence* fenceToUpdate); + void setLabel(NS::String* label); + void useResidencySet(MTL::ResidencySet* residencySet); + void useResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count); + void writeTimestampIntoHeap(MTL4::CounterHeap* counterHeap, NS::UInteger index); - MTL::Device* device() const; - - void endCommandBuffer(); - - NS::String* label() const; - - MachineLearningCommandEncoder* machineLearningCommandEncoder(); - - void popDebugGroup(); - - void pushDebugGroup(const NS::String* string); - - RenderCommandEncoder* renderCommandEncoder(const MTL4::RenderPassDescriptor* descriptor); - RenderCommandEncoder* renderCommandEncoder(const MTL4::RenderPassDescriptor* descriptor, MTL4::RenderEncoderOptions options); +}; - void resolveCounterHeap(const MTL4::CounterHeap* counterHeap, NS::Range range, const MTL4::BufferRange bufferRange, const MTL::Fence* fenceToWait, const MTL::Fence* fenceToUpdate); +} // namespace MTL4 - void setLabel(const NS::String* label); +// --- Class symbols + inline implementations --- - void useResidencySet(const MTL::ResidencySet* residencySet); - void useResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count); +extern "C" void *OBJC_CLASS_$_MTL4CommandBufferOptions; +extern "C" void *OBJC_CLASS_$_MTL4CommandBuffer; - void writeTimestampIntoHeap(const MTL4::CounterHeap* counterHeap, NS::UInteger index); -}; - -} -_MTL_INLINE MTL4::CommandBufferOptions* MTL4::CommandBufferOptions::alloc() +_MTL4_INLINE MTL4::CommandBufferOptions* MTL4::CommandBufferOptions::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4CommandBufferOptions)); + return _MTL4_msg_MTL4__CommandBufferOptionsp_alloc((const void*)&OBJC_CLASS_$_MTL4CommandBufferOptions, nullptr); } -_MTL_INLINE MTL4::CommandBufferOptions* MTL4::CommandBufferOptions::init() +_MTL4_INLINE MTL4::CommandBufferOptions* MTL4::CommandBufferOptions::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__CommandBufferOptionsp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::LogState* MTL4::CommandBufferOptions::logState() const +_MTL4_INLINE MTL::LogState* MTL4::CommandBufferOptions::logState() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(logState)); + return _MTL4_msg_MTL__LogStatep_logState((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CommandBufferOptions::setLogState(const MTL::LogState* logState) +_MTL4_INLINE void MTL4::CommandBufferOptions::setLogState(MTL::LogState* logState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLogState_), logState); + _MTL4_msg_v_setLogState__MTL__LogStatep((const void*)this, nullptr, logState); } -_MTL_INLINE void MTL4::CommandBuffer::beginCommandBuffer(const MTL4::CommandAllocator* allocator) +_MTL4_INLINE MTL::Device* MTL4::CommandBuffer::device() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(beginCommandBufferWithAllocator_), allocator); + return _MTL4_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CommandBuffer::beginCommandBuffer(const MTL4::CommandAllocator* allocator, const MTL4::CommandBufferOptions* options) +_MTL4_INLINE NS::String* MTL4::CommandBuffer::label() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(beginCommandBufferWithAllocator_options_), allocator, options); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL4::ComputeCommandEncoder* MTL4::CommandBuffer::computeCommandEncoder() +_MTL4_INLINE void MTL4::CommandBuffer::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(computeCommandEncoder)); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE MTL::Device* MTL4::CommandBuffer::device() const +_MTL4_INLINE void MTL4::CommandBuffer::beginCommandBuffer(MTL4::CommandAllocator* allocator) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + _MTL4_msg_v_beginCommandBufferWithAllocator__MTL4__CommandAllocatorp((const void*)this, nullptr, allocator); } -_MTL_INLINE void MTL4::CommandBuffer::endCommandBuffer() +_MTL4_INLINE void MTL4::CommandBuffer::beginCommandBuffer(MTL4::CommandAllocator* allocator, MTL4::CommandBufferOptions* options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(endCommandBuffer)); + _MTL4_msg_v_beginCommandBufferWithAllocator_options__MTL4__CommandAllocatorp_MTL4__CommandBufferOptionsp((const void*)this, nullptr, allocator, options); } -_MTL_INLINE NS::String* MTL4::CommandBuffer::label() const +_MTL4_INLINE void MTL4::CommandBuffer::endCommandBuffer() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL4_msg_v_endCommandBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL4::MachineLearningCommandEncoder* MTL4::CommandBuffer::machineLearningCommandEncoder() +_MTL4_INLINE MTL4::RenderCommandEncoder* MTL4::CommandBuffer::renderCommandEncoder(MTL4::RenderPassDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(machineLearningCommandEncoder)); + return _MTL4_msg_MTL4__RenderCommandEncoderp_renderCommandEncoderWithDescriptor__MTL4__RenderPassDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE void MTL4::CommandBuffer::popDebugGroup() +_MTL4_INLINE MTL4::RenderCommandEncoder* MTL4::CommandBuffer::renderCommandEncoder(MTL4::RenderPassDescriptor* descriptor, MTL4::RenderEncoderOptions options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(popDebugGroup)); + return _MTL4_msg_MTL4__RenderCommandEncoderp_renderCommandEncoderWithDescriptor_options__MTL4__RenderPassDescriptorp_MTL4__RenderEncoderOptions((const void*)this, nullptr, descriptor, options); } -_MTL_INLINE void MTL4::CommandBuffer::pushDebugGroup(const NS::String* string) +_MTL4_INLINE MTL4::ComputeCommandEncoder* MTL4::CommandBuffer::computeCommandEncoder() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(pushDebugGroup_), string); + return _MTL4_msg_MTL4__ComputeCommandEncoderp_computeCommandEncoder((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderCommandEncoder* MTL4::CommandBuffer::renderCommandEncoder(const MTL4::RenderPassDescriptor* descriptor) +_MTL4_INLINE MTL4::MachineLearningCommandEncoder* MTL4::CommandBuffer::machineLearningCommandEncoder() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(renderCommandEncoderWithDescriptor_), descriptor); + return _MTL4_msg_MTL4__MachineLearningCommandEncoderp_machineLearningCommandEncoder((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderCommandEncoder* MTL4::CommandBuffer::renderCommandEncoder(const MTL4::RenderPassDescriptor* descriptor, MTL4::RenderEncoderOptions options) +_MTL4_INLINE void MTL4::CommandBuffer::useResidencySet(MTL::ResidencySet* residencySet) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(renderCommandEncoderWithDescriptor_options_), descriptor, options); + _MTL4_msg_v_useResidencySet__MTL__ResidencySetp((const void*)this, nullptr, residencySet); } -_MTL_INLINE void MTL4::CommandBuffer::resolveCounterHeap(const MTL4::CounterHeap* counterHeap, NS::Range range, const MTL4::BufferRange bufferRange, const MTL::Fence* fenceToWait, const MTL::Fence* fenceToUpdate) +_MTL4_INLINE void MTL4::CommandBuffer::useResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(resolveCounterHeap_withRange_intoBuffer_waitFence_updateFence_), counterHeap, range, bufferRange, fenceToWait, fenceToUpdate); + _MTL4_msg_v_useResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger((const void*)this, nullptr, residencySets, count); } -_MTL_INLINE void MTL4::CommandBuffer::setLabel(const NS::String* label) +_MTL4_INLINE void MTL4::CommandBuffer::pushDebugGroup(NS::String* string) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL4_msg_v_pushDebugGroup__NS__Stringp((const void*)this, nullptr, string); } -_MTL_INLINE void MTL4::CommandBuffer::useResidencySet(const MTL::ResidencySet* residencySet) +_MTL4_INLINE void MTL4::CommandBuffer::popDebugGroup() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResidencySet_), residencySet); + _MTL4_msg_v_popDebugGroup((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CommandBuffer::useResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count) +_MTL4_INLINE void MTL4::CommandBuffer::writeTimestampIntoHeap(MTL4::CounterHeap* counterHeap, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResidencySets_count_), residencySets, count); + _MTL4_msg_v_writeTimestampIntoHeap_atIndex__MTL4__CounterHeapp_NS__UInteger((const void*)this, nullptr, counterHeap, index); } -_MTL_INLINE void MTL4::CommandBuffer::writeTimestampIntoHeap(const MTL4::CounterHeap* counterHeap, NS::UInteger index) +_MTL4_INLINE void MTL4::CommandBuffer::resolveCounterHeap(MTL4::CounterHeap* counterHeap, NS::Range range, MTL4::BufferRange bufferRange, MTL::Fence* fenceToWait, MTL::Fence* fenceToUpdate) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(writeTimestampIntoHeap_atIndex_), counterHeap, index); + _MTL4_msg_v_resolveCounterHeap_withRange_intoBuffer_waitFence_updateFence__MTL4__CounterHeapp_NS__Range_MTL4__BufferRange_MTL__Fencep_MTL__Fencep((const void*)this, nullptr, counterHeap, range, bufferRange, fenceToWait, fenceToUpdate); } diff --git a/thirdparty/metal-cpp/Metal/MTL4CommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTL4CommandEncoder.hpp index 2336021ee504..cec7aedde757 100644 --- a/thirdparty/metal-cpp/Metal/MTL4CommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4CommandEncoder.hpp @@ -1,134 +1,114 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4CommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLCommandEncoder.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" - -namespace MTL4 -{ -class CommandBuffer; +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Fence; + using Stages = NS::UInteger; } - -namespace MTL -{ -class Fence; +namespace MTL4 { + class CommandBuffer; +} +namespace NS { + class String; } namespace MTL4 { -_MTL_OPTIONS(NS::UInteger, VisibilityOptions) { + +_MTL4_OPTIONS(NS::UInteger, VisibilityOptions) { VisibilityOptionNone = 0, - VisibilityOptionDevice = 1, + VisibilityOptionDevice = 1 << 0, VisibilityOptionResourceAlias = 1 << 1, }; + class CommandEncoder : public NS::Referencing { public: - void barrierAfterEncoderStages(MTL::Stages afterEncoderStages, MTL::Stages beforeEncoderStages, MTL4::VisibilityOptions visibilityOptions); - - void barrierAfterQueueStages(MTL::Stages afterQueueStages, MTL::Stages beforeStages, MTL4::VisibilityOptions visibilityOptions); + void barrierAfterEncoderStages(MTL::Stages afterEncoderStages, MTL::Stages beforeEncoderStages, MTL4::VisibilityOptions visibilityOptions); + void barrierAfterQueueStages(MTL::Stages afterQueueStages, MTL::Stages beforeStages, MTL4::VisibilityOptions visibilityOptions); + void barrierAfterStages(MTL::Stages afterStages, MTL::Stages beforeQueueStages, MTL4::VisibilityOptions visibilityOptions); + MTL4::CommandBuffer* commandBuffer() const; + void endEncoding(); + void insertDebugSignpost(NS::String* string); + NS::String* label() const; + void popDebugGroup(); + void pushDebugGroup(NS::String* string); + void setLabel(NS::String* label); + void updateFence(MTL::Fence* fence, MTL::Stages afterEncoderStages); + void waitForFence(MTL::Fence* fence, MTL::Stages beforeEncoderStages); - void barrierAfterStages(MTL::Stages afterStages, MTL::Stages beforeQueueStages, MTL4::VisibilityOptions visibilityOptions); - - CommandBuffer* commandBuffer() const; - - void endEncoding(); - - void insertDebugSignpost(const NS::String* string); - - NS::String* label() const; - - void popDebugGroup(); - - void pushDebugGroup(const NS::String* string); +}; - void setLabel(const NS::String* label); +} // namespace MTL4 - void updateFence(const MTL::Fence* fence, MTL::Stages afterEncoderStages); +// --- Class symbols + inline implementations --- - void waitForFence(const MTL::Fence* fence, MTL::Stages beforeEncoderStages); -}; +extern "C" void *OBJC_CLASS_$_MTL4CommandEncoder; -} -_MTL_INLINE void MTL4::CommandEncoder::barrierAfterEncoderStages(MTL::Stages afterEncoderStages, MTL::Stages beforeEncoderStages, MTL4::VisibilityOptions visibilityOptions) +_MTL4_INLINE NS::String* MTL4::CommandEncoder::label() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(barrierAfterEncoderStages_beforeEncoderStages_visibilityOptions_), afterEncoderStages, beforeEncoderStages, visibilityOptions); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CommandEncoder::barrierAfterQueueStages(MTL::Stages afterQueueStages, MTL::Stages beforeStages, MTL4::VisibilityOptions visibilityOptions) +_MTL4_INLINE void MTL4::CommandEncoder::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(barrierAfterQueueStages_beforeStages_visibilityOptions_), afterQueueStages, beforeStages, visibilityOptions); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL4::CommandEncoder::barrierAfterStages(MTL::Stages afterStages, MTL::Stages beforeQueueStages, MTL4::VisibilityOptions visibilityOptions) +_MTL4_INLINE MTL4::CommandBuffer* MTL4::CommandEncoder::commandBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(barrierAfterStages_beforeQueueStages_visibilityOptions_), afterStages, beforeQueueStages, visibilityOptions); + return _MTL4_msg_MTL4__CommandBufferp_commandBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL4::CommandBuffer* MTL4::CommandEncoder::commandBuffer() const +_MTL4_INLINE void MTL4::CommandEncoder::barrierAfterQueueStages(MTL::Stages afterQueueStages, MTL::Stages beforeStages, MTL4::VisibilityOptions visibilityOptions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(commandBuffer)); + _MTL4_msg_v_barrierAfterQueueStages_beforeStages_visibilityOptions__MTL__Stages_MTL__Stages_MTL4__VisibilityOptions((const void*)this, nullptr, afterQueueStages, beforeStages, visibilityOptions); } -_MTL_INLINE void MTL4::CommandEncoder::endEncoding() +_MTL4_INLINE void MTL4::CommandEncoder::barrierAfterStages(MTL::Stages afterStages, MTL::Stages beforeQueueStages, MTL4::VisibilityOptions visibilityOptions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(endEncoding)); + _MTL4_msg_v_barrierAfterStages_beforeQueueStages_visibilityOptions__MTL__Stages_MTL__Stages_MTL4__VisibilityOptions((const void*)this, nullptr, afterStages, beforeQueueStages, visibilityOptions); } -_MTL_INLINE void MTL4::CommandEncoder::insertDebugSignpost(const NS::String* string) +_MTL4_INLINE void MTL4::CommandEncoder::barrierAfterEncoderStages(MTL::Stages afterEncoderStages, MTL::Stages beforeEncoderStages, MTL4::VisibilityOptions visibilityOptions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(insertDebugSignpost_), string); + _MTL4_msg_v_barrierAfterEncoderStages_beforeEncoderStages_visibilityOptions__MTL__Stages_MTL__Stages_MTL4__VisibilityOptions((const void*)this, nullptr, afterEncoderStages, beforeEncoderStages, visibilityOptions); } -_MTL_INLINE NS::String* MTL4::CommandEncoder::label() const +_MTL4_INLINE void MTL4::CommandEncoder::updateFence(MTL::Fence* fence, MTL::Stages afterEncoderStages) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL4_msg_v_updateFence_afterEncoderStages__MTL__Fencep_MTL__Stages((const void*)this, nullptr, fence, afterEncoderStages); } -_MTL_INLINE void MTL4::CommandEncoder::popDebugGroup() +_MTL4_INLINE void MTL4::CommandEncoder::waitForFence(MTL::Fence* fence, MTL::Stages beforeEncoderStages) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(popDebugGroup)); + _MTL4_msg_v_waitForFence_beforeEncoderStages__MTL__Fencep_MTL__Stages((const void*)this, nullptr, fence, beforeEncoderStages); } -_MTL_INLINE void MTL4::CommandEncoder::pushDebugGroup(const NS::String* string) +_MTL4_INLINE void MTL4::CommandEncoder::insertDebugSignpost(NS::String* string) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(pushDebugGroup_), string); + _MTL4_msg_v_insertDebugSignpost__NS__Stringp((const void*)this, nullptr, string); } -_MTL_INLINE void MTL4::CommandEncoder::setLabel(const NS::String* label) +_MTL4_INLINE void MTL4::CommandEncoder::pushDebugGroup(NS::String* string) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL4_msg_v_pushDebugGroup__NS__Stringp((const void*)this, nullptr, string); } -_MTL_INLINE void MTL4::CommandEncoder::updateFence(const MTL::Fence* fence, MTL::Stages afterEncoderStages) +_MTL4_INLINE void MTL4::CommandEncoder::popDebugGroup() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateFence_afterEncoderStages_), fence, afterEncoderStages); + _MTL4_msg_v_popDebugGroup((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CommandEncoder::waitForFence(const MTL::Fence* fence, MTL::Stages beforeEncoderStages) +_MTL4_INLINE void MTL4::CommandEncoder::endEncoding() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitForFence_beforeEncoderStages_), fence, beforeEncoderStages); + _MTL4_msg_v_endEncoding((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4CommandQueue.hpp b/thirdparty/metal-cpp/Metal/MTL4CommandQueue.hpp index cbd21c7a20b0..2421983ecb3d 100644 --- a/thirdparty/metal-cpp/Metal/MTL4CommandQueue.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4CommandQueue.hpp @@ -1,56 +1,34 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4CommandQueue.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTL4CommitFeedback.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLResourceStateCommandEncoder.hpp" -#include "MTLTypes.hpp" -#include -#include - -namespace MTL -{ -class Buffer; -class Device; -class Drawable; -class Event; -class Heap; -class ResidencySet; -class Texture; +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Buffer; + class Device; + class Drawable; + class Event; + class Heap; + class ResidencySet; + class Texture; +} +namespace MTL4 { + class CommandBuffer; +} +namespace NS { + class String; } namespace MTL4 { -class CommandBuffer; -class CommandQueueDescriptor; -class CommitOptions; -struct CopySparseBufferMappingOperation; -struct CopySparseTextureMappingOperation; -struct UpdateSparseBufferMappingOperation; -struct UpdateSparseTextureMappingOperation; -_MTL_ENUM(NS::Integer, CommandQueueError) { + +extern NS::ErrorDomain const CommandQueueErrorDomain __asm__("_MTL4CommandQueueErrorDomain"); +_MTL4_ENUM(NS::Integer, CommandQueueError) { CommandQueueErrorNone = 0, CommandQueueErrorTimeout = 1, CommandQueueErrorNotPermitted = 2, @@ -60,224 +38,192 @@ _MTL_ENUM(NS::Integer, CommandQueueError) { CommandQueueErrorInternal = 6, }; -struct UpdateSparseTextureMappingOperation -{ - MTL::SparseTextureMappingMode mode; - MTL::Region textureRegion; - NS::UInteger textureLevel; - NS::UInteger textureSlice; - NS::UInteger heapOffset; -} _MTL_PACKED; - -struct CopySparseTextureMappingOperation -{ - MTL::Region sourceRegion; - NS::UInteger sourceLevel; - NS::UInteger sourceSlice; - MTL::Origin destinationOrigin; - NS::UInteger destinationLevel; - NS::UInteger destinationSlice; -} _MTL_PACKED; - -struct UpdateSparseBufferMappingOperation -{ - MTL::SparseTextureMappingMode mode; - NS::Range bufferRange; - NS::UInteger heapOffset; -} _MTL_PACKED; -struct CopySparseBufferMappingOperation -{ - NS::Range sourceRange; - NS::UInteger destinationOffset; -} _MTL_PACKED; +class CommitOptions; +class CommandQueueDescriptor; +class CommandQueue; class CommitOptions : public NS::Referencing { public: - void addFeedbackHandler(const MTL4::CommitFeedbackHandler block); - void addFeedbackHandler(const MTL4::CommitFeedbackHandlerFunction& function); - static CommitOptions* alloc(); + CommitOptions* init() const; + + void addFeedbackHandler(MTL4::CommitFeedbackHandler block); + void addFeedbackHandler(const MTL4::CommitFeedbackHandlerFunction& block); - CommitOptions* init(); }; + class CommandQueueDescriptor : public NS::Copying { public: static CommandQueueDescriptor* alloc(); + CommandQueueDescriptor* init() const; - dispatch_queue_t feedbackQueue() const; - - CommandQueueDescriptor* init(); - - NS::String* label() const; - - void setFeedbackQueue(const dispatch_queue_t feedbackQueue); + dispatch_queue_t feedbackQueue() const; + NS::String* label() const; + void setFeedbackQueue(dispatch_queue_t feedbackQueue); + void setLabel(NS::String* label); - void setLabel(const NS::String* label); }; + class CommandQueue : public NS::Referencing { public: - void addResidencySet(const MTL::ResidencySet* residencySet); - void addResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count); - - void commit(const MTL4::CommandBuffer* const commandBuffers[], NS::UInteger count); - void commit(const MTL4::CommandBuffer* const commandBuffers[], NS::UInteger count, const MTL4::CommitOptions* options); - - void copyBufferMappingsFromBuffer(const MTL::Buffer* sourceBuffer, const MTL::Buffer* destinationBuffer, const MTL4::CopySparseBufferMappingOperation* operations, NS::UInteger count); - - void copyTextureMappingsFromTexture(const MTL::Texture* sourceTexture, const MTL::Texture* destinationTexture, const MTL4::CopySparseTextureMappingOperation* operations, NS::UInteger count); - + void addResidencySet(MTL::ResidencySet* residencySet); + void addResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count); + void commit(const MTL4::CommandBuffer* const * commandBuffers, NS::UInteger count); + void commit(const MTL4::CommandBuffer* const * commandBuffers, NS::UInteger count, MTL4::CommitOptions* options); + void copyBufferMappingsFromBuffer(MTL::Buffer* sourceBuffer, MTL::Buffer* destinationBuffer, const MTL4::CopySparseBufferMappingOperation * operations, NS::UInteger count); + void copyTextureMappingsFromTexture(MTL::Texture* sourceTexture, MTL::Texture* destinationTexture, const MTL4::CopySparseTextureMappingOperation * operations, NS::UInteger count); MTL::Device* device() const; - NS::String* label() const; + void removeResidencySet(MTL::ResidencySet* residencySet); + void removeResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count); + void signalDrawable(MTL::Drawable* drawable); + void signalEvent(MTL::Event* event, uint64_t value); + void updateBufferMappings(MTL::Buffer* buffer, MTL::Heap* heap, const MTL4::UpdateSparseBufferMappingOperation * operations, NS::UInteger count); + void updateTextureMappings(MTL::Texture* texture, MTL::Heap* heap, const MTL4::UpdateSparseTextureMappingOperation * operations, NS::UInteger count); + void wait(MTL::Event* event, uint64_t value); + void wait(MTL::Drawable* drawable); - void removeResidencySet(const MTL::ResidencySet* residencySet); - void removeResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count); - - void signalDrawable(const MTL::Drawable* drawable); - - void signalEvent(const MTL::Event* event, uint64_t value); - - void updateBufferMappings(const MTL::Buffer* buffer, const MTL::Heap* heap, const MTL4::UpdateSparseBufferMappingOperation* operations, NS::UInteger count); +}; - void updateTextureMappings(const MTL::Texture* texture, const MTL::Heap* heap, const MTL4::UpdateSparseTextureMappingOperation* operations, NS::UInteger count); +} // namespace MTL4 - void wait(const MTL::Event* event, uint64_t value); - void wait(const MTL::Drawable* drawable); -}; +// --- Class symbols + inline implementations --- -} +extern "C" void *OBJC_CLASS_$_MTL4CommitOptions; +extern "C" void *OBJC_CLASS_$_MTL4CommandQueueDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4CommandQueue; -_MTL_INLINE void MTL4::CommitOptions::addFeedbackHandler(const MTL4::CommitFeedbackHandler block) +_MTL4_INLINE MTL4::CommitOptions* MTL4::CommitOptions::alloc() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addFeedbackHandler_), block); + return _MTL4_msg_MTL4__CommitOptionsp_alloc((const void*)&OBJC_CLASS_$_MTL4CommitOptions, nullptr); } -_MTL_INLINE void MTL4::CommitOptions::addFeedbackHandler(const MTL4::CommitFeedbackHandlerFunction& function) +_MTL4_INLINE MTL4::CommitOptions* MTL4::CommitOptions::init() const { - __block MTL4::CommitFeedbackHandlerFunction blockFunction = function; - addFeedbackHandler(^(MTL4::CommitFeedback* pFeedback) { blockFunction(pFeedback); }); + return _MTL4_msg_MTL4__CommitOptionsp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::CommitOptions* MTL4::CommitOptions::alloc() +_MTL4_INLINE void MTL4::CommitOptions::addFeedbackHandler(MTL4::CommitFeedbackHandler block) { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4CommitOptions)); + _MTL4_msg_v_addFeedbackHandler__MTL4__CommitFeedbackHandler((const void*)this, nullptr, block); } -_MTL_INLINE MTL4::CommitOptions* MTL4::CommitOptions::init() +_MTL4_INLINE void MTL4::CommitOptions::addFeedbackHandler(const MTL4::CommitFeedbackHandlerFunction& block) { - return NS::Object::init(); + __block MTL4::CommitFeedbackHandlerFunction blockFunction = block; + addFeedbackHandler(^(MTL4::CommitFeedback* x0) { blockFunction(x0); }); } -_MTL_INLINE MTL4::CommandQueueDescriptor* MTL4::CommandQueueDescriptor::alloc() +_MTL4_INLINE MTL4::CommandQueueDescriptor* MTL4::CommandQueueDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4CommandQueueDescriptor)); + return _MTL4_msg_MTL4__CommandQueueDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4CommandQueueDescriptor, nullptr); } -_MTL_INLINE dispatch_queue_t MTL4::CommandQueueDescriptor::feedbackQueue() const +_MTL4_INLINE MTL4::CommandQueueDescriptor* MTL4::CommandQueueDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(feedbackQueue)); + return _MTL4_msg_MTL4__CommandQueueDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::CommandQueueDescriptor* MTL4::CommandQueueDescriptor::init() +_MTL4_INLINE NS::String* MTL4::CommandQueueDescriptor::label() const { - return NS::Object::init(); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::CommandQueueDescriptor::label() const +_MTL4_INLINE void MTL4::CommandQueueDescriptor::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL4::CommandQueueDescriptor::setFeedbackQueue(const dispatch_queue_t feedbackQueue) +_MTL4_INLINE dispatch_queue_t MTL4::CommandQueueDescriptor::feedbackQueue() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFeedbackQueue_), feedbackQueue); + return _MTL4_msg_dispatch_queue_t_feedbackQueue((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CommandQueueDescriptor::setLabel(const NS::String* label) +_MTL4_INLINE void MTL4::CommandQueueDescriptor::setFeedbackQueue(dispatch_queue_t feedbackQueue) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL4_msg_v_setFeedbackQueue__dispatch_queue_t((const void*)this, nullptr, feedbackQueue); } -_MTL_INLINE void MTL4::CommandQueue::addResidencySet(const MTL::ResidencySet* residencySet) +_MTL4_INLINE MTL::Device* MTL4::CommandQueue::device() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addResidencySet_), residencySet); + return _MTL4_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CommandQueue::addResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count) +_MTL4_INLINE NS::String* MTL4::CommandQueue::label() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addResidencySets_count_), residencySets, count); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CommandQueue::commit(const MTL4::CommandBuffer* const commandBuffers[], NS::UInteger count) +_MTL4_INLINE void MTL4::CommandQueue::commit(const MTL4::CommandBuffer* const * commandBuffers, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(commit_count_), commandBuffers, count); + _MTL4_msg_v_commit_count__constMTL4__CommandBufferpconstp_NS__UInteger((const void*)this, nullptr, commandBuffers, count); } -_MTL_INLINE void MTL4::CommandQueue::commit(const MTL4::CommandBuffer* const commandBuffers[], NS::UInteger count, const MTL4::CommitOptions* options) +_MTL4_INLINE void MTL4::CommandQueue::commit(const MTL4::CommandBuffer* const * commandBuffers, NS::UInteger count, MTL4::CommitOptions* options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(commit_count_options_), commandBuffers, count, options); + _MTL4_msg_v_commit_count_options__constMTL4__CommandBufferpconstp_NS__UInteger_MTL4__CommitOptionsp((const void*)this, nullptr, commandBuffers, count, options); } -_MTL_INLINE void MTL4::CommandQueue::copyBufferMappingsFromBuffer(const MTL::Buffer* sourceBuffer, const MTL::Buffer* destinationBuffer, const MTL4::CopySparseBufferMappingOperation* operations, NS::UInteger count) +_MTL4_INLINE void MTL4::CommandQueue::signalEvent(MTL::Event* event, uint64_t value) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyBufferMappingsFromBuffer_toBuffer_operations_count_), sourceBuffer, destinationBuffer, operations, count); + _MTL4_msg_v_signalEvent_value__MTL__Eventp_uint64_t((const void*)this, nullptr, event, value); } -_MTL_INLINE void MTL4::CommandQueue::copyTextureMappingsFromTexture(const MTL::Texture* sourceTexture, const MTL::Texture* destinationTexture, const MTL4::CopySparseTextureMappingOperation* operations, NS::UInteger count) +_MTL4_INLINE void MTL4::CommandQueue::wait(MTL::Event* event, uint64_t value) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyTextureMappingsFromTexture_toTexture_operations_count_), sourceTexture, destinationTexture, operations, count); + _MTL4_msg_v_waitForEvent_value__MTL__Eventp_uint64_t((const void*)this, nullptr, event, value); } -_MTL_INLINE MTL::Device* MTL4::CommandQueue::device() const +_MTL4_INLINE void MTL4::CommandQueue::signalDrawable(MTL::Drawable* drawable) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + _MTL4_msg_v_signalDrawable__MTL__Drawablep((const void*)this, nullptr, drawable); } -_MTL_INLINE NS::String* MTL4::CommandQueue::label() const +_MTL4_INLINE void MTL4::CommandQueue::wait(MTL::Drawable* drawable) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL4_msg_v_waitForDrawable__MTL__Drawablep((const void*)this, nullptr, drawable); } -_MTL_INLINE void MTL4::CommandQueue::removeResidencySet(const MTL::ResidencySet* residencySet) +_MTL4_INLINE void MTL4::CommandQueue::addResidencySet(MTL::ResidencySet* residencySet) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(removeResidencySet_), residencySet); + _MTL4_msg_v_addResidencySet__MTL__ResidencySetp((const void*)this, nullptr, residencySet); } -_MTL_INLINE void MTL4::CommandQueue::removeResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count) +_MTL4_INLINE void MTL4::CommandQueue::addResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(removeResidencySets_count_), residencySets, count); + _MTL4_msg_v_addResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger((const void*)this, nullptr, residencySets, count); } -_MTL_INLINE void MTL4::CommandQueue::signalDrawable(const MTL::Drawable* drawable) +_MTL4_INLINE void MTL4::CommandQueue::removeResidencySet(MTL::ResidencySet* residencySet) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(signalDrawable_), drawable); + _MTL4_msg_v_removeResidencySet__MTL__ResidencySetp((const void*)this, nullptr, residencySet); } -_MTL_INLINE void MTL4::CommandQueue::signalEvent(const MTL::Event* event, uint64_t value) +_MTL4_INLINE void MTL4::CommandQueue::removeResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(signalEvent_value_), event, value); + _MTL4_msg_v_removeResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger((const void*)this, nullptr, residencySets, count); } -_MTL_INLINE void MTL4::CommandQueue::updateBufferMappings(const MTL::Buffer* buffer, const MTL::Heap* heap, const MTL4::UpdateSparseBufferMappingOperation* operations, NS::UInteger count) +_MTL4_INLINE void MTL4::CommandQueue::updateTextureMappings(MTL::Texture* texture, MTL::Heap* heap, const MTL4::UpdateSparseTextureMappingOperation * operations, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateBufferMappings_heap_operations_count_), buffer, heap, operations, count); + _MTL4_msg_v_updateTextureMappings_heap_operations_count__MTL__Texturep_MTL__Heapp_constMTL4__UpdateSparseTextureMappingOperationp_NS__UInteger((const void*)this, nullptr, texture, heap, operations, count); } -_MTL_INLINE void MTL4::CommandQueue::updateTextureMappings(const MTL::Texture* texture, const MTL::Heap* heap, const MTL4::UpdateSparseTextureMappingOperation* operations, NS::UInteger count) +_MTL4_INLINE void MTL4::CommandQueue::copyTextureMappingsFromTexture(MTL::Texture* sourceTexture, MTL::Texture* destinationTexture, const MTL4::CopySparseTextureMappingOperation * operations, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateTextureMappings_heap_operations_count_), texture, heap, operations, count); + _MTL4_msg_v_copyTextureMappingsFromTexture_toTexture_operations_count__MTL__Texturep_MTL__Texturep_constMTL4__CopySparseTextureMappingOperationp_NS__UInteger((const void*)this, nullptr, sourceTexture, destinationTexture, operations, count); } -_MTL_INLINE void MTL4::CommandQueue::wait(const MTL::Event* event, uint64_t value) +_MTL4_INLINE void MTL4::CommandQueue::updateBufferMappings(MTL::Buffer* buffer, MTL::Heap* heap, const MTL4::UpdateSparseBufferMappingOperation * operations, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitForEvent_value_), event, value); + _MTL4_msg_v_updateBufferMappings_heap_operations_count__MTL__Bufferp_MTL__Heapp_constMTL4__UpdateSparseBufferMappingOperationp_NS__UInteger((const void*)this, nullptr, buffer, heap, operations, count); } -_MTL_INLINE void MTL4::CommandQueue::wait(const MTL::Drawable* drawable) +_MTL4_INLINE void MTL4::CommandQueue::copyBufferMappingsFromBuffer(MTL::Buffer* sourceBuffer, MTL::Buffer* destinationBuffer, const MTL4::CopySparseBufferMappingOperation * operations, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitForDrawable_), drawable); + _MTL4_msg_v_copyBufferMappingsFromBuffer_toBuffer_operations_count__MTL__Bufferp_MTL__Bufferp_constMTL4__CopySparseBufferMappingOperationp_NS__UInteger((const void*)this, nullptr, sourceBuffer, destinationBuffer, operations, count); } diff --git a/thirdparty/metal-cpp/Metal/MTL4CommitFeedback.hpp b/thirdparty/metal-cpp/Metal/MTL4CommitFeedback.hpp index 6b8181f71159..484510801dac 100644 --- a/thirdparty/metal-cpp/Metal/MTL4CommitFeedback.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4CommitFeedback.hpp @@ -1,62 +1,46 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4CommitFeedback.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" -#include +namespace NS { + class Error; +} namespace MTL4 { -class CommitFeedback; - -using CommitFeedbackHandler = void (^)(MTL4::CommitFeedback*); -using CommitFeedbackHandlerFunction = std::function; class CommitFeedback : public NS::Referencing { public: CFTimeInterval GPUEndTime() const; - CFTimeInterval GPUStartTime() const; - NS::Error* error() const; + }; -} -_MTL_INLINE CFTimeInterval MTL4::CommitFeedback::GPUEndTime() const +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4CommitFeedback; + +_MTL4_INLINE NS::Error* MTL4::CommitFeedback::error() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(GPUEndTime)); + return _MTL4_msg_NS__Errorp_error((const void*)this, nullptr); } -_MTL_INLINE CFTimeInterval MTL4::CommitFeedback::GPUStartTime() const +_MTL4_INLINE CFTimeInterval MTL4::CommitFeedback::GPUStartTime() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(GPUStartTime)); + return _MTL4_msg_CFTimeInterval_GPUStartTime((const void*)this, nullptr); } -_MTL_INLINE NS::Error* MTL4::CommitFeedback::error() const +_MTL4_INLINE CFTimeInterval MTL4::CommitFeedback::GPUEndTime() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(error)); + return _MTL4_msg_CFTimeInterval_GPUEndTime((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4Compiler.hpp b/thirdparty/metal-cpp/Metal/MTL4Compiler.hpp index 94249b2978c6..f3c1643f6e06 100644 --- a/thirdparty/metal-cpp/Metal/MTL4Compiler.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4Compiler.hpp @@ -1,345 +1,284 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4Compiler.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLDevice.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" - -#include +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLBlocks.hpp" + +namespace MTL { + class ComputePipelineState; + class Device; + class DynamicLibrary; + class Library; + class RenderPipelineState; +} +namespace MTL4 { + class BinaryFunction; + class BinaryFunctionDescriptor; + class CompilerTask; + class ComputePipelineDescriptor; + class LibraryDescriptor; + class MachineLearningPipelineDescriptor; + class MachineLearningPipelineState; + class PipelineDataSetSerializer; + class PipelineDescriptor; + class PipelineStageDynamicLinkingDescriptor; + class RenderPipelineDynamicLinkingDescriptor; +} +namespace NS { + class Array; + class Error; + class String; + class URL; +} namespace MTL4 { -class BinaryFunction; -class BinaryFunctionDescriptor; + class CompilerDescriptor; -class CompilerTask; class CompilerTaskOptions; -class ComputePipelineDescriptor; -class LibraryDescriptor; -class MachineLearningPipelineDescriptor; -class MachineLearningPipelineState; -class PipelineDataSetSerializer; -class PipelineDescriptor; -class PipelineStageDynamicLinkingDescriptor; -class RenderPipelineDynamicLinkingDescriptor; -} - -namespace MTL -{ -class ComputePipelineState; -class Device; -class DynamicLibrary; -class Library; -class RenderPipelineState; - -using NewDynamicLibraryCompletionHandler = void (^)(MTL::DynamicLibrary*, NS::Error*); -using NewDynamicLibraryCompletionHandlerFunction = std::function; -} - -namespace MTL4 -{ -using NewComputePipelineStateCompletionHandler = void (^)(MTL::ComputePipelineState*, NS::Error*); -using NewComputePipelineStateCompletionHandlerFunction = std::function; -using NewRenderPipelineStateCompletionHandler = void (^)(MTL::RenderPipelineState*, NS::Error*); -using NewRenderPipelineStateCompletionHandlerFunction = std::function; -using NewBinaryFunctionCompletionHandler = void (^)(MTL4::BinaryFunction*, NS::Error*); -using NewBinaryFunctionCompletionHandlerFunction = std::function; -using NewMachineLearningPipelineStateCompletionHandler = void (^)(MTL4::MachineLearningPipelineState*, NS::Error*); -using NewMachineLearningPipelineStateCompletionHandlerFunction = std::function; +class Compiler; class CompilerDescriptor : public NS::Copying { public: static CompilerDescriptor* alloc(); + CompilerDescriptor* init() const; - CompilerDescriptor* init(); + NS::String* label() const; + MTL4::PipelineDataSetSerializer* pipelineDataSetSerializer() const; + void setLabel(NS::String* label); + void setPipelineDataSetSerializer(MTL4::PipelineDataSetSerializer* pipelineDataSetSerializer); - NS::String* label() const; - - PipelineDataSetSerializer* pipelineDataSetSerializer() const; - - void setLabel(const NS::String* label); - - void setPipelineDataSetSerializer(const MTL4::PipelineDataSetSerializer* pipelineDataSetSerializer); }; + class CompilerTaskOptions : public NS::Copying { public: static CompilerTaskOptions* alloc(); + CompilerTaskOptions* init() const; - CompilerTaskOptions* init(); + NS::Array* lookupArchives() const; + void setLookupArchives(NS::Array* lookupArchives); - NS::Array* lookupArchives() const; - void setLookupArchives(const NS::Array* lookupArchives); }; + class Compiler : public NS::Referencing { public: - MTL::Device* device() const; - - NS::String* label() const; - - BinaryFunction* newBinaryFunction(const MTL4::BinaryFunctionDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error); - CompilerTask* newBinaryFunction(const MTL4::BinaryFunctionDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL4::NewBinaryFunctionCompletionHandler completionHandler); - - MTL::ComputePipelineState* newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error); - MTL::ComputePipelineState* newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, const MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error); - CompilerTask* newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL::NewComputePipelineStateCompletionHandler completionHandler); - CompilerTask* newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, const MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL::NewComputePipelineStateCompletionHandler completionHandler); - CompilerTask* newComputePipelineState(const MTL4::ComputePipelineDescriptor* pDescriptor, const MTL4::CompilerTaskOptions* options, const MTL4::NewComputePipelineStateCompletionHandlerFunction& function); - - MTL::DynamicLibrary* newDynamicLibrary(const MTL::Library* library, NS::Error** error); - MTL::DynamicLibrary* newDynamicLibrary(const NS::URL* url, NS::Error** error); - CompilerTask* newDynamicLibrary(const MTL::Library* library, const MTL::NewDynamicLibraryCompletionHandler completionHandler); - CompilerTask* newDynamicLibrary(const NS::URL* url, const MTL::NewDynamicLibraryCompletionHandler completionHandler); - CompilerTask* newDynamicLibrary(const MTL::Library* pLibrary, const MTL::NewDynamicLibraryCompletionHandlerFunction& function); - CompilerTask* newDynamicLibrary(const NS::URL* pURL, const MTL::NewDynamicLibraryCompletionHandlerFunction& function); - - MTL::Library* newLibrary(const MTL4::LibraryDescriptor* descriptor, NS::Error** error); - CompilerTask* newLibrary(const MTL4::LibraryDescriptor* descriptor, const MTL::NewLibraryCompletionHandler completionHandler); - CompilerTask* newLibrary(const MTL4::LibraryDescriptor* pDescriptor, const MTL::NewLibraryCompletionHandlerFunction& function); - - MachineLearningPipelineState* newMachineLearningPipelineState(const MTL4::MachineLearningPipelineDescriptor* descriptor, NS::Error** error); - CompilerTask* newMachineLearningPipelineState(const MTL4::MachineLearningPipelineDescriptor* descriptor, const MTL4::NewMachineLearningPipelineStateCompletionHandler completionHandler); - CompilerTask* newMachineLearningPipelineState(const MTL4::MachineLearningPipelineDescriptor* pDescriptor, const MTL4::NewMachineLearningPipelineStateCompletionHandlerFunction& function); - - MTL::RenderPipelineState* newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error); - MTL::RenderPipelineState* newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, const MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error); - CompilerTask* newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL::NewRenderPipelineStateCompletionHandler completionHandler); - CompilerTask* newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, const MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL::NewRenderPipelineStateCompletionHandler completionHandler); - CompilerTask* newRenderPipelineState(const MTL4::PipelineDescriptor* pDescriptor, const MTL4::CompilerTaskOptions* options, const MTL4::NewRenderPipelineStateCompletionHandlerFunction& function); - MTL::RenderPipelineState* newRenderPipelineStateBySpecialization(const MTL4::PipelineDescriptor* descriptor, const MTL::RenderPipelineState* pipeline, NS::Error** error); - CompilerTask* newRenderPipelineStateBySpecialization(const MTL4::PipelineDescriptor* descriptor, const MTL::RenderPipelineState* pipeline, const MTL::NewRenderPipelineStateCompletionHandler completionHandler); - CompilerTask* newRenderPipelineStateBySpecialization(const MTL4::PipelineDescriptor* pDescriptor, const MTL::RenderPipelineState* pPipeline, const MTL4::NewRenderPipelineStateCompletionHandlerFunction& function); - - PipelineDataSetSerializer* pipelineDataSetSerializer() const; -}; - -} -_MTL_INLINE MTL4::CompilerDescriptor* MTL4::CompilerDescriptor::alloc() -{ - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4CompilerDescriptor)); -} + MTL::Device* device() const; + NS::String* label() const; + MTL4::BinaryFunction* newBinaryFunction(MTL4::BinaryFunctionDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error); + MTL4::CompilerTask* newBinaryFunction(MTL4::BinaryFunctionDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, MTL4::NewBinaryFunctionCompletionHandler completionHandler); + MTL4::CompilerTask* newBinaryFunction(MTL4::BinaryFunctionDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL4::NewBinaryFunctionCompletionHandlerFunction& completionHandler); + MTL::ComputePipelineState* newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error); + MTL::ComputePipelineState* newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error); + MTL4::CompilerTask* newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, MTL::NewComputePipelineStateCompletionHandler completionHandler); + MTL4::CompilerTask* newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, MTL::NewComputePipelineStateCompletionHandler completionHandler); + MTL::DynamicLibrary* newDynamicLibrary(MTL::Library* library, NS::Error** error); + MTL::DynamicLibrary* newDynamicLibrary(NS::URL* url, NS::Error** error); + MTL4::CompilerTask* newDynamicLibrary(MTL::Library* library, MTL::NewDynamicLibraryCompletionHandler completionHandler); + MTL4::CompilerTask* newDynamicLibrary(NS::URL* url, MTL::NewDynamicLibraryCompletionHandler completionHandler); + MTL::Library* newLibrary(MTL4::LibraryDescriptor* descriptor, NS::Error** error); + MTL4::CompilerTask* newLibrary(MTL4::LibraryDescriptor* descriptor, MTL::NewLibraryCompletionHandler completionHandler); + MTL4::MachineLearningPipelineState* newMachineLearningPipelineState(MTL4::MachineLearningPipelineDescriptor* descriptor, NS::Error** error); + MTL4::CompilerTask* newMachineLearningPipelineState(MTL4::MachineLearningPipelineDescriptor* descriptor, MTL4::NewMachineLearningPipelineStateCompletionHandler completionHandler); + MTL4::CompilerTask* newMachineLearningPipelineState(MTL4::MachineLearningPipelineDescriptor* descriptor, const MTL4::NewMachineLearningPipelineStateCompletionHandlerFunction& completionHandler); + MTL::RenderPipelineState* newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error); + MTL::RenderPipelineState* newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error); + MTL4::CompilerTask* newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, MTL::NewRenderPipelineStateCompletionHandler completionHandler); + MTL4::CompilerTask* newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, MTL::NewRenderPipelineStateCompletionHandler completionHandler); + MTL::RenderPipelineState* newRenderPipelineStateBySpecialization(MTL4::PipelineDescriptor* descriptor, MTL::RenderPipelineState* pipeline, NS::Error** error); + MTL4::CompilerTask* newRenderPipelineStateBySpecialization(MTL4::PipelineDescriptor* descriptor, MTL::RenderPipelineState* pipeline, MTL::NewRenderPipelineStateCompletionHandler completionHandler); + MTL4::PipelineDataSetSerializer* pipelineDataSetSerializer() const; -_MTL_INLINE MTL4::CompilerDescriptor* MTL4::CompilerDescriptor::init() -{ - return NS::Object::init(); -} +}; -_MTL_INLINE NS::String* MTL4::CompilerDescriptor::label() const -{ - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); -} +} // namespace MTL4 -_MTL_INLINE MTL4::PipelineDataSetSerializer* MTL4::CompilerDescriptor::pipelineDataSetSerializer() const -{ - return Object::sendMessage(this, _MTL_PRIVATE_SEL(pipelineDataSetSerializer)); -} +// --- Class symbols + inline implementations --- -_MTL_INLINE void MTL4::CompilerDescriptor::setLabel(const NS::String* label) -{ - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); -} +extern "C" void *OBJC_CLASS_$_MTL4CompilerDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4CompilerTaskOptions; +extern "C" void *OBJC_CLASS_$_MTL4Compiler; -_MTL_INLINE void MTL4::CompilerDescriptor::setPipelineDataSetSerializer(const MTL4::PipelineDataSetSerializer* pipelineDataSetSerializer) +_MTL4_INLINE MTL4::CompilerDescriptor* MTL4::CompilerDescriptor::alloc() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPipelineDataSetSerializer_), pipelineDataSetSerializer); + return _MTL4_msg_MTL4__CompilerDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4CompilerDescriptor, nullptr); } -_MTL_INLINE MTL4::CompilerTaskOptions* MTL4::CompilerTaskOptions::alloc() +_MTL4_INLINE MTL4::CompilerDescriptor* MTL4::CompilerDescriptor::init() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4CompilerTaskOptions)); + return _MTL4_msg_MTL4__CompilerDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::CompilerTaskOptions* MTL4::CompilerTaskOptions::init() +_MTL4_INLINE NS::String* MTL4::CompilerDescriptor::label() const { - return NS::Object::init(); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL4::CompilerTaskOptions::lookupArchives() const +_MTL4_INLINE void MTL4::CompilerDescriptor::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(lookupArchives)); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL4::CompilerTaskOptions::setLookupArchives(const NS::Array* lookupArchives) +_MTL4_INLINE MTL4::PipelineDataSetSerializer* MTL4::CompilerDescriptor::pipelineDataSetSerializer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLookupArchives_), lookupArchives); + return _MTL4_msg_MTL4__PipelineDataSetSerializerp_pipelineDataSetSerializer((const void*)this, nullptr); } -_MTL_INLINE MTL::Device* MTL4::Compiler::device() const +_MTL4_INLINE void MTL4::CompilerDescriptor::setPipelineDataSetSerializer(MTL4::PipelineDataSetSerializer* pipelineDataSetSerializer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + _MTL4_msg_v_setPipelineDataSetSerializer__MTL4__PipelineDataSetSerializerp((const void*)this, nullptr, pipelineDataSetSerializer); } -_MTL_INLINE NS::String* MTL4::Compiler::label() const +_MTL4_INLINE MTL4::CompilerTaskOptions* MTL4::CompilerTaskOptions::alloc() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL4_msg_MTL4__CompilerTaskOptionsp_alloc((const void*)&OBJC_CLASS_$_MTL4CompilerTaskOptions, nullptr); } -_MTL_INLINE MTL4::BinaryFunction* MTL4::Compiler::newBinaryFunction(const MTL4::BinaryFunctionDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error) +_MTL4_INLINE MTL4::CompilerTaskOptions* MTL4::CompilerTaskOptions::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBinaryFunctionWithDescriptor_compilerTaskOptions_error_), descriptor, compilerTaskOptions, error); + return _MTL4_msg_MTL4__CompilerTaskOptionsp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newBinaryFunction(const MTL4::BinaryFunctionDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL4::NewBinaryFunctionCompletionHandler completionHandler) +_MTL4_INLINE NS::Array* MTL4::CompilerTaskOptions::lookupArchives() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBinaryFunctionWithDescriptor_compilerTaskOptions_completionHandler_), descriptor, compilerTaskOptions, completionHandler); + return _MTL4_msg_NS__Arrayp_lookupArchives((const void*)this, nullptr); } -_MTL_INLINE MTL::ComputePipelineState* MTL4::Compiler::newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error) +_MTL4_INLINE void MTL4::CompilerTaskOptions::setLookupArchives(NS::Array* lookupArchives) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithDescriptor_compilerTaskOptions_error_), descriptor, compilerTaskOptions, error); + _MTL4_msg_v_setLookupArchives__NS__Arrayp((const void*)this, nullptr, lookupArchives); } -_MTL_INLINE MTL::ComputePipelineState* MTL4::Compiler::newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, const MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error) +_MTL4_INLINE MTL::Device* MTL4::Compiler::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_error_), descriptor, dynamicLinkingDescriptor, compilerTaskOptions, error); + return _MTL4_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL::NewComputePipelineStateCompletionHandler completionHandler) +_MTL4_INLINE NS::String* MTL4::Compiler::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithDescriptor_compilerTaskOptions_completionHandler_), descriptor, compilerTaskOptions, completionHandler); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newComputePipelineState(const MTL4::ComputePipelineDescriptor* descriptor, const MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL::NewComputePipelineStateCompletionHandler completionHandler) +_MTL4_INLINE MTL4::PipelineDataSetSerializer* MTL4::Compiler::pipelineDataSetSerializer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_completionHandler_), descriptor, dynamicLinkingDescriptor, compilerTaskOptions, completionHandler); + return _MTL4_msg_MTL4__PipelineDataSetSerializerp_pipelineDataSetSerializer((const void*)this, nullptr); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newComputePipelineState(const MTL4::ComputePipelineDescriptor* pDescriptor, const MTL4::CompilerTaskOptions* options, const MTL4::NewComputePipelineStateCompletionHandlerFunction& function) +_MTL4_INLINE MTL::Library* MTL4::Compiler::newLibrary(MTL4::LibraryDescriptor* descriptor, NS::Error** error) { - __block MTL4::NewComputePipelineStateCompletionHandlerFunction blockFunction = function; - return newComputePipelineState(pDescriptor, options, ^(MTL::ComputePipelineState* pPipeline, NS::Error* pError) { blockFunction(pPipeline, pError); }); + return _MTL4_msg_MTL__Libraryp_newLibraryWithDescriptor_error__MTL4__LibraryDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL::DynamicLibrary* MTL4::Compiler::newDynamicLibrary(const MTL::Library* library, NS::Error** error) +_MTL4_INLINE MTL::DynamicLibrary* MTL4::Compiler::newDynamicLibrary(MTL::Library* library, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newDynamicLibrary_error_), library, error); + return _MTL4_msg_MTL__DynamicLibraryp_newDynamicLibrary_error__MTL__Libraryp_NS__Errorpp((const void*)this, nullptr, library, error); } -_MTL_INLINE MTL::DynamicLibrary* MTL4::Compiler::newDynamicLibrary(const NS::URL* url, NS::Error** error) +_MTL4_INLINE MTL::DynamicLibrary* MTL4::Compiler::newDynamicLibrary(NS::URL* url, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newDynamicLibraryWithURL_error_), url, error); + return _MTL4_msg_MTL__DynamicLibraryp_newDynamicLibraryWithURL_error__NS__URLp_NS__Errorpp((const void*)this, nullptr, url, error); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newDynamicLibrary(const MTL::Library* library, const MTL::NewDynamicLibraryCompletionHandler completionHandler) +_MTL4_INLINE MTL::ComputePipelineState* MTL4::Compiler::newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newDynamicLibrary_completionHandler_), library, completionHandler); + return _MTL4_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithDescriptor_compilerTaskOptions_error__MTL4__ComputePipelineDescriptorp_MTL4__CompilerTaskOptionsp_NS__Errorpp((const void*)this, nullptr, descriptor, compilerTaskOptions, error); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newDynamicLibrary(const NS::URL* url, const MTL::NewDynamicLibraryCompletionHandler completionHandler) +_MTL4_INLINE MTL::ComputePipelineState* MTL4::Compiler::newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newDynamicLibraryWithURL_completionHandler_), url, completionHandler); + return _MTL4_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_error__MTL4__ComputePipelineDescriptorp_MTL4__PipelineStageDynamicLinkingDescriptorp_MTL4__CompilerTaskOptionsp_NS__Errorpp((const void*)this, nullptr, descriptor, dynamicLinkingDescriptor, compilerTaskOptions, error); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newDynamicLibrary(const MTL::Library* pLibrary, const MTL::NewDynamicLibraryCompletionHandlerFunction& function) +_MTL4_INLINE MTL::RenderPipelineState* MTL4::Compiler::newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error) { - __block MTL::NewDynamicLibraryCompletionHandlerFunction blockFunction = function; - return newDynamicLibrary(pLibrary, ^(MTL::DynamicLibrary* pLibraryRef, NS::Error* pError) { blockFunction(pLibraryRef, pError); }); + return _MTL4_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_compilerTaskOptions_error__MTL4__PipelineDescriptorp_MTL4__CompilerTaskOptionsp_NS__Errorpp((const void*)this, nullptr, descriptor, compilerTaskOptions, error); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newDynamicLibrary(const NS::URL* pURL, const MTL::NewDynamicLibraryCompletionHandlerFunction& function) +_MTL4_INLINE MTL::RenderPipelineState* MTL4::Compiler::newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error) { - __block MTL::NewDynamicLibraryCompletionHandlerFunction blockFunction = function; - return newDynamicLibrary(pURL, ^(MTL::DynamicLibrary* pLibrary, NS::Error* pError) { blockFunction(pLibrary, pError); }); + return _MTL4_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_error__MTL4__PipelineDescriptorp_MTL4__RenderPipelineDynamicLinkingDescriptorp_MTL4__CompilerTaskOptionsp_NS__Errorpp((const void*)this, nullptr, descriptor, dynamicLinkingDescriptor, compilerTaskOptions, error); } -_MTL_INLINE MTL::Library* MTL4::Compiler::newLibrary(const MTL4::LibraryDescriptor* descriptor, NS::Error** error) +_MTL4_INLINE MTL::RenderPipelineState* MTL4::Compiler::newRenderPipelineStateBySpecialization(MTL4::PipelineDescriptor* descriptor, MTL::RenderPipelineState* pipeline, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newLibraryWithDescriptor_error_), descriptor, error); + return _MTL4_msg_MTL__RenderPipelineStatep_newRenderPipelineStateBySpecializationWithDescriptor_pipeline_error__MTL4__PipelineDescriptorp_MTL__RenderPipelineStatep_NS__Errorpp((const void*)this, nullptr, descriptor, pipeline, error); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newLibrary(const MTL4::LibraryDescriptor* descriptor, const MTL::NewLibraryCompletionHandler completionHandler) +_MTL4_INLINE MTL4::BinaryFunction* MTL4::Compiler::newBinaryFunction(MTL4::BinaryFunctionDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newLibraryWithDescriptor_completionHandler_), descriptor, completionHandler); + return _MTL4_msg_MTL4__BinaryFunctionp_newBinaryFunctionWithDescriptor_compilerTaskOptions_error__MTL4__BinaryFunctionDescriptorp_MTL4__CompilerTaskOptionsp_NS__Errorpp((const void*)this, nullptr, descriptor, compilerTaskOptions, error); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newLibrary(const MTL4::LibraryDescriptor* pDescriptor, const MTL::NewLibraryCompletionHandlerFunction& function) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newLibrary(MTL4::LibraryDescriptor* descriptor, MTL::NewLibraryCompletionHandler completionHandler) { - __block MTL::NewLibraryCompletionHandlerFunction blockFunction = function; - return newLibrary(pDescriptor, ^(MTL::Library* pLibrary, NS::Error* pError) { blockFunction(pLibrary, pError); }); + return _MTL4_msg_MTL4__CompilerTaskp_newLibraryWithDescriptor_completionHandler__MTL4__LibraryDescriptorp_MTL__NewLibraryCompletionHandler((const void*)this, nullptr, descriptor, completionHandler); } -_MTL_INLINE MTL4::MachineLearningPipelineState* MTL4::Compiler::newMachineLearningPipelineState(const MTL4::MachineLearningPipelineDescriptor* descriptor, NS::Error** error) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newDynamicLibrary(MTL::Library* library, MTL::NewDynamicLibraryCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newMachineLearningPipelineStateWithDescriptor_error_), descriptor, error); + return _MTL4_msg_MTL4__CompilerTaskp_newDynamicLibrary_completionHandler__MTL__Libraryp_MTL__NewDynamicLibraryCompletionHandler((const void*)this, nullptr, library, completionHandler); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newMachineLearningPipelineState(const MTL4::MachineLearningPipelineDescriptor* descriptor, const MTL4::NewMachineLearningPipelineStateCompletionHandler completionHandler) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newDynamicLibrary(NS::URL* url, MTL::NewDynamicLibraryCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newMachineLearningPipelineStateWithDescriptor_completionHandler_), descriptor, completionHandler); + return _MTL4_msg_MTL4__CompilerTaskp_newDynamicLibraryWithURL_completionHandler__NS__URLp_MTL__NewDynamicLibraryCompletionHandler((const void*)this, nullptr, url, completionHandler); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newMachineLearningPipelineState(const MTL4::MachineLearningPipelineDescriptor* pDescriptor, const MTL4::NewMachineLearningPipelineStateCompletionHandlerFunction& function) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, MTL::NewComputePipelineStateCompletionHandler completionHandler) { - __block MTL4::NewMachineLearningPipelineStateCompletionHandlerFunction blockFunction = function; - return newMachineLearningPipelineState(pDescriptor, ^(MTL4::MachineLearningPipelineState* pPipeline, NS::Error* pError) { blockFunction(pPipeline, pError); }); + return _MTL4_msg_MTL4__CompilerTaskp_newComputePipelineStateWithDescriptor_compilerTaskOptions_completionHandler__MTL4__ComputePipelineDescriptorp_MTL4__CompilerTaskOptionsp_MTL__NewComputePipelineStateCompletionHandler((const void*)this, nullptr, descriptor, compilerTaskOptions, completionHandler); } -_MTL_INLINE MTL::RenderPipelineState* MTL4::Compiler::newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newComputePipelineState(MTL4::ComputePipelineDescriptor* descriptor, MTL4::PipelineStageDynamicLinkingDescriptor* dynamicLinkingDescriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, MTL::NewComputePipelineStateCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_compilerTaskOptions_error_), descriptor, compilerTaskOptions, error); + return _MTL4_msg_MTL4__CompilerTaskp_newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_completionHandler__MTL4__ComputePipelineDescriptorp_MTL4__PipelineStageDynamicLinkingDescriptorp_MTL4__CompilerTaskOptionsp_MTL__NewComputePipelineStateCompletionHandler((const void*)this, nullptr, descriptor, dynamicLinkingDescriptor, compilerTaskOptions, completionHandler); } -_MTL_INLINE MTL::RenderPipelineState* MTL4::Compiler::newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, const MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, NS::Error** error) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, MTL::NewRenderPipelineStateCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_error_), descriptor, dynamicLinkingDescriptor, compilerTaskOptions, error); + return _MTL4_msg_MTL4__CompilerTaskp_newRenderPipelineStateWithDescriptor_compilerTaskOptions_completionHandler__MTL4__PipelineDescriptorp_MTL4__CompilerTaskOptionsp_MTL__NewRenderPipelineStateCompletionHandler((const void*)this, nullptr, descriptor, compilerTaskOptions, completionHandler); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL::NewRenderPipelineStateCompletionHandler completionHandler) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newRenderPipelineState(MTL4::PipelineDescriptor* descriptor, MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, MTL::NewRenderPipelineStateCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_compilerTaskOptions_completionHandler_), descriptor, compilerTaskOptions, completionHandler); + return _MTL4_msg_MTL4__CompilerTaskp_newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_completionHandler__MTL4__PipelineDescriptorp_MTL4__RenderPipelineDynamicLinkingDescriptorp_MTL4__CompilerTaskOptionsp_MTL__NewRenderPipelineStateCompletionHandler((const void*)this, nullptr, descriptor, dynamicLinkingDescriptor, compilerTaskOptions, completionHandler); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newRenderPipelineState(const MTL4::PipelineDescriptor* descriptor, const MTL4::RenderPipelineDynamicLinkingDescriptor* dynamicLinkingDescriptor, const MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL::NewRenderPipelineStateCompletionHandler completionHandler) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newRenderPipelineStateBySpecialization(MTL4::PipelineDescriptor* descriptor, MTL::RenderPipelineState* pipeline, MTL::NewRenderPipelineStateCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_completionHandler_), descriptor, dynamicLinkingDescriptor, compilerTaskOptions, completionHandler); + return _MTL4_msg_MTL4__CompilerTaskp_newRenderPipelineStateBySpecializationWithDescriptor_pipeline_completionHandler__MTL4__PipelineDescriptorp_MTL__RenderPipelineStatep_MTL__NewRenderPipelineStateCompletionHandler((const void*)this, nullptr, descriptor, pipeline, completionHandler); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newRenderPipelineState(const MTL4::PipelineDescriptor* pDescriptor, const MTL4::CompilerTaskOptions* options, const MTL4::NewRenderPipelineStateCompletionHandlerFunction& function) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newBinaryFunction(MTL4::BinaryFunctionDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, MTL4::NewBinaryFunctionCompletionHandler completionHandler) { - __block MTL4::NewRenderPipelineStateCompletionHandlerFunction blockFunction = function; - return newRenderPipelineState(pDescriptor, options, ^(MTL::RenderPipelineState* pPipeline, NS::Error* pError) { blockFunction(pPipeline, pError); }); + return _MTL4_msg_MTL4__CompilerTaskp_newBinaryFunctionWithDescriptor_compilerTaskOptions_completionHandler__MTL4__BinaryFunctionDescriptorp_MTL4__CompilerTaskOptionsp_MTL4__NewBinaryFunctionCompletionHandler((const void*)this, nullptr, descriptor, compilerTaskOptions, completionHandler); } -_MTL_INLINE MTL::RenderPipelineState* MTL4::Compiler::newRenderPipelineStateBySpecialization(const MTL4::PipelineDescriptor* descriptor, const MTL::RenderPipelineState* pipeline, NS::Error** error) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newBinaryFunction(MTL4::BinaryFunctionDescriptor* descriptor, MTL4::CompilerTaskOptions* compilerTaskOptions, const MTL4::NewBinaryFunctionCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateBySpecializationWithDescriptor_pipeline_error_), descriptor, pipeline, error); + __block MTL4::NewBinaryFunctionCompletionHandlerFunction blockFunction = completionHandler; + return newBinaryFunction(descriptor, compilerTaskOptions, ^(MTL4::BinaryFunction* x0, NS::Error* x1) { blockFunction(x0, x1); }); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newRenderPipelineStateBySpecialization(const MTL4::PipelineDescriptor* descriptor, const MTL::RenderPipelineState* pipeline, const MTL::NewRenderPipelineStateCompletionHandler completionHandler) +_MTL4_INLINE MTL4::MachineLearningPipelineState* MTL4::Compiler::newMachineLearningPipelineState(MTL4::MachineLearningPipelineDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateBySpecializationWithDescriptor_pipeline_completionHandler_), descriptor, pipeline, completionHandler); + return _MTL4_msg_MTL4__MachineLearningPipelineStatep_newMachineLearningPipelineStateWithDescriptor_error__MTL4__MachineLearningPipelineDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL4::CompilerTask* MTL4::Compiler::newRenderPipelineStateBySpecialization(const MTL4::PipelineDescriptor* pDescriptor, const MTL::RenderPipelineState* pPipeline, const MTL4::NewRenderPipelineStateCompletionHandlerFunction& function) +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newMachineLearningPipelineState(MTL4::MachineLearningPipelineDescriptor* descriptor, MTL4::NewMachineLearningPipelineStateCompletionHandler completionHandler) { - __block MTL4::NewRenderPipelineStateCompletionHandlerFunction blockFunction = function; - return newRenderPipelineStateBySpecialization(pDescriptor, pPipeline, ^(MTL::RenderPipelineState* pPipelineRef, NS::Error* pError) { blockFunction(pPipelineRef, pError); }); + return _MTL4_msg_MTL4__CompilerTaskp_newMachineLearningPipelineStateWithDescriptor_completionHandler__MTL4__MachineLearningPipelineDescriptorp_MTL4__NewMachineLearningPipelineStateCompletionHandler((const void*)this, nullptr, descriptor, completionHandler); } -_MTL_INLINE MTL4::PipelineDataSetSerializer* MTL4::Compiler::pipelineDataSetSerializer() const +_MTL4_INLINE MTL4::CompilerTask* MTL4::Compiler::newMachineLearningPipelineState(MTL4::MachineLearningPipelineDescriptor* descriptor, const MTL4::NewMachineLearningPipelineStateCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(pipelineDataSetSerializer)); + __block MTL4::NewMachineLearningPipelineStateCompletionHandlerFunction blockFunction = completionHandler; + return newMachineLearningPipelineState(descriptor, ^(MTL4::MachineLearningPipelineState* x0, NS::Error* x1) { blockFunction(x0, x1); }); } diff --git a/thirdparty/metal-cpp/Metal/MTL4CompilerTask.hpp b/thirdparty/metal-cpp/Metal/MTL4CompilerTask.hpp index a1ee9cdf58da..677dcdf6bb75 100644 --- a/thirdparty/metal-cpp/Metal/MTL4CompilerTask.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4CompilerTask.hpp @@ -1,63 +1,54 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4CompilerTask.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL4 { + class Compiler; +} namespace MTL4 { -class Compiler; -_MTL_ENUM(NS::Integer, CompilerTaskStatus) { + +_MTL4_ENUM(NS::Integer, CompilerTaskStatus) { CompilerTaskStatusNone = 0, CompilerTaskStatusScheduled = 1, CompilerTaskStatusCompiling = 2, CompilerTaskStatusFinished = 3, }; + class CompilerTask : public NS::Referencing { public: - Compiler* compiler() const; + MTL4::Compiler* compiler() const; + MTL4::CompilerTaskStatus status() const; + void waitUntilCompleted(); - CompilerTaskStatus status() const; - - void waitUntilCompleted(); }; -} +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4CompilerTask; -_MTL_INLINE MTL4::Compiler* MTL4::CompilerTask::compiler() const +_MTL4_INLINE MTL4::Compiler* MTL4::CompilerTask::compiler() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(compiler)); + return _MTL4_msg_MTL4__Compilerp_compiler((const void*)this, nullptr); } -_MTL_INLINE MTL4::CompilerTaskStatus MTL4::CompilerTask::status() const +_MTL4_INLINE MTL4::CompilerTaskStatus MTL4::CompilerTask::status() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(status)); + return _MTL4_msg_MTL4__CompilerTaskStatus_status((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CompilerTask::waitUntilCompleted() +_MTL4_INLINE void MTL4::CompilerTask::waitUntilCompleted() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitUntilCompleted)); + _MTL4_msg_v_waitUntilCompleted((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4ComputeCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTL4ComputeCommandEncoder.hpp index 7ef19da26a46..26b645d32e99 100644 --- a/thirdparty/metal-cpp/Metal/MTL4ComputeCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4ComputeCommandEncoder.hpp @@ -1,300 +1,249 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4ComputeCommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4CommandEncoder.hpp" -#include "MTL4Counters.hpp" -#include "MTLAccelerationStructure.hpp" -#include "MTLAccelerationStructureTypes.hpp" -#include "MTLBlitCommandEncoder.hpp" -#include "MTLCommandEncoder.hpp" -#include "MTLDefines.hpp" -#include "MTLGPUAddress.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" -#include - -namespace MTL4 -{ -class AccelerationStructureDescriptor; -class ArgumentTable; -class CounterHeap; -} - -namespace MTL -{ -class AccelerationStructure; -class Buffer; -class ComputePipelineState; -class IndirectCommandBuffer; -class Tensor; -class TensorExtents; -class Texture; +#include "MTLStructs.hpp" + +namespace MTL { + class AccelerationStructure; + class Buffer; + class ComputePipelineState; + class IndirectCommandBuffer; + class Tensor; + class TensorExtents; + class Texture; + using AccelerationStructureRefitOptions = NS::UInteger; + using BlitOption = NS::UInteger; + using Stages = NS::UInteger; +} +namespace MTL4 { + class AccelerationStructureDescriptor; + class ArgumentTable; + class CounterHeap; + enum TimestampGranularity : NS::Integer; } namespace MTL4 { -class ComputeCommandEncoder : public NS::Referencing + +class ComputeCommandEncoder : public NS::Referencing { public: - void buildAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, const MTL4::AccelerationStructureDescriptor* descriptor, const MTL4::BufferRange scratchBuffer); - - void copyAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructure* destinationAccelerationStructure); - - void copyAndCompactAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructure* destinationAccelerationStructure); - - void copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger size); - void copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin); - void copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin, MTL::BlitOption options); - - void copyFromTensor(const MTL::Tensor* sourceTensor, const MTL::TensorExtents* sourceOrigin, const MTL::TensorExtents* sourceDimensions, const MTL::Tensor* destinationTensor, const MTL::TensorExtents* destinationOrigin, const MTL::TensorExtents* destinationDimensions); - - void copyFromTexture(const MTL::Texture* sourceTexture, const MTL::Texture* destinationTexture); - void copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, NS::UInteger sliceCount, NS::UInteger levelCount); - void copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin); - void copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage); - void copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage, MTL::BlitOption options); - - void copyIndirectCommandBuffer(const MTL::IndirectCommandBuffer* source, NS::Range sourceRange, const MTL::IndirectCommandBuffer* destination, NS::UInteger destinationIndex); - + void buildAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, MTL4::AccelerationStructureDescriptor* descriptor, MTL4::BufferRange scratchBuffer); + void copyAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructure* destinationAccelerationStructure); + void copyAndCompactAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructure* destinationAccelerationStructure); + void copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger size); + void copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin); + void copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin, MTL::BlitOption options); + void copyFromTensor(MTL::Tensor* sourceTensor, MTL::TensorExtents* sourceOrigin, MTL::TensorExtents* sourceDimensions, MTL::Tensor* destinationTensor, MTL::TensorExtents* destinationOrigin, MTL::TensorExtents* destinationDimensions); + void copyFromTexture(MTL::Texture* sourceTexture, MTL::Texture* destinationTexture); + void copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, NS::UInteger sliceCount, NS::UInteger levelCount); + void copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin); + void copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage); + void copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage, MTL::BlitOption options); + void copyIndirectCommandBuffer(MTL::IndirectCommandBuffer* source, NS::Range sourceRange, MTL::IndirectCommandBuffer* destination, NS::UInteger destinationIndex); void dispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup); void dispatchThreadgroups(MTL::GPUAddress indirectBuffer, MTL::Size threadsPerThreadgroup); - void dispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup); void dispatchThreads(MTL::GPUAddress indirectBuffer); - - void executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange); - void executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandbuffer, MTL::GPUAddress indirectRangeBuffer); - - void fillBuffer(const MTL::Buffer* buffer, NS::Range range, uint8_t value); - - void generateMipmaps(const MTL::Texture* texture); - - void optimizeContentsForCPUAccess(const MTL::Texture* texture); - void optimizeContentsForCPUAccess(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level); - - void optimizeContentsForGPUAccess(const MTL::Texture* texture); - void optimizeContentsForGPUAccess(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level); - - void optimizeIndirectCommandBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range range); - - void refitAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL4::AccelerationStructureDescriptor* descriptor, const MTL::AccelerationStructure* destinationAccelerationStructure, const MTL4::BufferRange scratchBuffer); - void refitAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL4::AccelerationStructureDescriptor* descriptor, const MTL::AccelerationStructure* destinationAccelerationStructure, const MTL4::BufferRange scratchBuffer, MTL::AccelerationStructureRefitOptions options); - - void resetCommandsInBuffer(const MTL::IndirectCommandBuffer* buffer, NS::Range range); - - void setArgumentTable(const MTL4::ArgumentTable* argumentTable); - - void setComputePipelineState(const MTL::ComputePipelineState* state); - + void executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange); + void executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandbuffer, MTL::GPUAddress indirectRangeBuffer); + void fillBuffer(MTL::Buffer* buffer, NS::Range range, uint8_t value); + void generateMipmaps(MTL::Texture* texture); + void optimizeContents(MTL::Texture* texture); + void optimizeContents(MTL::Texture* texture, NS::UInteger slice, NS::UInteger level); + void optimizeIndirectCommandBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range range); + void refitAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL4::AccelerationStructureDescriptor* descriptor, MTL::AccelerationStructure* destinationAccelerationStructure, MTL4::BufferRange scratchBuffer); + void refitAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL4::AccelerationStructureDescriptor* descriptor, MTL::AccelerationStructure* destinationAccelerationStructure, MTL4::BufferRange scratchBuffer, MTL::AccelerationStructureRefitOptions options); + void resetCommandsInBuffer(MTL::IndirectCommandBuffer* buffer, NS::Range range); + void setArgumentTable(MTL4::ArgumentTable* argumentTable); + void setComputePipelineState(MTL::ComputePipelineState* state); void setImageblockWidth(NS::UInteger width, NS::UInteger height); - void setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index); - MTL::Stages stages(); + void writeCompactedAccelerationStructureSize(MTL::AccelerationStructure* accelerationStructure, MTL4::BufferRange buffer); + void writeTimestamp(MTL4::TimestampGranularity granularity, MTL4::CounterHeap* counterHeap, NS::UInteger index); - void writeCompactedAccelerationStructureSize(const MTL::AccelerationStructure* accelerationStructure, const MTL4::BufferRange buffer); - - void writeTimestamp(MTL4::TimestampGranularity granularity, const MTL4::CounterHeap* counterHeap, NS::UInteger index); }; -} -_MTL_INLINE void MTL4::ComputeCommandEncoder::buildAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, const MTL4::AccelerationStructureDescriptor* descriptor, const MTL4::BufferRange scratchBuffer) -{ - Object::sendMessage(this, _MTL_PRIVATE_SEL(buildAccelerationStructure_descriptor_scratchBuffer_), accelerationStructure, descriptor, scratchBuffer); -} +} // namespace MTL4 -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructure* destinationAccelerationStructure) -{ - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyAccelerationStructure_toAccelerationStructure_), sourceAccelerationStructure, destinationAccelerationStructure); -} +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4ComputeCommandEncoder; -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyAndCompactAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructure* destinationAccelerationStructure) +_MTL4_INLINE MTL::Stages MTL4::ComputeCommandEncoder::stages() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyAndCompactAccelerationStructure_toAccelerationStructure_), sourceAccelerationStructure, destinationAccelerationStructure); + return _MTL4_msg_MTL__Stages_stages((const void*)this, nullptr); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger size) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::setComputePipelineState(MTL::ComputePipelineState* state) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromBuffer_sourceOffset_toBuffer_destinationOffset_size_), sourceBuffer, sourceOffset, destinationBuffer, destinationOffset, size); + _MTL4_msg_v_setComputePipelineState__MTL__ComputePipelineStatep((const void*)this, nullptr, state); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_), sourceBuffer, sourceOffset, sourceBytesPerRow, sourceBytesPerImage, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin); + _MTL4_msg_v_setThreadgroupMemoryLength_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, length, index); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin, MTL::BlitOption options) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::setImageblockWidth(NS::UInteger width, NS::UInteger height) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_options_), sourceBuffer, sourceOffset, sourceBytesPerRow, sourceBytesPerImage, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin, options); + _MTL4_msg_v_setImageblockWidth_height__NS__UInteger_NS__UInteger((const void*)this, nullptr, width, height); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyFromTensor(const MTL::Tensor* sourceTensor, const MTL::TensorExtents* sourceOrigin, const MTL::TensorExtents* sourceDimensions, const MTL::Tensor* destinationTensor, const MTL::TensorExtents* destinationOrigin, const MTL::TensorExtents* destinationDimensions) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::dispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTensor_sourceOrigin_sourceDimensions_toTensor_destinationOrigin_destinationDimensions_), sourceTensor, sourceOrigin, sourceDimensions, destinationTensor, destinationOrigin, destinationDimensions); + _MTL4_msg_v_dispatchThreads_threadsPerThreadgroup__MTL__Size_MTL__Size((const void*)this, nullptr, threadsPerGrid, threadsPerThreadgroup); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyFromTexture(const MTL::Texture* sourceTexture, const MTL::Texture* destinationTexture) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::dispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTexture_toTexture_), sourceTexture, destinationTexture); + _MTL4_msg_v_dispatchThreadgroups_threadsPerThreadgroup__MTL__Size_MTL__Size((const void*)this, nullptr, threadgroupsPerGrid, threadsPerThreadgroup); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, NS::UInteger sliceCount, NS::UInteger levelCount) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::dispatchThreadgroups(MTL::GPUAddress indirectBuffer, MTL::Size threadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTexture_sourceSlice_sourceLevel_toTexture_destinationSlice_destinationLevel_sliceCount_levelCount_), sourceTexture, sourceSlice, sourceLevel, destinationTexture, destinationSlice, destinationLevel, sliceCount, levelCount); + _MTL4_msg_v_dispatchThreadgroupsWithIndirectBuffer_threadsPerThreadgroup__MTL__GPUAddress_MTL__Size((const void*)this, nullptr, indirectBuffer, threadsPerThreadgroup); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::dispatchThreads(MTL::GPUAddress indirectBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_), sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin); + _MTL4_msg_v_dispatchThreadsWithIndirectBuffer__MTL__GPUAddress((const void*)this, nullptr, indirectBuffer); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage_), sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationBuffer, destinationOffset, destinationBytesPerRow, destinationBytesPerImage); + _MTL4_msg_v_executeCommandsInBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range((const void*)this, nullptr, indirectCommandBuffer, executionRange); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage, MTL::BlitOption options) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandbuffer, MTL::GPUAddress indirectRangeBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage_options_), sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationBuffer, destinationOffset, destinationBytesPerRow, destinationBytesPerImage, options); + _MTL4_msg_v_executeCommandsInBuffer_indirectBuffer__MTL__IndirectCommandBufferp_MTL__GPUAddress((const void*)this, nullptr, indirectCommandbuffer, indirectRangeBuffer); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::copyIndirectCommandBuffer(const MTL::IndirectCommandBuffer* source, NS::Range sourceRange, const MTL::IndirectCommandBuffer* destination, NS::UInteger destinationIndex) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyFromTexture(MTL::Texture* sourceTexture, MTL::Texture* destinationTexture) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyIndirectCommandBuffer_sourceRange_destination_destinationIndex_), source, sourceRange, destination, destinationIndex); + _MTL4_msg_v_copyFromTexture_toTexture__MTL__Texturep_MTL__Texturep((const void*)this, nullptr, sourceTexture, destinationTexture); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::dispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, NS::UInteger sliceCount, NS::UInteger levelCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchThreadgroups_threadsPerThreadgroup_), threadgroupsPerGrid, threadsPerThreadgroup); + _MTL4_msg_v_copyFromTexture_sourceSlice_sourceLevel_toTexture_destinationSlice_destinationLevel_sliceCount_levelCount__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Texturep_NS__UInteger_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, sourceTexture, sourceSlice, sourceLevel, destinationTexture, destinationSlice, destinationLevel, sliceCount, levelCount); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::dispatchThreadgroups(MTL::GPUAddress indirectBuffer, MTL::Size threadsPerThreadgroup) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchThreadgroupsWithIndirectBuffer_threadsPerThreadgroup_), indirectBuffer, threadsPerThreadgroup); + _MTL4_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin((const void*)this, nullptr, sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::dispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchThreads_threadsPerThreadgroup_), threadsPerGrid, threadsPerThreadgroup); + _MTL4_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationBuffer, destinationOffset, destinationBytesPerRow, destinationBytesPerImage); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::dispatchThreads(MTL::GPUAddress indirectBuffer) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage, MTL::BlitOption options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchThreadsWithIndirectBuffer_), indirectBuffer); + _MTL4_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage_options__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__BlitOption((const void*)this, nullptr, sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationBuffer, destinationOffset, destinationBytesPerRow, destinationBytesPerImage, options); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger size) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(executeCommandsInBuffer_withRange_), indirectCommandBuffer, executionRange); + _MTL4_msg_v_copyFromBuffer_sourceOffset_toBuffer_destinationOffset_size__MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, sourceBuffer, sourceOffset, destinationBuffer, destinationOffset, size); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandbuffer, MTL::GPUAddress indirectRangeBuffer) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(executeCommandsInBuffer_indirectBuffer_), indirectCommandbuffer, indirectRangeBuffer); + _MTL4_msg_v_copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin((const void*)this, nullptr, sourceBuffer, sourceOffset, sourceBytesPerRow, sourceBytesPerImage, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::fillBuffer(const MTL::Buffer* buffer, NS::Range range, uint8_t value) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin, MTL::BlitOption options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(fillBuffer_range_value_), buffer, range, value); + _MTL4_msg_v_copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_options__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__BlitOption((const void*)this, nullptr, sourceBuffer, sourceOffset, sourceBytesPerRow, sourceBytesPerImage, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin, options); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::generateMipmaps(const MTL::Texture* texture) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyFromTensor(MTL::Tensor* sourceTensor, MTL::TensorExtents* sourceOrigin, MTL::TensorExtents* sourceDimensions, MTL::Tensor* destinationTensor, MTL::TensorExtents* destinationOrigin, MTL::TensorExtents* destinationDimensions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(generateMipmapsForTexture_), texture); + _MTL4_msg_v_copyFromTensor_sourceOrigin_sourceDimensions_toTensor_destinationOrigin_destinationDimensions__MTL__Tensorp_MTL__TensorExtentsp_MTL__TensorExtentsp_MTL__Tensorp_MTL__TensorExtentsp_MTL__TensorExtentsp((const void*)this, nullptr, sourceTensor, sourceOrigin, sourceDimensions, destinationTensor, destinationOrigin, destinationDimensions); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::optimizeContentsForCPUAccess(const MTL::Texture* texture) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::generateMipmaps(MTL::Texture* texture) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizeContentsForCPUAccess_), texture); + _MTL4_msg_v_generateMipmapsForTexture__MTL__Texturep((const void*)this, nullptr, texture); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::optimizeContentsForCPUAccess(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::fillBuffer(MTL::Buffer* buffer, NS::Range range, uint8_t value) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizeContentsForCPUAccess_slice_level_), texture, slice, level); + _MTL4_msg_v_fillBuffer_range_value__MTL__Bufferp_NS__Range_uint8_t((const void*)this, nullptr, buffer, range, value); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::optimizeContentsForGPUAccess(const MTL::Texture* texture) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::optimizeContents(MTL::Texture* texture) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizeContentsForGPUAccess_), texture); + _MTL4_msg_v_optimizeContentsForGPUAccess__MTL__Texturep((const void*)this, nullptr, texture); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::optimizeContentsForGPUAccess(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::optimizeContents(MTL::Texture* texture, NS::UInteger slice, NS::UInteger level) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizeContentsForGPUAccess_slice_level_), texture, slice, level); + _MTL4_msg_v_optimizeContentsForGPUAccess_slice_level__MTL__Texturep_NS__UInteger_NS__UInteger((const void*)this, nullptr, texture, slice, level); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::optimizeIndirectCommandBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range range) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::resetCommandsInBuffer(MTL::IndirectCommandBuffer* buffer, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizeIndirectCommandBuffer_withRange_), indirectCommandBuffer, range); + _MTL4_msg_v_resetCommandsInBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range((const void*)this, nullptr, buffer, range); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::refitAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL4::AccelerationStructureDescriptor* descriptor, const MTL::AccelerationStructure* destinationAccelerationStructure, const MTL4::BufferRange scratchBuffer) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyIndirectCommandBuffer(MTL::IndirectCommandBuffer* source, NS::Range sourceRange, MTL::IndirectCommandBuffer* destination, NS::UInteger destinationIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(refitAccelerationStructure_descriptor_destination_scratchBuffer_), sourceAccelerationStructure, descriptor, destinationAccelerationStructure, scratchBuffer); + _MTL4_msg_v_copyIndirectCommandBuffer_sourceRange_destination_destinationIndex__MTL__IndirectCommandBufferp_NS__Range_MTL__IndirectCommandBufferp_NS__UInteger((const void*)this, nullptr, source, sourceRange, destination, destinationIndex); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::refitAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL4::AccelerationStructureDescriptor* descriptor, const MTL::AccelerationStructure* destinationAccelerationStructure, const MTL4::BufferRange scratchBuffer, MTL::AccelerationStructureRefitOptions options) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::optimizeIndirectCommandBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(refitAccelerationStructure_descriptor_destination_scratchBuffer_options_), sourceAccelerationStructure, descriptor, destinationAccelerationStructure, scratchBuffer, options); + _MTL4_msg_v_optimizeIndirectCommandBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range((const void*)this, nullptr, indirectCommandBuffer, range); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::resetCommandsInBuffer(const MTL::IndirectCommandBuffer* buffer, NS::Range range) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::setArgumentTable(MTL4::ArgumentTable* argumentTable) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(resetCommandsInBuffer_withRange_), buffer, range); + _MTL4_msg_v_setArgumentTable__MTL4__ArgumentTablep((const void*)this, nullptr, argumentTable); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::setArgumentTable(const MTL4::ArgumentTable* argumentTable) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::buildAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, MTL4::AccelerationStructureDescriptor* descriptor, MTL4::BufferRange scratchBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setArgumentTable_), argumentTable); + _MTL4_msg_v_buildAccelerationStructure_descriptor_scratchBuffer__MTL__AccelerationStructurep_MTL4__AccelerationStructureDescriptorp_MTL4__BufferRange((const void*)this, nullptr, accelerationStructure, descriptor, scratchBuffer); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::setComputePipelineState(const MTL::ComputePipelineState* state) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::refitAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL4::AccelerationStructureDescriptor* descriptor, MTL::AccelerationStructure* destinationAccelerationStructure, MTL4::BufferRange scratchBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setComputePipelineState_), state); + _MTL4_msg_v_refitAccelerationStructure_descriptor_destination_scratchBuffer__MTL__AccelerationStructurep_MTL4__AccelerationStructureDescriptorp_MTL__AccelerationStructurep_MTL4__BufferRange((const void*)this, nullptr, sourceAccelerationStructure, descriptor, destinationAccelerationStructure, scratchBuffer); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::setImageblockWidth(NS::UInteger width, NS::UInteger height) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::refitAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL4::AccelerationStructureDescriptor* descriptor, MTL::AccelerationStructure* destinationAccelerationStructure, MTL4::BufferRange scratchBuffer, MTL::AccelerationStructureRefitOptions options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setImageblockWidth_height_), width, height); + _MTL4_msg_v_refitAccelerationStructure_descriptor_destination_scratchBuffer_options__MTL__AccelerationStructurep_MTL4__AccelerationStructureDescriptorp_MTL__AccelerationStructurep_MTL4__BufferRange_MTL__AccelerationStructureRefitOptions((const void*)this, nullptr, sourceAccelerationStructure, descriptor, destinationAccelerationStructure, scratchBuffer, options); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructure* destinationAccelerationStructure) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadgroupMemoryLength_atIndex_), length, index); + _MTL4_msg_v_copyAccelerationStructure_toAccelerationStructure__MTL__AccelerationStructurep_MTL__AccelerationStructurep((const void*)this, nullptr, sourceAccelerationStructure, destinationAccelerationStructure); } -_MTL_INLINE MTL::Stages MTL4::ComputeCommandEncoder::stages() +_MTL4_INLINE void MTL4::ComputeCommandEncoder::writeCompactedAccelerationStructureSize(MTL::AccelerationStructure* accelerationStructure, MTL4::BufferRange buffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stages)); + _MTL4_msg_v_writeCompactedAccelerationStructureSize_toBuffer__MTL__AccelerationStructurep_MTL4__BufferRange((const void*)this, nullptr, accelerationStructure, buffer); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::writeCompactedAccelerationStructureSize(const MTL::AccelerationStructure* accelerationStructure, const MTL4::BufferRange buffer) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::copyAndCompactAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructure* destinationAccelerationStructure) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(writeCompactedAccelerationStructureSize_toBuffer_), accelerationStructure, buffer); + _MTL4_msg_v_copyAndCompactAccelerationStructure_toAccelerationStructure__MTL__AccelerationStructurep_MTL__AccelerationStructurep((const void*)this, nullptr, sourceAccelerationStructure, destinationAccelerationStructure); } -_MTL_INLINE void MTL4::ComputeCommandEncoder::writeTimestamp(MTL4::TimestampGranularity granularity, const MTL4::CounterHeap* counterHeap, NS::UInteger index) +_MTL4_INLINE void MTL4::ComputeCommandEncoder::writeTimestamp(MTL4::TimestampGranularity granularity, MTL4::CounterHeap* counterHeap, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(writeTimestampWithGranularity_intoHeap_atIndex_), granularity, counterHeap, index); + _MTL4_msg_v_writeTimestampWithGranularity_intoHeap_atIndex__MTL4__TimestampGranularity_MTL4__CounterHeapp_NS__UInteger((const void*)this, nullptr, granularity, counterHeap, index); } diff --git a/thirdparty/metal-cpp/Metal/MTL4ComputePipeline.hpp b/thirdparty/metal-cpp/Metal/MTL4ComputePipeline.hpp index a808431aa5fb..0c47f4ba7930 100644 --- a/thirdparty/metal-cpp/Metal/MTL4ComputePipeline.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4ComputePipeline.hpp @@ -1,158 +1,135 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4ComputePipeline.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4PipelineState.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" +#include "MTLStructs.hpp" + +namespace MTL4 { + class FunctionDescriptor; + class StaticLinkingDescriptor; + enum IndirectCommandBufferSupportState : NS::Integer; +} namespace MTL4 { -class ComputePipelineDescriptor; -class FunctionDescriptor; -class StaticLinkingDescriptor; -class ComputePipelineDescriptor : public NS::Copying +class ComputePipelineDescriptor : public NS::Referencing { public: static ComputePipelineDescriptor* alloc(); + ComputePipelineDescriptor* init() const; + + MTL4::FunctionDescriptor* computeFunctionDescriptor() const; + NS::UInteger maxTotalThreadsPerThreadgroup() const; + MTL::Size requiredThreadsPerThreadgroup() const; + void reset(); + void setComputeFunctionDescriptor(MTL4::FunctionDescriptor* computeFunctionDescriptor); + void setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup); + void setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup); + void setStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* staticLinkingDescriptor); + void setSupportBinaryLinking(bool supportBinaryLinking); + void setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers); + void setThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool threadGroupSizeIsMultipleOfThreadExecutionWidth); + MTL4::StaticLinkingDescriptor* staticLinkingDescriptor() const; + bool supportBinaryLinking() const; + MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers() const; + bool threadGroupSizeIsMultipleOfThreadExecutionWidth() const; - FunctionDescriptor* computeFunctionDescriptor() const; - - ComputePipelineDescriptor* init(); - - NS::UInteger maxTotalThreadsPerThreadgroup() const; - - MTL::Size requiredThreadsPerThreadgroup() const; - - void reset(); - - void setComputeFunctionDescriptor(const MTL4::FunctionDescriptor* computeFunctionDescriptor); - - void setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup); - - void setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup); - - void setStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* staticLinkingDescriptor); - - void setSupportBinaryLinking(bool supportBinaryLinking); - - void setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers); - - void setThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool threadGroupSizeIsMultipleOfThreadExecutionWidth); - - StaticLinkingDescriptor* staticLinkingDescriptor() const; +}; - bool supportBinaryLinking() const; +} // namespace MTL4 - IndirectCommandBufferSupportState supportIndirectCommandBuffers() const; +// --- Class symbols + inline implementations --- - bool threadGroupSizeIsMultipleOfThreadExecutionWidth() const; -}; +extern "C" void *OBJC_CLASS_$_MTL4ComputePipelineDescriptor; -} -_MTL_INLINE MTL4::ComputePipelineDescriptor* MTL4::ComputePipelineDescriptor::alloc() +_MTL4_INLINE MTL4::ComputePipelineDescriptor* MTL4::ComputePipelineDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4ComputePipelineDescriptor)); + return _MTL4_msg_MTL4__ComputePipelineDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4ComputePipelineDescriptor, nullptr); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::ComputePipelineDescriptor::computeFunctionDescriptor() const +_MTL4_INLINE MTL4::ComputePipelineDescriptor* MTL4::ComputePipelineDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(computeFunctionDescriptor)); + return _MTL4_msg_MTL4__ComputePipelineDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::ComputePipelineDescriptor* MTL4::ComputePipelineDescriptor::init() +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::ComputePipelineDescriptor::computeFunctionDescriptor() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__FunctionDescriptorp_computeFunctionDescriptor((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::ComputePipelineDescriptor::maxTotalThreadsPerThreadgroup() const +_MTL4_INLINE void MTL4::ComputePipelineDescriptor::setComputeFunctionDescriptor(MTL4::FunctionDescriptor* computeFunctionDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerThreadgroup)); + _MTL4_msg_v_setComputeFunctionDescriptor__MTL4__FunctionDescriptorp((const void*)this, nullptr, computeFunctionDescriptor); } -_MTL_INLINE MTL::Size MTL4::ComputePipelineDescriptor::requiredThreadsPerThreadgroup() const +_MTL4_INLINE bool MTL4::ComputePipelineDescriptor::threadGroupSizeIsMultipleOfThreadExecutionWidth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerThreadgroup)); + return _MTL4_msg_bool_threadGroupSizeIsMultipleOfThreadExecutionWidth((const void*)this, nullptr); } -_MTL_INLINE void MTL4::ComputePipelineDescriptor::reset() +_MTL4_INLINE void MTL4::ComputePipelineDescriptor::setThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool threadGroupSizeIsMultipleOfThreadExecutionWidth) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL4_msg_v_setThreadGroupSizeIsMultipleOfThreadExecutionWidth__bool((const void*)this, nullptr, threadGroupSizeIsMultipleOfThreadExecutionWidth); } -_MTL_INLINE void MTL4::ComputePipelineDescriptor::setComputeFunctionDescriptor(const MTL4::FunctionDescriptor* computeFunctionDescriptor) +_MTL4_INLINE NS::UInteger MTL4::ComputePipelineDescriptor::maxTotalThreadsPerThreadgroup() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setComputeFunctionDescriptor_), computeFunctionDescriptor); + return _MTL4_msg_NS__UInteger_maxTotalThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE void MTL4::ComputePipelineDescriptor::setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup) +_MTL4_INLINE void MTL4::ComputePipelineDescriptor::setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadsPerThreadgroup_), maxTotalThreadsPerThreadgroup); + _MTL4_msg_v_setMaxTotalThreadsPerThreadgroup__NS__UInteger((const void*)this, nullptr, maxTotalThreadsPerThreadgroup); } -_MTL_INLINE void MTL4::ComputePipelineDescriptor::setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup) +_MTL4_INLINE MTL::Size MTL4::ComputePipelineDescriptor::requiredThreadsPerThreadgroup() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRequiredThreadsPerThreadgroup_), requiredThreadsPerThreadgroup); + return _MTL4_msg_MTL__Size_requiredThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE void MTL4::ComputePipelineDescriptor::setStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* staticLinkingDescriptor) +_MTL4_INLINE void MTL4::ComputePipelineDescriptor::setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStaticLinkingDescriptor_), staticLinkingDescriptor); + _MTL4_msg_v_setRequiredThreadsPerThreadgroup__MTL__Size((const void*)this, nullptr, requiredThreadsPerThreadgroup); } -_MTL_INLINE void MTL4::ComputePipelineDescriptor::setSupportBinaryLinking(bool supportBinaryLinking) +_MTL4_INLINE bool MTL4::ComputePipelineDescriptor::supportBinaryLinking() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportBinaryLinking_), supportBinaryLinking); + return _MTL4_msg_bool_supportBinaryLinking((const void*)this, nullptr); } -_MTL_INLINE void MTL4::ComputePipelineDescriptor::setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers) +_MTL4_INLINE void MTL4::ComputePipelineDescriptor::setSupportBinaryLinking(bool supportBinaryLinking) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportIndirectCommandBuffers_), supportIndirectCommandBuffers); + _MTL4_msg_v_setSupportBinaryLinking__bool((const void*)this, nullptr, supportBinaryLinking); } -_MTL_INLINE void MTL4::ComputePipelineDescriptor::setThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool threadGroupSizeIsMultipleOfThreadExecutionWidth) +_MTL4_INLINE MTL4::StaticLinkingDescriptor* MTL4::ComputePipelineDescriptor::staticLinkingDescriptor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadGroupSizeIsMultipleOfThreadExecutionWidth_), threadGroupSizeIsMultipleOfThreadExecutionWidth); + return _MTL4_msg_MTL4__StaticLinkingDescriptorp_staticLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::ComputePipelineDescriptor::staticLinkingDescriptor() const +_MTL4_INLINE void MTL4::ComputePipelineDescriptor::setStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* staticLinkingDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(staticLinkingDescriptor)); + _MTL4_msg_v_setStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp((const void*)this, nullptr, staticLinkingDescriptor); } -_MTL_INLINE bool MTL4::ComputePipelineDescriptor::supportBinaryLinking() const +_MTL4_INLINE MTL4::IndirectCommandBufferSupportState MTL4::ComputePipelineDescriptor::supportIndirectCommandBuffers() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportBinaryLinking)); + return _MTL4_msg_MTL4__IndirectCommandBufferSupportState_supportIndirectCommandBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL4::IndirectCommandBufferSupportState MTL4::ComputePipelineDescriptor::supportIndirectCommandBuffers() const +_MTL4_INLINE void MTL4::ComputePipelineDescriptor::setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers)); + _MTL4_msg_v_setSupportIndirectCommandBuffers__MTL4__IndirectCommandBufferSupportState((const void*)this, nullptr, supportIndirectCommandBuffers); } -_MTL_INLINE bool MTL4::ComputePipelineDescriptor::threadGroupSizeIsMultipleOfThreadExecutionWidth() const +_MTL4_INLINE void MTL4::ComputePipelineDescriptor::reset() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadGroupSizeIsMultipleOfThreadExecutionWidth)); + _MTL4_msg_v_reset((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4Counters.hpp b/thirdparty/metal-cpp/Metal/MTL4Counters.hpp index b507b766c51e..1d92baff205b 100644 --- a/thirdparty/metal-cpp/Metal/MTL4Counters.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4Counters.hpp @@ -1,138 +1,123 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4Counters.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include - -#include +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace NS { + class Data; + class String; +} namespace MTL4 { -class CounterHeapDescriptor; -_MTL_ENUM(NS::Integer, CounterHeapType) { - CounterHeapTypeInvalid, - CounterHeapTypeTimestamp, + +_MTL4_ENUM(NS::Integer, CounterHeapType) { + CounterHeapTypeInvalid = 0, + CounterHeapTypeTimestamp = 1, }; -_MTL_ENUM(NS::Integer, TimestampGranularity) { +_MTL4_ENUM(NS::Integer, TimestampGranularity) { TimestampGranularityRelaxed = 0, TimestampGranularityPrecise = 1, }; -struct TimestampHeapEntry -{ - uint64_t timestamp; -} _MTL_PACKED; + +class CounterHeapDescriptor; +class CounterHeap; class CounterHeapDescriptor : public NS::Copying { public: static CounterHeapDescriptor* alloc(); + CounterHeapDescriptor* init() const; - NS::UInteger count() const; + NS::UInteger count() const; + void setCount(NS::UInteger count); + void setType(MTL4::CounterHeapType type); + MTL4::CounterHeapType type() const; - CounterHeapDescriptor* init(); - - void setCount(NS::UInteger count); - - void setType(MTL4::CounterHeapType type); - CounterHeapType type() const; }; + class CounterHeap : public NS::Referencing { public: - NS::UInteger count() const; - void invalidateCounterRange(NS::Range range); - - NS::String* label() const; + NS::UInteger count() const; + void invalidateCounterRange(NS::Range range); + NS::String* label() const; + NS::Data* resolveCounterRange(NS::Range range); + void setLabel(NS::String* label); + MTL4::CounterHeapType type() const; - NS::Data* resolveCounterRange(NS::Range range); +}; - void setLabel(const NS::String* label); +} // namespace MTL4 - CounterHeapType type() const; -}; +// --- Class symbols + inline implementations --- -} +extern "C" void *OBJC_CLASS_$_MTL4CounterHeapDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4CounterHeap; -_MTL_INLINE MTL4::CounterHeapDescriptor* MTL4::CounterHeapDescriptor::alloc() +_MTL4_INLINE MTL4::CounterHeapDescriptor* MTL4::CounterHeapDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4CounterHeapDescriptor)); + return _MTL4_msg_MTL4__CounterHeapDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4CounterHeapDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL4::CounterHeapDescriptor::count() const +_MTL4_INLINE MTL4::CounterHeapDescriptor* MTL4::CounterHeapDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(count)); + return _MTL4_msg_MTL4__CounterHeapDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::CounterHeapDescriptor* MTL4::CounterHeapDescriptor::init() +_MTL4_INLINE MTL4::CounterHeapType MTL4::CounterHeapDescriptor::type() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__CounterHeapType_type((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CounterHeapDescriptor::setCount(NS::UInteger count) +_MTL4_INLINE void MTL4::CounterHeapDescriptor::setType(MTL4::CounterHeapType type) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCount_), count); + _MTL4_msg_v_setType__MTL4__CounterHeapType((const void*)this, nullptr, type); } -_MTL_INLINE void MTL4::CounterHeapDescriptor::setType(MTL4::CounterHeapType type) +_MTL4_INLINE NS::UInteger MTL4::CounterHeapDescriptor::count() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setType_), type); + return _MTL4_msg_NS__UInteger_count((const void*)this, nullptr); } -_MTL_INLINE MTL4::CounterHeapType MTL4::CounterHeapDescriptor::type() const +_MTL4_INLINE void MTL4::CounterHeapDescriptor::setCount(NS::UInteger count) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); + _MTL4_msg_v_setCount__NS__UInteger((const void*)this, nullptr, count); } -_MTL_INLINE NS::UInteger MTL4::CounterHeap::count() const +_MTL4_INLINE NS::String* MTL4::CounterHeap::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(count)); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CounterHeap::invalidateCounterRange(NS::Range range) +_MTL4_INLINE void MTL4::CounterHeap::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(invalidateCounterRange_), range); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE NS::String* MTL4::CounterHeap::label() const +_MTL4_INLINE NS::UInteger MTL4::CounterHeap::count() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL4_msg_NS__UInteger_count((const void*)this, nullptr); } -_MTL_INLINE NS::Data* MTL4::CounterHeap::resolveCounterRange(NS::Range range) +_MTL4_INLINE MTL4::CounterHeapType MTL4::CounterHeap::type() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resolveCounterRange_), range); + return _MTL4_msg_MTL4__CounterHeapType_type((const void*)this, nullptr); } -_MTL_INLINE void MTL4::CounterHeap::setLabel(const NS::String* label) +_MTL4_INLINE NS::Data* MTL4::CounterHeap::resolveCounterRange(NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL4_msg_NS__Datap_resolveCounterRange__NS__Range((const void*)this, nullptr, range); } -_MTL_INLINE MTL4::CounterHeapType MTL4::CounterHeap::type() const +_MTL4_INLINE void MTL4::CounterHeap::invalidateCounterRange(NS::Range range) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); + _MTL4_msg_v_invalidateCounterRange__NS__Range((const void*)this, nullptr, range); } diff --git a/thirdparty/metal-cpp/Metal/MTL4Defines.hpp b/thirdparty/metal-cpp/Metal/MTL4Defines.hpp new file mode 100644 index 000000000000..b9133f1b8673 --- /dev/null +++ b/thirdparty/metal-cpp/Metal/MTL4Defines.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../Foundation/NSDefines.hpp" + +#define _MTL4_EXPORT _NS_EXPORT +#define _MTL4_EXTERN _NS_EXTERN +#define _MTL4_INLINE _NS_INLINE +#define _MTL4_PACKED _NS_PACKED + +#define _MTL4_CONST(type, name) _NS_CONST(type, name) +#define _MTL4_ENUM(type, name) _NS_ENUM(type, name) +#define _MTL4_OPTIONS(type, name) _NS_OPTIONS(type, name) + +#define _MTL4_VALIDATE_SIZE(ns, name) _NS_VALIDATE_SIZE(ns, name) +#define _MTL4_VALIDATE_ENUM(ns, name) _NS_VALIDATE_ENUM(ns, name) diff --git a/thirdparty/metal-cpp/Metal/MTL4FunctionDescriptor.hpp b/thirdparty/metal-cpp/Metal/MTL4FunctionDescriptor.hpp index 9049677ebc82..73129888d376 100644 --- a/thirdparty/metal-cpp/Metal/MTL4FunctionDescriptor.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4FunctionDescriptor.hpp @@ -1,49 +1,36 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal//MTL4FunctionDescriptor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" namespace MTL4 { -class FunctionDescriptor; class FunctionDescriptor : public NS::Copying { public: static FunctionDescriptor* alloc(); + FunctionDescriptor* init() const; - FunctionDescriptor* init(); }; -} -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::FunctionDescriptor::alloc() +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4FunctionDescriptor; + +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::FunctionDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4FunctionDescriptor)); + return _MTL4_msg_MTL4__FunctionDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4FunctionDescriptor, nullptr); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::FunctionDescriptor::init() +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::FunctionDescriptor::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__FunctionDescriptorp_init((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4LibraryDescriptor.hpp b/thirdparty/metal-cpp/Metal/MTL4LibraryDescriptor.hpp index bc491b693b4f..78e6c9d7016b 100644 --- a/thirdparty/metal-cpp/Metal/MTL4LibraryDescriptor.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4LibraryDescriptor.hpp @@ -1,98 +1,80 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4LibraryDescriptor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" -namespace MTL4 -{ -class LibraryDescriptor; +namespace MTL { + class CompileOptions; } - -namespace MTL -{ -class CompileOptions; +namespace NS { + class String; } namespace MTL4 { + class LibraryDescriptor : public NS::Copying { public: static LibraryDescriptor* alloc(); + LibraryDescriptor* init() const; - LibraryDescriptor* init(); + NS::String* name() const; + MTL::CompileOptions* options() const; + void setName(NS::String* name); + void setOptions(MTL::CompileOptions* options); + void setSource(NS::String* source); + NS::String* source() const; - NS::String* name() const; +}; - MTL::CompileOptions* options() const; +} // namespace MTL4 - void setName(const NS::String* name); +// --- Class symbols + inline implementations --- - void setOptions(const MTL::CompileOptions* options); +extern "C" void *OBJC_CLASS_$_MTL4LibraryDescriptor; - void setSource(const NS::String* source); - NS::String* source() const; -}; - -} -_MTL_INLINE MTL4::LibraryDescriptor* MTL4::LibraryDescriptor::alloc() +_MTL4_INLINE MTL4::LibraryDescriptor* MTL4::LibraryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4LibraryDescriptor)); + return _MTL4_msg_MTL4__LibraryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4LibraryDescriptor, nullptr); } -_MTL_INLINE MTL4::LibraryDescriptor* MTL4::LibraryDescriptor::init() +_MTL4_INLINE MTL4::LibraryDescriptor* MTL4::LibraryDescriptor::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__LibraryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::LibraryDescriptor::name() const +_MTL4_INLINE NS::String* MTL4::LibraryDescriptor::source() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL4_msg_NS__Stringp_source((const void*)this, nullptr); } -_MTL_INLINE MTL::CompileOptions* MTL4::LibraryDescriptor::options() const +_MTL4_INLINE void MTL4::LibraryDescriptor::setSource(NS::String* source) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(options)); + _MTL4_msg_v_setSource__NS__Stringp((const void*)this, nullptr, source); } -_MTL_INLINE void MTL4::LibraryDescriptor::setName(const NS::String* name) +_MTL4_INLINE MTL::CompileOptions* MTL4::LibraryDescriptor::options() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setName_), name); + return _MTL4_msg_MTL__CompileOptionsp_options((const void*)this, nullptr); } -_MTL_INLINE void MTL4::LibraryDescriptor::setOptions(const MTL::CompileOptions* options) +_MTL4_INLINE void MTL4::LibraryDescriptor::setOptions(MTL::CompileOptions* options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOptions_), options); + _MTL4_msg_v_setOptions__MTL__CompileOptionsp((const void*)this, nullptr, options); } -_MTL_INLINE void MTL4::LibraryDescriptor::setSource(const NS::String* source) +_MTL4_INLINE NS::String* MTL4::LibraryDescriptor::name() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSource_), source); + return _MTL4_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::LibraryDescriptor::source() const +_MTL4_INLINE void MTL4::LibraryDescriptor::setName(NS::String* name) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(source)); + _MTL4_msg_v_setName__NS__Stringp((const void*)this, nullptr, name); } diff --git a/thirdparty/metal-cpp/Metal/MTL4LibraryFunctionDescriptor.hpp b/thirdparty/metal-cpp/Metal/MTL4LibraryFunctionDescriptor.hpp index 1dec4bf288cd..dc9c4bdb12ae 100644 --- a/thirdparty/metal-cpp/Metal/MTL4LibraryFunctionDescriptor.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4LibraryFunctionDescriptor.hpp @@ -1,86 +1,69 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4LibraryFunctionDescriptor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4FunctionDescriptor.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -namespace MTL4 -{ -class LibraryFunctionDescriptor; +namespace MTL { + class Library; } - -namespace MTL -{ -class Library; +namespace NS { + class String; } namespace MTL4 { -class LibraryFunctionDescriptor : public NS::Copying + +class LibraryFunctionDescriptor : public NS::Referencing { public: static LibraryFunctionDescriptor* alloc(); + LibraryFunctionDescriptor* init() const; - LibraryFunctionDescriptor* init(); + MTL::Library* library() const; + NS::String* name() const; + void setLibrary(MTL::Library* library); + void setName(NS::String* name); - MTL::Library* library() const; +}; - NS::String* name() const; +} // namespace MTL4 - void setLibrary(const MTL::Library* library); +// --- Class symbols + inline implementations --- - void setName(const NS::String* name); -}; +extern "C" void *OBJC_CLASS_$_MTL4LibraryFunctionDescriptor; -} -_MTL_INLINE MTL4::LibraryFunctionDescriptor* MTL4::LibraryFunctionDescriptor::alloc() +_MTL4_INLINE MTL4::LibraryFunctionDescriptor* MTL4::LibraryFunctionDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4LibraryFunctionDescriptor)); + return _MTL4_msg_MTL4__LibraryFunctionDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4LibraryFunctionDescriptor, nullptr); } -_MTL_INLINE MTL4::LibraryFunctionDescriptor* MTL4::LibraryFunctionDescriptor::init() +_MTL4_INLINE MTL4::LibraryFunctionDescriptor* MTL4::LibraryFunctionDescriptor::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__LibraryFunctionDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::Library* MTL4::LibraryFunctionDescriptor::library() const +_MTL4_INLINE NS::String* MTL4::LibraryFunctionDescriptor::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(library)); + return _MTL4_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::LibraryFunctionDescriptor::name() const +_MTL4_INLINE void MTL4::LibraryFunctionDescriptor::setName(NS::String* name) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + _MTL4_msg_v_setName__NS__Stringp((const void*)this, nullptr, name); } -_MTL_INLINE void MTL4::LibraryFunctionDescriptor::setLibrary(const MTL::Library* library) +_MTL4_INLINE MTL::Library* MTL4::LibraryFunctionDescriptor::library() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLibrary_), library); + return _MTL4_msg_MTL__Libraryp_library((const void*)this, nullptr); } -_MTL_INLINE void MTL4::LibraryFunctionDescriptor::setName(const NS::String* name) +_MTL4_INLINE void MTL4::LibraryFunctionDescriptor::setLibrary(MTL::Library* library) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setName_), name); + _MTL4_msg_v_setLibrary__MTL__Libraryp((const void*)this, nullptr, library); } diff --git a/thirdparty/metal-cpp/Metal/MTL4LinkingDescriptor.hpp b/thirdparty/metal-cpp/Metal/MTL4LinkingDescriptor.hpp index ef5900b1fa45..666f83e2070d 100644 --- a/thirdparty/metal-cpp/Metal/MTL4LinkingDescriptor.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4LinkingDescriptor.hpp @@ -1,204 +1,188 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4LinkingDescriptor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace NS { + class Array; + class Dictionary; +} namespace MTL4 { + +class StaticLinkingDescriptor; class PipelineStageDynamicLinkingDescriptor; class RenderPipelineDynamicLinkingDescriptor; -class StaticLinkingDescriptor; class StaticLinkingDescriptor : public NS::Copying { public: static StaticLinkingDescriptor* alloc(); + StaticLinkingDescriptor* init() const; - NS::Array* functionDescriptors() const; - - NS::Dictionary* groups() const; - - StaticLinkingDescriptor* init(); - - NS::Array* privateFunctionDescriptors() const; - - void setFunctionDescriptors(const NS::Array* functionDescriptors); - - void setGroups(const NS::Dictionary* groups); + NS::Array* functionDescriptors() const; + NS::Dictionary* groups() const; + NS::Array* privateFunctionDescriptors() const; + void setFunctionDescriptors(NS::Array* functionDescriptors); + void setGroups(NS::Dictionary* groups); + void setPrivateFunctionDescriptors(NS::Array* privateFunctionDescriptors); - void setPrivateFunctionDescriptors(const NS::Array* privateFunctionDescriptors); }; + class PipelineStageDynamicLinkingDescriptor : public NS::Copying { public: static PipelineStageDynamicLinkingDescriptor* alloc(); + PipelineStageDynamicLinkingDescriptor* init() const; - NS::Array* binaryLinkedFunctions() const; - - PipelineStageDynamicLinkingDescriptor* init(); - - NS::UInteger maxCallStackDepth() const; - - NS::Array* preloadedLibraries() const; - - void setBinaryLinkedFunctions(const NS::Array* binaryLinkedFunctions); - - void setMaxCallStackDepth(NS::UInteger maxCallStackDepth); + NS::Array* binaryLinkedFunctions() const; + NS::UInteger maxCallStackDepth() const; + NS::Array* preloadedLibraries() const; + void setBinaryLinkedFunctions(NS::Array* binaryLinkedFunctions); + void setMaxCallStackDepth(NS::UInteger maxCallStackDepth); + void setPreloadedLibraries(NS::Array* preloadedLibraries); - void setPreloadedLibraries(const NS::Array* preloadedLibraries); }; + class RenderPipelineDynamicLinkingDescriptor : public NS::Copying { public: static RenderPipelineDynamicLinkingDescriptor* alloc(); + RenderPipelineDynamicLinkingDescriptor* init() const; - PipelineStageDynamicLinkingDescriptor* fragmentLinkingDescriptor() const; + MTL4::PipelineStageDynamicLinkingDescriptor* fragmentLinkingDescriptor() const; + MTL4::PipelineStageDynamicLinkingDescriptor* meshLinkingDescriptor() const; + MTL4::PipelineStageDynamicLinkingDescriptor* objectLinkingDescriptor() const; + MTL4::PipelineStageDynamicLinkingDescriptor* tileLinkingDescriptor() const; + MTL4::PipelineStageDynamicLinkingDescriptor* vertexLinkingDescriptor() const; - RenderPipelineDynamicLinkingDescriptor* init(); +}; - PipelineStageDynamicLinkingDescriptor* meshLinkingDescriptor() const; +} // namespace MTL4 - PipelineStageDynamicLinkingDescriptor* objectLinkingDescriptor() const; +// --- Class symbols + inline implementations --- - PipelineStageDynamicLinkingDescriptor* tileLinkingDescriptor() const; +extern "C" void *OBJC_CLASS_$_MTL4StaticLinkingDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4PipelineStageDynamicLinkingDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4RenderPipelineDynamicLinkingDescriptor; - PipelineStageDynamicLinkingDescriptor* vertexLinkingDescriptor() const; -}; - -} -_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::StaticLinkingDescriptor::alloc() +_MTL4_INLINE MTL4::StaticLinkingDescriptor* MTL4::StaticLinkingDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4StaticLinkingDescriptor)); + return _MTL4_msg_MTL4__StaticLinkingDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4StaticLinkingDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL4::StaticLinkingDescriptor::functionDescriptors() const +_MTL4_INLINE MTL4::StaticLinkingDescriptor* MTL4::StaticLinkingDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionDescriptors)); + return _MTL4_msg_MTL4__StaticLinkingDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::Dictionary* MTL4::StaticLinkingDescriptor::groups() const +_MTL4_INLINE NS::Array* MTL4::StaticLinkingDescriptor::functionDescriptors() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(groups)); + return _MTL4_msg_NS__Arrayp_functionDescriptors((const void*)this, nullptr); } -_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::StaticLinkingDescriptor::init() +_MTL4_INLINE void MTL4::StaticLinkingDescriptor::setFunctionDescriptors(NS::Array* functionDescriptors) { - return NS::Object::init(); + _MTL4_msg_v_setFunctionDescriptors__NS__Arrayp((const void*)this, nullptr, functionDescriptors); } -_MTL_INLINE NS::Array* MTL4::StaticLinkingDescriptor::privateFunctionDescriptors() const +_MTL4_INLINE NS::Array* MTL4::StaticLinkingDescriptor::privateFunctionDescriptors() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(privateFunctionDescriptors)); + return _MTL4_msg_NS__Arrayp_privateFunctionDescriptors((const void*)this, nullptr); } -_MTL_INLINE void MTL4::StaticLinkingDescriptor::setFunctionDescriptors(const NS::Array* functionDescriptors) +_MTL4_INLINE void MTL4::StaticLinkingDescriptor::setPrivateFunctionDescriptors(NS::Array* privateFunctionDescriptors) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctionDescriptors_), functionDescriptors); + _MTL4_msg_v_setPrivateFunctionDescriptors__NS__Arrayp((const void*)this, nullptr, privateFunctionDescriptors); } -_MTL_INLINE void MTL4::StaticLinkingDescriptor::setGroups(const NS::Dictionary* groups) +_MTL4_INLINE NS::Dictionary* MTL4::StaticLinkingDescriptor::groups() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setGroups_), groups); + return _MTL4_msg_NS__Dictionaryp_groups((const void*)this, nullptr); } -_MTL_INLINE void MTL4::StaticLinkingDescriptor::setPrivateFunctionDescriptors(const NS::Array* privateFunctionDescriptors) +_MTL4_INLINE void MTL4::StaticLinkingDescriptor::setGroups(NS::Dictionary* groups) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPrivateFunctionDescriptors_), privateFunctionDescriptors); + _MTL4_msg_v_setGroups__NS__Dictionaryp((const void*)this, nullptr, groups); } -_MTL_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::PipelineStageDynamicLinkingDescriptor::alloc() +_MTL4_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::PipelineStageDynamicLinkingDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4PipelineStageDynamicLinkingDescriptor)); + return _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4PipelineStageDynamicLinkingDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL4::PipelineStageDynamicLinkingDescriptor::binaryLinkedFunctions() const +_MTL4_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::PipelineStageDynamicLinkingDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(binaryLinkedFunctions)); + return _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::PipelineStageDynamicLinkingDescriptor::init() +_MTL4_INLINE NS::UInteger MTL4::PipelineStageDynamicLinkingDescriptor::maxCallStackDepth() const { - return NS::Object::init(); + return _MTL4_msg_NS__UInteger_maxCallStackDepth((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::PipelineStageDynamicLinkingDescriptor::maxCallStackDepth() const +_MTL4_INLINE void MTL4::PipelineStageDynamicLinkingDescriptor::setMaxCallStackDepth(NS::UInteger maxCallStackDepth) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxCallStackDepth)); + _MTL4_msg_v_setMaxCallStackDepth__NS__UInteger((const void*)this, nullptr, maxCallStackDepth); } -_MTL_INLINE NS::Array* MTL4::PipelineStageDynamicLinkingDescriptor::preloadedLibraries() const +_MTL4_INLINE NS::Array* MTL4::PipelineStageDynamicLinkingDescriptor::binaryLinkedFunctions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(preloadedLibraries)); + return _MTL4_msg_NS__Arrayp_binaryLinkedFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL4::PipelineStageDynamicLinkingDescriptor::setBinaryLinkedFunctions(const NS::Array* binaryLinkedFunctions) +_MTL4_INLINE void MTL4::PipelineStageDynamicLinkingDescriptor::setBinaryLinkedFunctions(NS::Array* binaryLinkedFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBinaryLinkedFunctions_), binaryLinkedFunctions); + _MTL4_msg_v_setBinaryLinkedFunctions__NS__Arrayp((const void*)this, nullptr, binaryLinkedFunctions); } -_MTL_INLINE void MTL4::PipelineStageDynamicLinkingDescriptor::setMaxCallStackDepth(NS::UInteger maxCallStackDepth) +_MTL4_INLINE NS::Array* MTL4::PipelineStageDynamicLinkingDescriptor::preloadedLibraries() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxCallStackDepth_), maxCallStackDepth); + return _MTL4_msg_NS__Arrayp_preloadedLibraries((const void*)this, nullptr); } -_MTL_INLINE void MTL4::PipelineStageDynamicLinkingDescriptor::setPreloadedLibraries(const NS::Array* preloadedLibraries) +_MTL4_INLINE void MTL4::PipelineStageDynamicLinkingDescriptor::setPreloadedLibraries(NS::Array* preloadedLibraries) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPreloadedLibraries_), preloadedLibraries); + _MTL4_msg_v_setPreloadedLibraries__NS__Arrayp((const void*)this, nullptr, preloadedLibraries); } -_MTL_INLINE MTL4::RenderPipelineDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::alloc() +_MTL4_INLINE MTL4::RenderPipelineDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4RenderPipelineDynamicLinkingDescriptor)); + return _MTL4_msg_MTL4__RenderPipelineDynamicLinkingDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4RenderPipelineDynamicLinkingDescriptor, nullptr); } -_MTL_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::fragmentLinkingDescriptor() const +_MTL4_INLINE MTL4::RenderPipelineDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentLinkingDescriptor)); + return _MTL4_msg_MTL4__RenderPipelineDynamicLinkingDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderPipelineDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::init() +_MTL4_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::vertexLinkingDescriptor() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_vertexLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::meshLinkingDescriptor() const +_MTL4_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::fragmentLinkingDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshLinkingDescriptor)); + return _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_fragmentLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::objectLinkingDescriptor() const +_MTL4_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::tileLinkingDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectLinkingDescriptor)); + return _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_tileLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::tileLinkingDescriptor() const +_MTL4_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::objectLinkingDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileLinkingDescriptor)); + return _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_objectLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::vertexLinkingDescriptor() const +_MTL4_INLINE MTL4::PipelineStageDynamicLinkingDescriptor* MTL4::RenderPipelineDynamicLinkingDescriptor::meshLinkingDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexLinkingDescriptor)); + return _MTL4_msg_MTL4__PipelineStageDynamicLinkingDescriptorp_meshLinkingDescriptor((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4MachineLearningCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTL4MachineLearningCommandEncoder.hpp index 4d3cff66ebd0..14961f844214 100644 --- a/thirdparty/metal-cpp/Metal/MTL4MachineLearningCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4MachineLearningCommandEncoder.hpp @@ -1,66 +1,51 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4MachineLearningCommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4CommandEncoder.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -namespace MTL4 -{ -class ArgumentTable; -class MachineLearningPipelineState; +namespace MTL { + class Heap; } - -namespace MTL -{ -class Heap; +namespace MTL4 { + class ArgumentTable; + class MachineLearningPipelineState; } namespace MTL4 { -class MachineLearningCommandEncoder : public NS::Referencing + +class MachineLearningCommandEncoder : public NS::Referencing { public: - void dispatchNetwork(const MTL::Heap* heap); + void dispatchNetwork(MTL::Heap* heap); + void setArgumentTable(MTL4::ArgumentTable* argumentTable); + void setPipelineState(MTL4::MachineLearningPipelineState* pipelineState); - void setArgumentTable(const MTL4::ArgumentTable* argumentTable); - - void setPipelineState(const MTL4::MachineLearningPipelineState* pipelineState); }; -} -_MTL_INLINE void MTL4::MachineLearningCommandEncoder::dispatchNetwork(const MTL::Heap* heap) +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4MachineLearningCommandEncoder; + +_MTL4_INLINE void MTL4::MachineLearningCommandEncoder::setPipelineState(MTL4::MachineLearningPipelineState* pipelineState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchNetworkWithIntermediatesHeap_), heap); + _MTL4_msg_v_setPipelineState__MTL4__MachineLearningPipelineStatep((const void*)this, nullptr, pipelineState); } -_MTL_INLINE void MTL4::MachineLearningCommandEncoder::setArgumentTable(const MTL4::ArgumentTable* argumentTable) +_MTL4_INLINE void MTL4::MachineLearningCommandEncoder::setArgumentTable(MTL4::ArgumentTable* argumentTable) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setArgumentTable_), argumentTable); + _MTL4_msg_v_setArgumentTable__MTL4__ArgumentTablep((const void*)this, nullptr, argumentTable); } -_MTL_INLINE void MTL4::MachineLearningCommandEncoder::setPipelineState(const MTL4::MachineLearningPipelineState* pipelineState) +_MTL4_INLINE void MTL4::MachineLearningCommandEncoder::dispatchNetwork(MTL::Heap* heap) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPipelineState_), pipelineState); + _MTL4_msg_v_dispatchNetworkWithIntermediatesHeap__MTL__Heapp((const void*)this, nullptr, heap); } diff --git a/thirdparty/metal-cpp/Metal/MTL4MachineLearningPipeline.hpp b/thirdparty/metal-cpp/Metal/MTL4MachineLearningPipeline.hpp index 713569f946b6..2bec5ef7b92f 100644 --- a/thirdparty/metal-cpp/Metal/MTL4MachineLearningPipeline.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4MachineLearningPipeline.hpp @@ -1,172 +1,160 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4MachineLearningPipeline.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4PipelineState.hpp" #include "MTLAllocation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -namespace MTL4 -{ -class FunctionDescriptor; -class MachineLearningPipelineDescriptor; -class MachineLearningPipelineReflection; +namespace MTL { + class Device; + class TensorExtents; } - -namespace MTL -{ -class Device; -class TensorExtents; +namespace MTL4 { + class FunctionDescriptor; +} +namespace NS { + class Array; + class String; } namespace MTL4 { -class MachineLearningPipelineDescriptor : public NS::Copying + +class MachineLearningPipelineDescriptor; +class MachineLearningPipelineReflection; +class MachineLearningPipelineState; + +class MachineLearningPipelineDescriptor : public NS::Referencing { public: static MachineLearningPipelineDescriptor* alloc(); + MachineLearningPipelineDescriptor* init() const; - MachineLearningPipelineDescriptor* init(); + MTL::TensorExtents* inputDimensions(NS::Integer bufferIndex); + NS::String* label() const; + MTL4::FunctionDescriptor* machineLearningFunctionDescriptor() const; + void reset(); + void setInputDimensions(MTL::TensorExtents* dimensions, NS::Integer bufferIndex); + void setInputDimensions(NS::Array* dimensions, NS::Range range); + void setLabel(NS::String* label); + void setMachineLearningFunctionDescriptor(MTL4::FunctionDescriptor* machineLearningFunctionDescriptor); - MTL::TensorExtents* inputDimensionsAtBufferIndex(NS::Integer bufferIndex); - - NS::String* label() const; - - FunctionDescriptor* machineLearningFunctionDescriptor() const; - - void reset(); - - void setInputDimensions(const MTL::TensorExtents* dimensions, NS::Integer bufferIndex); - void setInputDimensions(const NS::Array* dimensions, NS::Range range); - - void setLabel(const NS::String* label); - - void setMachineLearningFunctionDescriptor(const MTL4::FunctionDescriptor* machineLearningFunctionDescriptor); }; + class MachineLearningPipelineReflection : public NS::Referencing { public: static MachineLearningPipelineReflection* alloc(); + MachineLearningPipelineReflection* init() const; - NS::Array* bindings() const; + NS::Array* bindings() const; - MachineLearningPipelineReflection* init(); }; + class MachineLearningPipelineState : public NS::Referencing { public: - MTL::Device* device() const; + MTL::Device* device() const; + NS::UInteger intermediatesHeapSize() const; + NS::String* label() const; + MTL4::MachineLearningPipelineReflection* reflection() const; + +}; - NS::UInteger intermediatesHeapSize() const; +} // namespace MTL4 - NS::String* label() const; +// --- Class symbols + inline implementations --- - MachineLearningPipelineReflection* reflection() const; -}; +extern "C" void *OBJC_CLASS_$_MTL4MachineLearningPipelineDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4MachineLearningPipelineReflection; +extern "C" void *OBJC_CLASS_$_MTL4MachineLearningPipelineState; -} -_MTL_INLINE MTL4::MachineLearningPipelineDescriptor* MTL4::MachineLearningPipelineDescriptor::alloc() +_MTL4_INLINE MTL4::MachineLearningPipelineDescriptor* MTL4::MachineLearningPipelineDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4MachineLearningPipelineDescriptor)); + return _MTL4_msg_MTL4__MachineLearningPipelineDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4MachineLearningPipelineDescriptor, nullptr); } -_MTL_INLINE MTL4::MachineLearningPipelineDescriptor* MTL4::MachineLearningPipelineDescriptor::init() +_MTL4_INLINE MTL4::MachineLearningPipelineDescriptor* MTL4::MachineLearningPipelineDescriptor::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__MachineLearningPipelineDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorExtents* MTL4::MachineLearningPipelineDescriptor::inputDimensionsAtBufferIndex(NS::Integer bufferIndex) +_MTL4_INLINE NS::String* MTL4::MachineLearningPipelineDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inputDimensionsAtBufferIndex_), bufferIndex); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::MachineLearningPipelineDescriptor::label() const +_MTL4_INLINE void MTL4::MachineLearningPipelineDescriptor::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::MachineLearningPipelineDescriptor::machineLearningFunctionDescriptor() const +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::MachineLearningPipelineDescriptor::machineLearningFunctionDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(machineLearningFunctionDescriptor)); + return _MTL4_msg_MTL4__FunctionDescriptorp_machineLearningFunctionDescriptor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MachineLearningPipelineDescriptor::reset() +_MTL4_INLINE void MTL4::MachineLearningPipelineDescriptor::setMachineLearningFunctionDescriptor(MTL4::FunctionDescriptor* machineLearningFunctionDescriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL4_msg_v_setMachineLearningFunctionDescriptor__MTL4__FunctionDescriptorp((const void*)this, nullptr, machineLearningFunctionDescriptor); } -_MTL_INLINE void MTL4::MachineLearningPipelineDescriptor::setInputDimensions(const MTL::TensorExtents* dimensions, NS::Integer bufferIndex) +_MTL4_INLINE void MTL4::MachineLearningPipelineDescriptor::setInputDimensions(MTL::TensorExtents* dimensions, NS::Integer bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInputDimensions_atBufferIndex_), dimensions, bufferIndex); + _MTL4_msg_v_setInputDimensions_atBufferIndex__MTL__TensorExtentsp_NS__Integer((const void*)this, nullptr, dimensions, bufferIndex); } -_MTL_INLINE void MTL4::MachineLearningPipelineDescriptor::setInputDimensions(const NS::Array* dimensions, NS::Range range) +_MTL4_INLINE void MTL4::MachineLearningPipelineDescriptor::setInputDimensions(NS::Array* dimensions, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInputDimensions_withRange_), dimensions, range); + _MTL4_msg_v_setInputDimensions_withRange__NS__Arrayp_NS__Range((const void*)this, nullptr, dimensions, range); } -_MTL_INLINE void MTL4::MachineLearningPipelineDescriptor::setLabel(const NS::String* label) +_MTL4_INLINE MTL::TensorExtents* MTL4::MachineLearningPipelineDescriptor::inputDimensions(NS::Integer bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL4_msg_MTL__TensorExtentsp_inputDimensionsAtBufferIndex__NS__Integer((const void*)this, nullptr, bufferIndex); } -_MTL_INLINE void MTL4::MachineLearningPipelineDescriptor::setMachineLearningFunctionDescriptor(const MTL4::FunctionDescriptor* machineLearningFunctionDescriptor) +_MTL4_INLINE void MTL4::MachineLearningPipelineDescriptor::reset() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMachineLearningFunctionDescriptor_), machineLearningFunctionDescriptor); + _MTL4_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE MTL4::MachineLearningPipelineReflection* MTL4::MachineLearningPipelineReflection::alloc() +_MTL4_INLINE MTL4::MachineLearningPipelineReflection* MTL4::MachineLearningPipelineReflection::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4MachineLearningPipelineReflection)); + return _MTL4_msg_MTL4__MachineLearningPipelineReflectionp_alloc((const void*)&OBJC_CLASS_$_MTL4MachineLearningPipelineReflection, nullptr); } -_MTL_INLINE NS::Array* MTL4::MachineLearningPipelineReflection::bindings() const +_MTL4_INLINE MTL4::MachineLearningPipelineReflection* MTL4::MachineLearningPipelineReflection::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bindings)); + return _MTL4_msg_MTL4__MachineLearningPipelineReflectionp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::MachineLearningPipelineReflection* MTL4::MachineLearningPipelineReflection::init() +_MTL4_INLINE NS::Array* MTL4::MachineLearningPipelineReflection::bindings() const { - return NS::Object::init(); + return _MTL4_msg_NS__Arrayp_bindings((const void*)this, nullptr); } -_MTL_INLINE MTL::Device* MTL4::MachineLearningPipelineState::device() const +_MTL4_INLINE NS::String* MTL4::MachineLearningPipelineState::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::MachineLearningPipelineState::intermediatesHeapSize() const +_MTL4_INLINE MTL::Device* MTL4::MachineLearningPipelineState::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(intermediatesHeapSize)); + return _MTL4_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::MachineLearningPipelineState::label() const +_MTL4_INLINE MTL4::MachineLearningPipelineReflection* MTL4::MachineLearningPipelineState::reflection() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL4_msg_MTL4__MachineLearningPipelineReflectionp_reflection((const void*)this, nullptr); } -_MTL_INLINE MTL4::MachineLearningPipelineReflection* MTL4::MachineLearningPipelineState::reflection() const +_MTL4_INLINE NS::UInteger MTL4::MachineLearningPipelineState::intermediatesHeapSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(reflection)); + return _MTL4_msg_NS__UInteger_intermediatesHeapSize((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4MeshRenderPipeline.hpp b/thirdparty/metal-cpp/Metal/MTL4MeshRenderPipeline.hpp index f66dffe2bc66..9f60d663a71e 100644 --- a/thirdparty/metal-cpp/Metal/MTL4MeshRenderPipeline.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4MeshRenderPipeline.hpp @@ -1,413 +1,355 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4MeshRenderPipeline.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4PipelineState.hpp" -#include "MTL4RenderPipeline.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" +#include "MTLStructs.hpp" + +namespace MTL4 { + class FunctionDescriptor; + class RenderPipelineColorAttachmentDescriptorArray; + class StaticLinkingDescriptor; + enum AlphaToCoverageState : NS::Integer; + enum AlphaToOneState : NS::Integer; + enum IndirectCommandBufferSupportState : NS::Integer; + enum LogicalToPhysicalColorAttachmentMappingState : NS::Integer; +} namespace MTL4 { -class FunctionDescriptor; -class MeshRenderPipelineDescriptor; -class RenderPipelineColorAttachmentDescriptorArray; -class StaticLinkingDescriptor; -class MeshRenderPipelineDescriptor : public NS::Copying +class MeshRenderPipelineDescriptor : public NS::Referencing { public: - static MeshRenderPipelineDescriptor* alloc(); - - AlphaToCoverageState alphaToCoverageState() const; - - AlphaToOneState alphaToOneState() const; - - LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState() const; - - RenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; - - FunctionDescriptor* fragmentFunctionDescriptor() const; - - StaticLinkingDescriptor* fragmentStaticLinkingDescriptor() const; - - MeshRenderPipelineDescriptor* init(); - - bool isRasterizationEnabled() const; - - NS::UInteger maxTotalThreadgroupsPerMeshGrid() const; - - NS::UInteger maxTotalThreadsPerMeshThreadgroup() const; - - NS::UInteger maxTotalThreadsPerObjectThreadgroup() const; - - NS::UInteger maxVertexAmplificationCount() const; - - FunctionDescriptor* meshFunctionDescriptor() const; - - StaticLinkingDescriptor* meshStaticLinkingDescriptor() const; - - bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth() const; - - FunctionDescriptor* objectFunctionDescriptor() const; - - StaticLinkingDescriptor* objectStaticLinkingDescriptor() const; - - bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth() const; - - NS::UInteger payloadMemoryLength() const; - - NS::UInteger rasterSampleCount() const; - - [[deprecated("please use isRasterizationEnabled instead")]] - bool rasterizationEnabled() const; - - MTL::Size requiredThreadsPerMeshThreadgroup() const; - - MTL::Size requiredThreadsPerObjectThreadgroup() const; - - void reset(); + static MeshRenderPipelineDescriptor* alloc(); + MeshRenderPipelineDescriptor* init() const; + + MTL4::AlphaToCoverageState alphaToCoverageState() const; + MTL4::AlphaToOneState alphaToOneState() const; + MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState() const; + MTL4::RenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; + MTL4::FunctionDescriptor* fragmentFunctionDescriptor() const; + MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor() const; + bool isRasterizationEnabled(); + NS::UInteger maxTotalThreadgroupsPerMeshGrid() const; + NS::UInteger maxTotalThreadsPerMeshThreadgroup() const; + NS::UInteger maxTotalThreadsPerObjectThreadgroup() const; + NS::UInteger maxVertexAmplificationCount() const; + MTL4::FunctionDescriptor* meshFunctionDescriptor() const; + MTL4::StaticLinkingDescriptor* meshStaticLinkingDescriptor() const; + bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth() const; + MTL4::FunctionDescriptor* objectFunctionDescriptor() const; + MTL4::StaticLinkingDescriptor* objectStaticLinkingDescriptor() const; + bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth() const; + NS::UInteger payloadMemoryLength() const; + NS::UInteger rasterSampleCount() const; + bool rasterizationEnabled() const; + MTL::Size requiredThreadsPerMeshThreadgroup() const; + MTL::Size requiredThreadsPerObjectThreadgroup() const; + void reset(); + void setAlphaToCoverageState(MTL4::AlphaToCoverageState alphaToCoverageState); + void setAlphaToOneState(MTL4::AlphaToOneState alphaToOneState); + void setColorAttachmentMappingState(MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState); + void setFragmentFunctionDescriptor(MTL4::FunctionDescriptor* fragmentFunctionDescriptor); + void setFragmentStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor); + void setMaxTotalThreadgroupsPerMeshGrid(NS::UInteger maxTotalThreadgroupsPerMeshGrid); + void setMaxTotalThreadsPerMeshThreadgroup(NS::UInteger maxTotalThreadsPerMeshThreadgroup); + void setMaxTotalThreadsPerObjectThreadgroup(NS::UInteger maxTotalThreadsPerObjectThreadgroup); + void setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount); + void setMeshFunctionDescriptor(MTL4::FunctionDescriptor* meshFunctionDescriptor); + void setMeshStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* meshStaticLinkingDescriptor); + void setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth); + void setObjectFunctionDescriptor(MTL4::FunctionDescriptor* objectFunctionDescriptor); + void setObjectStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* objectStaticLinkingDescriptor); + void setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth); + void setPayloadMemoryLength(NS::UInteger payloadMemoryLength); + void setRasterSampleCount(NS::UInteger rasterSampleCount); + void setRasterizationEnabled(bool rasterizationEnabled); + void setRequiredThreadsPerMeshThreadgroup(MTL::Size requiredThreadsPerMeshThreadgroup); + void setRequiredThreadsPerObjectThreadgroup(MTL::Size requiredThreadsPerObjectThreadgroup); + void setSupportFragmentBinaryLinking(bool supportFragmentBinaryLinking); + void setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers); + void setSupportMeshBinaryLinking(bool supportMeshBinaryLinking); + void setSupportObjectBinaryLinking(bool supportObjectBinaryLinking); + bool supportFragmentBinaryLinking() const; + MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers() const; + bool supportMeshBinaryLinking() const; + bool supportObjectBinaryLinking() const; - void setAlphaToCoverageState(MTL4::AlphaToCoverageState alphaToCoverageState); - - void setAlphaToOneState(MTL4::AlphaToOneState alphaToOneState); - - void setColorAttachmentMappingState(MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState); - - void setFragmentFunctionDescriptor(const MTL4::FunctionDescriptor* fragmentFunctionDescriptor); - - void setFragmentStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor); - - void setMaxTotalThreadgroupsPerMeshGrid(NS::UInteger maxTotalThreadgroupsPerMeshGrid); - - void setMaxTotalThreadsPerMeshThreadgroup(NS::UInteger maxTotalThreadsPerMeshThreadgroup); - - void setMaxTotalThreadsPerObjectThreadgroup(NS::UInteger maxTotalThreadsPerObjectThreadgroup); - - void setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount); - - void setMeshFunctionDescriptor(const MTL4::FunctionDescriptor* meshFunctionDescriptor); - - void setMeshStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* meshStaticLinkingDescriptor); - - void setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth); - - void setObjectFunctionDescriptor(const MTL4::FunctionDescriptor* objectFunctionDescriptor); - - void setObjectStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* objectStaticLinkingDescriptor); - - void setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth); - - void setPayloadMemoryLength(NS::UInteger payloadMemoryLength); - - void setRasterSampleCount(NS::UInteger rasterSampleCount); - - void setRasterizationEnabled(bool rasterizationEnabled); - - void setRequiredThreadsPerMeshThreadgroup(MTL::Size requiredThreadsPerMeshThreadgroup); - - void setRequiredThreadsPerObjectThreadgroup(MTL::Size requiredThreadsPerObjectThreadgroup); - - void setSupportFragmentBinaryLinking(bool supportFragmentBinaryLinking); - - void setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers); - - void setSupportMeshBinaryLinking(bool supportMeshBinaryLinking); - - void setSupportObjectBinaryLinking(bool supportObjectBinaryLinking); - - bool supportFragmentBinaryLinking() const; +}; - IndirectCommandBufferSupportState supportIndirectCommandBuffers() const; +} // namespace MTL4 - bool supportMeshBinaryLinking() const; +// --- Class symbols + inline implementations --- - bool supportObjectBinaryLinking() const; -}; +extern "C" void *OBJC_CLASS_$_MTL4MeshRenderPipelineDescriptor; -} -_MTL_INLINE MTL4::MeshRenderPipelineDescriptor* MTL4::MeshRenderPipelineDescriptor::alloc() +_MTL4_INLINE MTL4::MeshRenderPipelineDescriptor* MTL4::MeshRenderPipelineDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4MeshRenderPipelineDescriptor)); + return _MTL4_msg_MTL4__MeshRenderPipelineDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4MeshRenderPipelineDescriptor, nullptr); } -_MTL_INLINE MTL4::AlphaToCoverageState MTL4::MeshRenderPipelineDescriptor::alphaToCoverageState() const +_MTL4_INLINE MTL4::MeshRenderPipelineDescriptor* MTL4::MeshRenderPipelineDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(alphaToCoverageState)); + return _MTL4_msg_MTL4__MeshRenderPipelineDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::AlphaToOneState MTL4::MeshRenderPipelineDescriptor::alphaToOneState() const +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::MeshRenderPipelineDescriptor::objectFunctionDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(alphaToOneState)); + return _MTL4_msg_MTL4__FunctionDescriptorp_objectFunctionDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::LogicalToPhysicalColorAttachmentMappingState MTL4::MeshRenderPipelineDescriptor::colorAttachmentMappingState() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setObjectFunctionDescriptor(MTL4::FunctionDescriptor* objectFunctionDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(colorAttachmentMappingState)); + _MTL4_msg_v_setObjectFunctionDescriptor__MTL4__FunctionDescriptorp((const void*)this, nullptr, objectFunctionDescriptor); } -_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::MeshRenderPipelineDescriptor::colorAttachments() const +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::MeshRenderPipelineDescriptor::meshFunctionDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(colorAttachments)); + return _MTL4_msg_MTL4__FunctionDescriptorp_meshFunctionDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::MeshRenderPipelineDescriptor::fragmentFunctionDescriptor() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setMeshFunctionDescriptor(MTL4::FunctionDescriptor* meshFunctionDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentFunctionDescriptor)); + _MTL4_msg_v_setMeshFunctionDescriptor__MTL4__FunctionDescriptorp((const void*)this, nullptr, meshFunctionDescriptor); } -_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::MeshRenderPipelineDescriptor::fragmentStaticLinkingDescriptor() const +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::MeshRenderPipelineDescriptor::fragmentFunctionDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentStaticLinkingDescriptor)); + return _MTL4_msg_MTL4__FunctionDescriptorp_fragmentFunctionDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::MeshRenderPipelineDescriptor* MTL4::MeshRenderPipelineDescriptor::init() +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setFragmentFunctionDescriptor(MTL4::FunctionDescriptor* fragmentFunctionDescriptor) { - return NS::Object::init(); + _MTL4_msg_v_setFragmentFunctionDescriptor__MTL4__FunctionDescriptorp((const void*)this, nullptr, fragmentFunctionDescriptor); } -_MTL_INLINE bool MTL4::MeshRenderPipelineDescriptor::isRasterizationEnabled() const +_MTL4_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::maxTotalThreadsPerObjectThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isRasterizationEnabled)); + return _MTL4_msg_NS__UInteger_maxTotalThreadsPerObjectThreadgroup((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::maxTotalThreadgroupsPerMeshGrid() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setMaxTotalThreadsPerObjectThreadgroup(NS::UInteger maxTotalThreadsPerObjectThreadgroup) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadgroupsPerMeshGrid)); + _MTL4_msg_v_setMaxTotalThreadsPerObjectThreadgroup__NS__UInteger((const void*)this, nullptr, maxTotalThreadsPerObjectThreadgroup); } -_MTL_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::maxTotalThreadsPerMeshThreadgroup() const +_MTL4_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::maxTotalThreadsPerMeshThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerMeshThreadgroup)); + return _MTL4_msg_NS__UInteger_maxTotalThreadsPerMeshThreadgroup((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::maxTotalThreadsPerObjectThreadgroup() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setMaxTotalThreadsPerMeshThreadgroup(NS::UInteger maxTotalThreadsPerMeshThreadgroup) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerObjectThreadgroup)); + _MTL4_msg_v_setMaxTotalThreadsPerMeshThreadgroup__NS__UInteger((const void*)this, nullptr, maxTotalThreadsPerMeshThreadgroup); } -_MTL_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::maxVertexAmplificationCount() const +_MTL4_INLINE MTL::Size MTL4::MeshRenderPipelineDescriptor::requiredThreadsPerObjectThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxVertexAmplificationCount)); + return _MTL4_msg_MTL__Size_requiredThreadsPerObjectThreadgroup((const void*)this, nullptr); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::MeshRenderPipelineDescriptor::meshFunctionDescriptor() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setRequiredThreadsPerObjectThreadgroup(MTL::Size requiredThreadsPerObjectThreadgroup) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshFunctionDescriptor)); + _MTL4_msg_v_setRequiredThreadsPerObjectThreadgroup__MTL__Size((const void*)this, nullptr, requiredThreadsPerObjectThreadgroup); } -_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::MeshRenderPipelineDescriptor::meshStaticLinkingDescriptor() const +_MTL4_INLINE MTL::Size MTL4::MeshRenderPipelineDescriptor::requiredThreadsPerMeshThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshStaticLinkingDescriptor)); + return _MTL4_msg_MTL__Size_requiredThreadsPerMeshThreadgroup((const void*)this, nullptr); } -_MTL_INLINE bool MTL4::MeshRenderPipelineDescriptor::meshThreadgroupSizeIsMultipleOfThreadExecutionWidth() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setRequiredThreadsPerMeshThreadgroup(MTL::Size requiredThreadsPerMeshThreadgroup) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshThreadgroupSizeIsMultipleOfThreadExecutionWidth)); + _MTL4_msg_v_setRequiredThreadsPerMeshThreadgroup__MTL__Size((const void*)this, nullptr, requiredThreadsPerMeshThreadgroup); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::MeshRenderPipelineDescriptor::objectFunctionDescriptor() const +_MTL4_INLINE bool MTL4::MeshRenderPipelineDescriptor::objectThreadgroupSizeIsMultipleOfThreadExecutionWidth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectFunctionDescriptor)); + return _MTL4_msg_bool_objectThreadgroupSizeIsMultipleOfThreadExecutionWidth((const void*)this, nullptr); } -_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::MeshRenderPipelineDescriptor::objectStaticLinkingDescriptor() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectStaticLinkingDescriptor)); + _MTL4_msg_v_setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth__bool((const void*)this, nullptr, objectThreadgroupSizeIsMultipleOfThreadExecutionWidth); } -_MTL_INLINE bool MTL4::MeshRenderPipelineDescriptor::objectThreadgroupSizeIsMultipleOfThreadExecutionWidth() const +_MTL4_INLINE bool MTL4::MeshRenderPipelineDescriptor::meshThreadgroupSizeIsMultipleOfThreadExecutionWidth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectThreadgroupSizeIsMultipleOfThreadExecutionWidth)); + return _MTL4_msg_bool_meshThreadgroupSizeIsMultipleOfThreadExecutionWidth((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::payloadMemoryLength() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(payloadMemoryLength)); + _MTL4_msg_v_setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth__bool((const void*)this, nullptr, meshThreadgroupSizeIsMultipleOfThreadExecutionWidth); } -_MTL_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::rasterSampleCount() const +_MTL4_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::payloadMemoryLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rasterSampleCount)); + return _MTL4_msg_NS__UInteger_payloadMemoryLength((const void*)this, nullptr); } -_MTL_INLINE bool MTL4::MeshRenderPipelineDescriptor::rasterizationEnabled() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setPayloadMemoryLength(NS::UInteger payloadMemoryLength) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isRasterizationEnabled)); + _MTL4_msg_v_setPayloadMemoryLength__NS__UInteger((const void*)this, nullptr, payloadMemoryLength); } -_MTL_INLINE MTL::Size MTL4::MeshRenderPipelineDescriptor::requiredThreadsPerMeshThreadgroup() const +_MTL4_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::maxTotalThreadgroupsPerMeshGrid() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerMeshThreadgroup)); + return _MTL4_msg_NS__UInteger_maxTotalThreadgroupsPerMeshGrid((const void*)this, nullptr); } -_MTL_INLINE MTL::Size MTL4::MeshRenderPipelineDescriptor::requiredThreadsPerObjectThreadgroup() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setMaxTotalThreadgroupsPerMeshGrid(NS::UInteger maxTotalThreadgroupsPerMeshGrid) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerObjectThreadgroup)); + _MTL4_msg_v_setMaxTotalThreadgroupsPerMeshGrid__NS__UInteger((const void*)this, nullptr, maxTotalThreadgroupsPerMeshGrid); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::reset() +_MTL4_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::rasterSampleCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + return _MTL4_msg_NS__UInteger_rasterSampleCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setAlphaToCoverageState(MTL4::AlphaToCoverageState alphaToCoverageState) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAlphaToCoverageState_), alphaToCoverageState); + _MTL4_msg_v_setRasterSampleCount__NS__UInteger((const void*)this, nullptr, rasterSampleCount); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setAlphaToOneState(MTL4::AlphaToOneState alphaToOneState) +_MTL4_INLINE MTL4::AlphaToCoverageState MTL4::MeshRenderPipelineDescriptor::alphaToCoverageState() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAlphaToOneState_), alphaToOneState); + return _MTL4_msg_MTL4__AlphaToCoverageState_alphaToCoverageState((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setColorAttachmentMappingState(MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setAlphaToCoverageState(MTL4::AlphaToCoverageState alphaToCoverageState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setColorAttachmentMappingState_), colorAttachmentMappingState); + _MTL4_msg_v_setAlphaToCoverageState__MTL4__AlphaToCoverageState((const void*)this, nullptr, alphaToCoverageState); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setFragmentFunctionDescriptor(const MTL4::FunctionDescriptor* fragmentFunctionDescriptor) +_MTL4_INLINE MTL4::AlphaToOneState MTL4::MeshRenderPipelineDescriptor::alphaToOneState() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentFunctionDescriptor_), fragmentFunctionDescriptor); + return _MTL4_msg_MTL4__AlphaToOneState_alphaToOneState((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setFragmentStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setAlphaToOneState(MTL4::AlphaToOneState alphaToOneState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentStaticLinkingDescriptor_), fragmentStaticLinkingDescriptor); + _MTL4_msg_v_setAlphaToOneState__MTL4__AlphaToOneState((const void*)this, nullptr, alphaToOneState); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setMaxTotalThreadgroupsPerMeshGrid(NS::UInteger maxTotalThreadgroupsPerMeshGrid) +_MTL4_INLINE bool MTL4::MeshRenderPipelineDescriptor::rasterizationEnabled() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadgroupsPerMeshGrid_), maxTotalThreadgroupsPerMeshGrid); + return _MTL4_msg_bool_rasterizationEnabled((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setMaxTotalThreadsPerMeshThreadgroup(NS::UInteger maxTotalThreadsPerMeshThreadgroup) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setRasterizationEnabled(bool rasterizationEnabled) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadsPerMeshThreadgroup_), maxTotalThreadsPerMeshThreadgroup); + _MTL4_msg_v_setRasterizationEnabled__bool((const void*)this, nullptr, rasterizationEnabled); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setMaxTotalThreadsPerObjectThreadgroup(NS::UInteger maxTotalThreadsPerObjectThreadgroup) +_MTL4_INLINE NS::UInteger MTL4::MeshRenderPipelineDescriptor::maxVertexAmplificationCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadsPerObjectThreadgroup_), maxTotalThreadsPerObjectThreadgroup); + return _MTL4_msg_NS__UInteger_maxVertexAmplificationCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxVertexAmplificationCount_), maxVertexAmplificationCount); + _MTL4_msg_v_setMaxVertexAmplificationCount__NS__UInteger((const void*)this, nullptr, maxVertexAmplificationCount); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setMeshFunctionDescriptor(const MTL4::FunctionDescriptor* meshFunctionDescriptor) +_MTL4_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::MeshRenderPipelineDescriptor::colorAttachments() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshFunctionDescriptor_), meshFunctionDescriptor); + return _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorArrayp_colorAttachments((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setMeshStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* meshStaticLinkingDescriptor) +_MTL4_INLINE MTL4::StaticLinkingDescriptor* MTL4::MeshRenderPipelineDescriptor::objectStaticLinkingDescriptor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshStaticLinkingDescriptor_), meshStaticLinkingDescriptor); + return _MTL4_msg_MTL4__StaticLinkingDescriptorp_objectStaticLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setObjectStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* objectStaticLinkingDescriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth_), meshThreadgroupSizeIsMultipleOfThreadExecutionWidth); + _MTL4_msg_v_setObjectStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp((const void*)this, nullptr, objectStaticLinkingDescriptor); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setObjectFunctionDescriptor(const MTL4::FunctionDescriptor* objectFunctionDescriptor) +_MTL4_INLINE MTL4::StaticLinkingDescriptor* MTL4::MeshRenderPipelineDescriptor::meshStaticLinkingDescriptor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectFunctionDescriptor_), objectFunctionDescriptor); + return _MTL4_msg_MTL4__StaticLinkingDescriptorp_meshStaticLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setObjectStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* objectStaticLinkingDescriptor) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setMeshStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* meshStaticLinkingDescriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectStaticLinkingDescriptor_), objectStaticLinkingDescriptor); + _MTL4_msg_v_setMeshStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp((const void*)this, nullptr, meshStaticLinkingDescriptor); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth) +_MTL4_INLINE MTL4::StaticLinkingDescriptor* MTL4::MeshRenderPipelineDescriptor::fragmentStaticLinkingDescriptor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth_), objectThreadgroupSizeIsMultipleOfThreadExecutionWidth); + return _MTL4_msg_MTL4__StaticLinkingDescriptorp_fragmentStaticLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setPayloadMemoryLength(NS::UInteger payloadMemoryLength) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setFragmentStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPayloadMemoryLength_), payloadMemoryLength); + _MTL4_msg_v_setFragmentStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp((const void*)this, nullptr, fragmentStaticLinkingDescriptor); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) +_MTL4_INLINE bool MTL4::MeshRenderPipelineDescriptor::supportObjectBinaryLinking() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterSampleCount_), rasterSampleCount); + return _MTL4_msg_bool_supportObjectBinaryLinking((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setRasterizationEnabled(bool rasterizationEnabled) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setSupportObjectBinaryLinking(bool supportObjectBinaryLinking) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterizationEnabled_), rasterizationEnabled); + _MTL4_msg_v_setSupportObjectBinaryLinking__bool((const void*)this, nullptr, supportObjectBinaryLinking); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setRequiredThreadsPerMeshThreadgroup(MTL::Size requiredThreadsPerMeshThreadgroup) +_MTL4_INLINE bool MTL4::MeshRenderPipelineDescriptor::supportMeshBinaryLinking() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRequiredThreadsPerMeshThreadgroup_), requiredThreadsPerMeshThreadgroup); + return _MTL4_msg_bool_supportMeshBinaryLinking((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setRequiredThreadsPerObjectThreadgroup(MTL::Size requiredThreadsPerObjectThreadgroup) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setSupportMeshBinaryLinking(bool supportMeshBinaryLinking) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRequiredThreadsPerObjectThreadgroup_), requiredThreadsPerObjectThreadgroup); + _MTL4_msg_v_setSupportMeshBinaryLinking__bool((const void*)this, nullptr, supportMeshBinaryLinking); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setSupportFragmentBinaryLinking(bool supportFragmentBinaryLinking) +_MTL4_INLINE bool MTL4::MeshRenderPipelineDescriptor::supportFragmentBinaryLinking() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportFragmentBinaryLinking_), supportFragmentBinaryLinking); + return _MTL4_msg_bool_supportFragmentBinaryLinking((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setSupportFragmentBinaryLinking(bool supportFragmentBinaryLinking) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportIndirectCommandBuffers_), supportIndirectCommandBuffers); + _MTL4_msg_v_setSupportFragmentBinaryLinking__bool((const void*)this, nullptr, supportFragmentBinaryLinking); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setSupportMeshBinaryLinking(bool supportMeshBinaryLinking) +_MTL4_INLINE MTL4::LogicalToPhysicalColorAttachmentMappingState MTL4::MeshRenderPipelineDescriptor::colorAttachmentMappingState() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportMeshBinaryLinking_), supportMeshBinaryLinking); + return _MTL4_msg_MTL4__LogicalToPhysicalColorAttachmentMappingState_colorAttachmentMappingState((const void*)this, nullptr); } -_MTL_INLINE void MTL4::MeshRenderPipelineDescriptor::setSupportObjectBinaryLinking(bool supportObjectBinaryLinking) +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setColorAttachmentMappingState(MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportObjectBinaryLinking_), supportObjectBinaryLinking); + _MTL4_msg_v_setColorAttachmentMappingState__MTL4__LogicalToPhysicalColorAttachmentMappingState((const void*)this, nullptr, colorAttachmentMappingState); } -_MTL_INLINE bool MTL4::MeshRenderPipelineDescriptor::supportFragmentBinaryLinking() const +_MTL4_INLINE MTL4::IndirectCommandBufferSupportState MTL4::MeshRenderPipelineDescriptor::supportIndirectCommandBuffers() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportFragmentBinaryLinking)); + return _MTL4_msg_MTL4__IndirectCommandBufferSupportState_supportIndirectCommandBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL4::IndirectCommandBufferSupportState MTL4::MeshRenderPipelineDescriptor::supportIndirectCommandBuffers() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers)); + _MTL4_msg_v_setSupportIndirectCommandBuffers__MTL4__IndirectCommandBufferSupportState((const void*)this, nullptr, supportIndirectCommandBuffers); } -_MTL_INLINE bool MTL4::MeshRenderPipelineDescriptor::supportMeshBinaryLinking() const +_MTL4_INLINE void MTL4::MeshRenderPipelineDescriptor::reset() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportMeshBinaryLinking)); + _MTL4_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE bool MTL4::MeshRenderPipelineDescriptor::supportObjectBinaryLinking() const +_MTL4_INLINE bool MTL4::MeshRenderPipelineDescriptor::isRasterizationEnabled() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportObjectBinaryLinking)); + return _MTL4_msg_bool_isRasterizationEnabled((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4PipelineDataSetSerializer.hpp b/thirdparty/metal-cpp/Metal/MTL4PipelineDataSetSerializer.hpp index 9dbd6103a411..e630e94690b1 100644 --- a/thirdparty/metal-cpp/Metal/MTL4PipelineDataSetSerializer.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4PipelineDataSetSerializer.hpp @@ -1,85 +1,83 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4PipelineDataSetSerializer.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace NS { + class Data; + class Error; + class URL; +} namespace MTL4 { -class PipelineDataSetSerializerDescriptor; -_MTL_OPTIONS(NS::UInteger, PipelineDataSetSerializerConfiguration) { - PipelineDataSetSerializerConfigurationCaptureDescriptors = 1, - PipelineDataSetSerializerConfigurationCaptureBinaries = 1 << 1, +_MTL4_OPTIONS(NS::UInteger, PipelineDataSetSerializerConfiguration) { + PipelineDataSetSerializerConfigurationCaptureDescriptors = (1 << 0), + PipelineDataSetSerializerConfigurationCaptureBinaries = (1 << 1), }; + +class PipelineDataSetSerializerDescriptor; +class PipelineDataSetSerializer; + class PipelineDataSetSerializerDescriptor : public NS::Copying { public: static PipelineDataSetSerializerDescriptor* alloc(); + PipelineDataSetSerializerDescriptor* init() const; - PipelineDataSetSerializerConfiguration configuration() const; - - PipelineDataSetSerializerDescriptor* init(); + MTL4::PipelineDataSetSerializerConfiguration configuration() const; + void setConfiguration(MTL4::PipelineDataSetSerializerConfiguration configuration); - void setConfiguration(MTL4::PipelineDataSetSerializerConfiguration configuration); }; + class PipelineDataSetSerializer : public NS::Referencing { public: - bool serializeAsArchiveAndFlushToURL(const NS::URL* url, NS::Error** error); - + bool serializeAsArchiveAndFlushToURL(NS::URL* url, NS::Error** error); NS::Data* serializeAsPipelinesScript(NS::Error** error); + }; -} -_MTL_INLINE MTL4::PipelineDataSetSerializerDescriptor* MTL4::PipelineDataSetSerializerDescriptor::alloc() +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4PipelineDataSetSerializerDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4PipelineDataSetSerializer; + +_MTL4_INLINE MTL4::PipelineDataSetSerializerDescriptor* MTL4::PipelineDataSetSerializerDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4PipelineDataSetSerializerDescriptor)); + return _MTL4_msg_MTL4__PipelineDataSetSerializerDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4PipelineDataSetSerializerDescriptor, nullptr); } -_MTL_INLINE MTL4::PipelineDataSetSerializerConfiguration MTL4::PipelineDataSetSerializerDescriptor::configuration() const +_MTL4_INLINE MTL4::PipelineDataSetSerializerDescriptor* MTL4::PipelineDataSetSerializerDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(configuration)); + return _MTL4_msg_MTL4__PipelineDataSetSerializerDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::PipelineDataSetSerializerDescriptor* MTL4::PipelineDataSetSerializerDescriptor::init() +_MTL4_INLINE MTL4::PipelineDataSetSerializerConfiguration MTL4::PipelineDataSetSerializerDescriptor::configuration() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__PipelineDataSetSerializerConfiguration_configuration((const void*)this, nullptr); } -_MTL_INLINE void MTL4::PipelineDataSetSerializerDescriptor::setConfiguration(MTL4::PipelineDataSetSerializerConfiguration configuration) +_MTL4_INLINE void MTL4::PipelineDataSetSerializerDescriptor::setConfiguration(MTL4::PipelineDataSetSerializerConfiguration configuration) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setConfiguration_), configuration); + _MTL4_msg_v_setConfiguration__MTL4__PipelineDataSetSerializerConfiguration((const void*)this, nullptr, configuration); } -_MTL_INLINE bool MTL4::PipelineDataSetSerializer::serializeAsArchiveAndFlushToURL(const NS::URL* url, NS::Error** error) +_MTL4_INLINE bool MTL4::PipelineDataSetSerializer::serializeAsArchiveAndFlushToURL(NS::URL* url, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(serializeAsArchiveAndFlushToURL_error_), url, error); + return _MTL4_msg_bool_serializeAsArchiveAndFlushToURL_error__NS__URLp_NS__Errorpp((const void*)this, nullptr, url, error); } -_MTL_INLINE NS::Data* MTL4::PipelineDataSetSerializer::serializeAsPipelinesScript(NS::Error** error) +_MTL4_INLINE NS::Data* MTL4::PipelineDataSetSerializer::serializeAsPipelinesScript(NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(serializeAsPipelinesScriptWithError_), error); + return _MTL4_msg_NS__Datap_serializeAsPipelinesScriptWithError__NS__Errorpp((const void*)this, nullptr, error); } diff --git a/thirdparty/metal-cpp/Metal/MTL4PipelineState.hpp b/thirdparty/metal-cpp/Metal/MTL4PipelineState.hpp index cecefa8a14e8..7d411b9db70e 100644 --- a/thirdparty/metal-cpp/Metal/MTL4PipelineState.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4PipelineState.hpp @@ -1,150 +1,143 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4PipelineState.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPipeline.hpp" -#include "MTLPrivate.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + enum ShaderValidation : NS::Integer; +} +namespace NS { + class String; +} namespace MTL4 { -class PipelineDescriptor; -class PipelineOptions; -_MTL_ENUM(NS::Integer, AlphaToOneState) { + +_MTL4_OPTIONS(NS::UInteger, ShaderReflection) { + ShaderReflectionNone = 0, + ShaderReflectionBindingInfo = 1 << 0, + ShaderReflectionBufferTypeInfo = 1 << 1, +}; + +_MTL4_ENUM(NS::Integer, AlphaToOneState) { AlphaToOneStateDisabled = 0, AlphaToOneStateEnabled = 1, }; -_MTL_ENUM(NS::Integer, AlphaToCoverageState) { +_MTL4_ENUM(NS::Integer, AlphaToCoverageState) { AlphaToCoverageStateDisabled = 0, AlphaToCoverageStateEnabled = 1, }; -_MTL_ENUM(NS::Integer, BlendState) { +_MTL4_ENUM(NS::Integer, BlendState) { BlendStateDisabled = 0, BlendStateEnabled = 1, BlendStateUnspecialized = 2, }; -_MTL_ENUM(NS::Integer, IndirectCommandBufferSupportState) { +_MTL4_ENUM(NS::Integer, IndirectCommandBufferSupportState) { IndirectCommandBufferSupportStateDisabled = 0, IndirectCommandBufferSupportStateEnabled = 1, }; -_MTL_OPTIONS(NS::UInteger, ShaderReflection) { - ShaderReflectionNone = 0, - ShaderReflectionBindingInfo = 1, - ShaderReflectionBufferTypeInfo = 1 << 1, -}; + +class PipelineOptions; +class PipelineDescriptor; class PipelineOptions : public NS::Copying { public: static PipelineOptions* alloc(); + PipelineOptions* init() const; - PipelineOptions* init(); - - void setShaderReflection(MTL4::ShaderReflection shaderReflection); + void setShaderReflection(MTL4::ShaderReflection shaderReflection); + void setShaderValidation(MTL::ShaderValidation shaderValidation); + MTL4::ShaderReflection shaderReflection() const; + MTL::ShaderValidation shaderValidation() const; - void setShaderValidation(MTL::ShaderValidation shaderValidation); - - ShaderReflection shaderReflection() const; - - MTL::ShaderValidation shaderValidation() const; }; + class PipelineDescriptor : public NS::Copying { public: static PipelineDescriptor* alloc(); + PipelineDescriptor* init() const; - PipelineDescriptor* init(); + NS::String* label() const; + MTL4::PipelineOptions* options() const; + void setLabel(NS::String* label); + void setOptions(MTL4::PipelineOptions* options); - NS::String* label() const; +}; - PipelineOptions* options() const; +} // namespace MTL4 - void setLabel(const NS::String* label); +// --- Class symbols + inline implementations --- - void setOptions(const MTL4::PipelineOptions* options); -}; +extern "C" void *OBJC_CLASS_$_MTL4PipelineOptions; +extern "C" void *OBJC_CLASS_$_MTL4PipelineDescriptor; -} -_MTL_INLINE MTL4::PipelineOptions* MTL4::PipelineOptions::alloc() +_MTL4_INLINE MTL4::PipelineOptions* MTL4::PipelineOptions::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4PipelineOptions)); + return _MTL4_msg_MTL4__PipelineOptionsp_alloc((const void*)&OBJC_CLASS_$_MTL4PipelineOptions, nullptr); } -_MTL_INLINE MTL4::PipelineOptions* MTL4::PipelineOptions::init() +_MTL4_INLINE MTL4::PipelineOptions* MTL4::PipelineOptions::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__PipelineOptionsp_init((const void*)this, nullptr); } -_MTL_INLINE void MTL4::PipelineOptions::setShaderReflection(MTL4::ShaderReflection shaderReflection) +_MTL4_INLINE MTL::ShaderValidation MTL4::PipelineOptions::shaderValidation() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setShaderReflection_), shaderReflection); + return _MTL4_msg_MTL__ShaderValidation_shaderValidation((const void*)this, nullptr); } -_MTL_INLINE void MTL4::PipelineOptions::setShaderValidation(MTL::ShaderValidation shaderValidation) +_MTL4_INLINE void MTL4::PipelineOptions::setShaderValidation(MTL::ShaderValidation shaderValidation) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setShaderValidation_), shaderValidation); + _MTL4_msg_v_setShaderValidation__MTL__ShaderValidation((const void*)this, nullptr, shaderValidation); } -_MTL_INLINE MTL4::ShaderReflection MTL4::PipelineOptions::shaderReflection() const +_MTL4_INLINE MTL4::ShaderReflection MTL4::PipelineOptions::shaderReflection() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(shaderReflection)); + return _MTL4_msg_MTL4__ShaderReflection_shaderReflection((const void*)this, nullptr); } -_MTL_INLINE MTL::ShaderValidation MTL4::PipelineOptions::shaderValidation() const +_MTL4_INLINE void MTL4::PipelineOptions::setShaderReflection(MTL4::ShaderReflection shaderReflection) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(shaderValidation)); + _MTL4_msg_v_setShaderReflection__MTL4__ShaderReflection((const void*)this, nullptr, shaderReflection); } -_MTL_INLINE MTL4::PipelineDescriptor* MTL4::PipelineDescriptor::alloc() +_MTL4_INLINE MTL4::PipelineDescriptor* MTL4::PipelineDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4PipelineDescriptor)); + return _MTL4_msg_MTL4__PipelineDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4PipelineDescriptor, nullptr); } -_MTL_INLINE MTL4::PipelineDescriptor* MTL4::PipelineDescriptor::init() +_MTL4_INLINE MTL4::PipelineDescriptor* MTL4::PipelineDescriptor::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__PipelineDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::PipelineDescriptor::label() const +_MTL4_INLINE NS::String* MTL4::PipelineDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL4_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL4::PipelineOptions* MTL4::PipelineDescriptor::options() const +_MTL4_INLINE void MTL4::PipelineDescriptor::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(options)); + _MTL4_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL4::PipelineDescriptor::setLabel(const NS::String* label) +_MTL4_INLINE MTL4::PipelineOptions* MTL4::PipelineDescriptor::options() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL4_msg_MTL4__PipelineOptionsp_options((const void*)this, nullptr); } -_MTL_INLINE void MTL4::PipelineDescriptor::setOptions(const MTL4::PipelineOptions* options) +_MTL4_INLINE void MTL4::PipelineDescriptor::setOptions(MTL4::PipelineOptions* options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOptions_), options); + _MTL4_msg_v_setOptions__MTL4__PipelineOptionsp((const void*)this, nullptr, options); } diff --git a/thirdparty/metal-cpp/Metal/MTL4RenderCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTL4RenderCommandEncoder.hpp index 0dd01f4d397d..7296ef589903 100644 --- a/thirdparty/metal-cpp/Metal/MTL4RenderCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4RenderCommandEncoder.hpp @@ -1,340 +1,300 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4RenderCommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4CommandEncoder.hpp" -#include "MTL4Counters.hpp" -#include "MTLArgument.hpp" -#include "MTLDefines.hpp" -#include "MTLGPUAddress.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLRenderCommandEncoder.hpp" -#include "MTLRenderPass.hpp" -#include "MTLTypes.hpp" -#include - -namespace MTL4 -{ -class ArgumentTable; -class CounterHeap; +#include "MTLStructs.hpp" + +namespace MTL { + class DepthStencilState; + class IndirectCommandBuffer; + class LogicalToPhysicalColorAttachmentMap; + class RenderPipelineState; + enum CullMode : NS::UInteger; + enum DepthClipMode : NS::UInteger; + enum IndexType : NS::UInteger; + enum PrimitiveType : NS::UInteger; + using RenderStages = NS::UInteger; + enum StoreAction : NS::UInteger; + enum TriangleFillMode : NS::UInteger; + enum VisibilityResultMode : NS::UInteger; + enum Winding : NS::UInteger; +} +namespace MTL4 { + class ArgumentTable; + class CounterHeap; + enum TimestampGranularity : NS::Integer; } -namespace MTL -{ -class DepthStencilState; -class IndirectCommandBuffer; -class LogicalToPhysicalColorAttachmentMap; -class RenderPipelineState; -struct ScissorRect; -struct VertexAmplificationViewMapping; -struct Viewport; - -} namespace MTL4 { -_MTL_OPTIONS(NS::UInteger, RenderEncoderOptions) { + +_MTL4_OPTIONS(NS::UInteger, RenderEncoderOptions) { RenderEncoderOptionNone = 0, - RenderEncoderOptionSuspending = 1, - RenderEncoderOptionResuming = 1 << 1, + RenderEncoderOptionSuspending = (1 << 0), + RenderEncoderOptionResuming = (1 << 1), }; -class RenderCommandEncoder : public NS::Referencing + +class RenderCommandEncoder : public NS::Referencing { public: void dispatchThreadsPerTile(MTL::Size threadsPerTile); - void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength); void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength, NS::UInteger instanceCount); void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance); void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength, MTL::GPUAddress indirectBuffer); - void drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); void drawMeshThreadgroups(MTL::GPUAddress indirectBuffer, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); - void drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); - void drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount); void drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount); void drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount, NS::UInteger baseInstance); void drawPrimitives(MTL::PrimitiveType primitiveType, MTL::GPUAddress indirectBuffer); - - void executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange); - void executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, MTL::GPUAddress indirectRangeBuffer); - - void setArgumentTable(const MTL4::ArgumentTable* argumentTable, MTL::RenderStages stages); - + void executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange); + void executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, MTL::GPUAddress indirectRangeBuffer); + void setArgumentTable(MTL4::ArgumentTable* argumentTable, MTL::RenderStages stages); void setBlendColor(float red, float green, float blue, float alpha); - - void setColorAttachmentMap(const MTL::LogicalToPhysicalColorAttachmentMap* mapping); - + void setColorAttachmentMap(MTL::LogicalToPhysicalColorAttachmentMap* mapping); void setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex); - void setCullMode(MTL::CullMode cullMode); - void setDepthBias(float depthBias, float slopeScale, float clamp); - void setDepthClipMode(MTL::DepthClipMode depthClipMode); - - void setDepthStencilState(const MTL::DepthStencilState* depthStencilState); - + void setDepthStencilState(MTL::DepthStencilState* depthStencilState); void setDepthStoreAction(MTL::StoreAction storeAction); - - void setDepthTestBounds(float minBound, float maxBound); - + void setDepthTestMinBound(float minBound, float maxBound); void setFrontFacingWinding(MTL::Winding frontFacingWinding); - void setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index); - - void setRenderPipelineState(const MTL::RenderPipelineState* pipelineState); - + void setRenderPipelineState(MTL::RenderPipelineState* pipelineState); void setScissorRect(MTL::ScissorRect rect); - void setScissorRects(const MTL::ScissorRect* scissorRects, NS::UInteger count); - + void setScissorRects(const MTL::ScissorRect * scissorRects, NS::UInteger count); void setStencilReferenceValue(uint32_t referenceValue); void setStencilReferenceValues(uint32_t frontReferenceValue, uint32_t backReferenceValue); - void setStencilStoreAction(MTL::StoreAction storeAction); - void setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger offset, NS::UInteger index); - void setTriangleFillMode(MTL::TriangleFillMode fillMode); - - void setVertexAmplificationCount(NS::UInteger count, const MTL::VertexAmplificationViewMapping* viewMappings); - + void setVertexAmplificationCount(NS::UInteger count, const MTL::VertexAmplificationViewMapping * viewMappings); void setViewport(MTL::Viewport viewport); - void setViewports(const MTL::Viewport* viewports, NS::UInteger count); - + void setViewports(const MTL::Viewport * viewports, NS::UInteger count); void setVisibilityResultMode(MTL::VisibilityResultMode mode, NS::UInteger offset); - NS::UInteger tileHeight() const; - NS::UInteger tileWidth() const; + void writeTimestamp(MTL4::TimestampGranularity granularity, MTL::RenderStages stage, MTL4::CounterHeap* counterHeap, NS::UInteger index); - void writeTimestamp(MTL4::TimestampGranularity granularity, MTL::RenderStages stage, const MTL4::CounterHeap* counterHeap, NS::UInteger index); }; -} -_MTL_INLINE void MTL4::RenderCommandEncoder::dispatchThreadsPerTile(MTL::Size threadsPerTile) +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4RenderCommandEncoder; + +_MTL4_INLINE NS::UInteger MTL4::RenderCommandEncoder::tileWidth() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchThreadsPerTile_), threadsPerTile); + return _MTL4_msg_NS__UInteger_tileWidth((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength) +_MTL4_INLINE NS::UInteger MTL4::RenderCommandEncoder::tileHeight() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength_), primitiveType, indexCount, indexType, indexBuffer, indexBufferLength); + return _MTL4_msg_NS__UInteger_tileHeight((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength, NS::UInteger instanceCount) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setColorAttachmentMap(MTL::LogicalToPhysicalColorAttachmentMap* mapping) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength_instanceCount_), primitiveType, indexCount, indexType, indexBuffer, indexBufferLength, instanceCount); + _MTL4_msg_v_setColorAttachmentMap__MTL__LogicalToPhysicalColorAttachmentMapp((const void*)this, nullptr, mapping); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setRenderPipelineState(MTL::RenderPipelineState* pipelineState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength_instanceCount_baseVertex_baseInstance_), primitiveType, indexCount, indexType, indexBuffer, indexBufferLength, instanceCount, baseVertex, baseInstance); + _MTL4_msg_v_setRenderPipelineState__MTL__RenderPipelineStatep((const void*)this, nullptr, pipelineState); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength, MTL::GPUAddress indirectBuffer) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setViewport(MTL::Viewport viewport) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexType_indexBuffer_indexBufferLength_indirectBuffer_), primitiveType, indexType, indexBuffer, indexBufferLength, indirectBuffer); + _MTL4_msg_v_setViewport__MTL__Viewport((const void*)this, nullptr, viewport); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setViewports(const MTL::Viewport * viewports, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), threadgroupsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); + _MTL4_msg_v_setViewports_count__constMTL__Viewportp_NS__UInteger((const void*)this, nullptr, viewports, count); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawMeshThreadgroups(MTL::GPUAddress indirectBuffer, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setVertexAmplificationCount(NS::UInteger count, const MTL::VertexAmplificationViewMapping * viewMappings) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreadgroupsWithIndirectBuffer_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), indirectBuffer, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); + _MTL4_msg_v_setVertexAmplificationCount_viewMappings__NS__UInteger_constMTL__VertexAmplificationViewMappingp((const void*)this, nullptr, count, viewMappings); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setCullMode(MTL::CullMode cullMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), threadsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); + _MTL4_msg_v_setCullMode__MTL__CullMode((const void*)this, nullptr, cullMode); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setDepthClipMode(MTL::DepthClipMode depthClipMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPrimitives_vertexStart_vertexCount_), primitiveType, vertexStart, vertexCount); + _MTL4_msg_v_setDepthClipMode__MTL__DepthClipMode((const void*)this, nullptr, depthClipMode); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setDepthBias(float depthBias, float slopeScale, float clamp) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPrimitives_vertexStart_vertexCount_instanceCount_), primitiveType, vertexStart, vertexCount, instanceCount); + _MTL4_msg_v_setDepthBias_slopeScale_clamp__float_float_float((const void*)this, nullptr, depthBias, slopeScale, clamp); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount, NS::UInteger baseInstance) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setDepthTestMinBound(float minBound, float maxBound) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance_), primitiveType, vertexStart, vertexCount, instanceCount, baseInstance); + _MTL4_msg_v_setDepthTestMinBound_maxBound__float_float((const void*)this, nullptr, minBound, maxBound); } -_MTL_INLINE void MTL4::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, MTL::GPUAddress indirectBuffer) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setScissorRect(MTL::ScissorRect rect) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPrimitives_indirectBuffer_), primitiveType, indirectBuffer); + _MTL4_msg_v_setScissorRect__MTL__ScissorRect((const void*)this, nullptr, rect); } -_MTL_INLINE void MTL4::RenderCommandEncoder::executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setScissorRects(const MTL::ScissorRect * scissorRects, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(executeCommandsInBuffer_withRange_), indirectCommandBuffer, executionRange); + _MTL4_msg_v_setScissorRects_count__constMTL__ScissorRectp_NS__UInteger((const void*)this, nullptr, scissorRects, count); } -_MTL_INLINE void MTL4::RenderCommandEncoder::executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, MTL::GPUAddress indirectRangeBuffer) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setTriangleFillMode(MTL::TriangleFillMode fillMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(executeCommandsInBuffer_indirectBuffer_), indirectCommandBuffer, indirectRangeBuffer); + _MTL4_msg_v_setTriangleFillMode__MTL__TriangleFillMode((const void*)this, nullptr, fillMode); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setArgumentTable(const MTL4::ArgumentTable* argumentTable, MTL::RenderStages stages) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setBlendColor(float red, float green, float blue, float alpha) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setArgumentTable_atStages_), argumentTable, stages); + _MTL4_msg_v_setBlendColorRed_green_blue_alpha__float_float_float_float((const void*)this, nullptr, red, green, blue, alpha); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setBlendColor(float red, float green, float blue, float alpha) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setDepthStencilState(MTL::DepthStencilState* depthStencilState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBlendColorRed_green_blue_alpha_), red, green, blue, alpha); + _MTL4_msg_v_setDepthStencilState__MTL__DepthStencilStatep((const void*)this, nullptr, depthStencilState); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setColorAttachmentMap(const MTL::LogicalToPhysicalColorAttachmentMap* mapping) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setStencilReferenceValue(uint32_t referenceValue) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setColorAttachmentMap_), mapping); + _MTL4_msg_v_setStencilReferenceValue__uint32_t((const void*)this, nullptr, referenceValue); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setStencilReferenceValues(uint32_t frontReferenceValue, uint32_t backReferenceValue) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setColorStoreAction_atIndex_), storeAction, colorAttachmentIndex); + _MTL4_msg_v_setStencilFrontReferenceValue_backReferenceValue__uint32_t_uint32_t((const void*)this, nullptr, frontReferenceValue, backReferenceValue); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setCullMode(MTL::CullMode cullMode) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setVisibilityResultMode(MTL::VisibilityResultMode mode, NS::UInteger offset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCullMode_), cullMode); + _MTL4_msg_v_setVisibilityResultMode_offset__MTL__VisibilityResultMode_NS__UInteger((const void*)this, nullptr, mode, offset); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setDepthBias(float depthBias, float slopeScale, float clamp) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthBias_slopeScale_clamp_), depthBias, slopeScale, clamp); + _MTL4_msg_v_setColorStoreAction_atIndex__MTL__StoreAction_NS__UInteger((const void*)this, nullptr, storeAction, colorAttachmentIndex); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setDepthClipMode(MTL::DepthClipMode depthClipMode) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setDepthStoreAction(MTL::StoreAction storeAction) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthClipMode_), depthClipMode); + _MTL4_msg_v_setDepthStoreAction__MTL__StoreAction((const void*)this, nullptr, storeAction); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setDepthStencilState(const MTL::DepthStencilState* depthStencilState) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setStencilStoreAction(MTL::StoreAction storeAction) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStencilState_), depthStencilState); + _MTL4_msg_v_setStencilStoreAction__MTL__StoreAction((const void*)this, nullptr, storeAction); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setDepthStoreAction(MTL::StoreAction storeAction) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStoreAction_), storeAction); + _MTL4_msg_v_drawPrimitives_vertexStart_vertexCount__MTL__PrimitiveType_NS__UInteger_NS__UInteger((const void*)this, nullptr, primitiveType, vertexStart, vertexCount); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setDepthTestBounds(float minBound, float maxBound) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthTestMinBound_maxBound_), minBound, maxBound); + _MTL4_msg_v_drawPrimitives_vertexStart_vertexCount_instanceCount__MTL__PrimitiveType_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, primitiveType, vertexStart, vertexCount, instanceCount); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setFrontFacingWinding(MTL::Winding frontFacingWinding) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount, NS::UInteger baseInstance) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFrontFacingWinding_), frontFacingWinding); + _MTL4_msg_v_drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance__MTL__PrimitiveType_NS__UInteger_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, primitiveType, vertexStart, vertexCount, instanceCount, baseInstance); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectThreadgroupMemoryLength_atIndex_), length, index); + _MTL4_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__GPUAddress_NS__UInteger((const void*)this, nullptr, primitiveType, indexCount, indexType, indexBuffer, indexBufferLength); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setRenderPipelineState(const MTL::RenderPipelineState* pipelineState) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength, NS::UInteger instanceCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderPipelineState_), pipelineState); + _MTL4_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength_instanceCount__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__GPUAddress_NS__UInteger_NS__UInteger((const void*)this, nullptr, primitiveType, indexCount, indexType, indexBuffer, indexBufferLength, instanceCount); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setScissorRect(MTL::ScissorRect rect) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setScissorRect_), rect); + _MTL4_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength_instanceCount_baseVertex_baseInstance__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__GPUAddress_NS__UInteger_NS__UInteger_NS__Integer_NS__UInteger((const void*)this, nullptr, primitiveType, indexCount, indexType, indexBuffer, indexBufferLength, instanceCount, baseVertex, baseInstance); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setScissorRects(const MTL::ScissorRect* scissorRects, NS::UInteger count) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, MTL::GPUAddress indirectBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setScissorRects_count_), scissorRects, count); + _MTL4_msg_v_drawPrimitives_indirectBuffer__MTL__PrimitiveType_MTL__GPUAddress((const void*)this, nullptr, primitiveType, indirectBuffer); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setStencilReferenceValue(uint32_t referenceValue) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, MTL::IndexType indexType, MTL::GPUAddress indexBuffer, NS::UInteger indexBufferLength, MTL::GPUAddress indirectBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilReferenceValue_), referenceValue); + _MTL4_msg_v_drawIndexedPrimitives_indexType_indexBuffer_indexBufferLength_indirectBuffer__MTL__PrimitiveType_MTL__IndexType_MTL__GPUAddress_NS__UInteger_MTL__GPUAddress((const void*)this, nullptr, primitiveType, indexType, indexBuffer, indexBufferLength, indirectBuffer); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setStencilReferenceValues(uint32_t frontReferenceValue, uint32_t backReferenceValue) +_MTL4_INLINE void MTL4::RenderCommandEncoder::executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilFrontReferenceValue_backReferenceValue_), frontReferenceValue, backReferenceValue); + _MTL4_msg_v_executeCommandsInBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range((const void*)this, nullptr, indirectCommandBuffer, executionRange); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setStencilStoreAction(MTL::StoreAction storeAction) +_MTL4_INLINE void MTL4::RenderCommandEncoder::executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, MTL::GPUAddress indirectRangeBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilStoreAction_), storeAction); + _MTL4_msg_v_executeCommandsInBuffer_indirectBuffer__MTL__IndirectCommandBufferp_MTL__GPUAddress((const void*)this, nullptr, indirectCommandBuffer, indirectRangeBuffer); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger offset, NS::UInteger index) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadgroupMemoryLength_offset_atIndex_), length, offset, index); + _MTL4_msg_v_setObjectThreadgroupMemoryLength_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, length, index); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setTriangleFillMode(MTL::TriangleFillMode fillMode) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTriangleFillMode_), fillMode); + _MTL4_msg_v_drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Size_MTL__Size_MTL__Size((const void*)this, nullptr, threadgroupsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setVertexAmplificationCount(NS::UInteger count, const MTL::VertexAmplificationViewMapping* viewMappings) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexAmplificationCount_viewMappings_), count, viewMappings); + _MTL4_msg_v_drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Size_MTL__Size_MTL__Size((const void*)this, nullptr, threadsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setViewport(MTL::Viewport viewport) +_MTL4_INLINE void MTL4::RenderCommandEncoder::drawMeshThreadgroups(MTL::GPUAddress indirectBuffer, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setViewport_), viewport); + _MTL4_msg_v_drawMeshThreadgroupsWithIndirectBuffer_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__GPUAddress_MTL__Size_MTL__Size((const void*)this, nullptr, indirectBuffer, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setViewports(const MTL::Viewport* viewports, NS::UInteger count) +_MTL4_INLINE void MTL4::RenderCommandEncoder::dispatchThreadsPerTile(MTL::Size threadsPerTile) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setViewports_count_), viewports, count); + _MTL4_msg_v_dispatchThreadsPerTile__MTL__Size((const void*)this, nullptr, threadsPerTile); } -_MTL_INLINE void MTL4::RenderCommandEncoder::setVisibilityResultMode(MTL::VisibilityResultMode mode, NS::UInteger offset) +_MTL4_INLINE void MTL4::RenderCommandEncoder::setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibilityResultMode_offset_), mode, offset); + _MTL4_msg_v_setThreadgroupMemoryLength_offset_atIndex__NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, length, offset, index); } -_MTL_INLINE NS::UInteger MTL4::RenderCommandEncoder::tileHeight() const +_MTL4_INLINE void MTL4::RenderCommandEncoder::setArgumentTable(MTL4::ArgumentTable* argumentTable, MTL::RenderStages stages) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileHeight)); + _MTL4_msg_v_setArgumentTable_atStages__MTL4__ArgumentTablep_MTL__RenderStages((const void*)this, nullptr, argumentTable, stages); } -_MTL_INLINE NS::UInteger MTL4::RenderCommandEncoder::tileWidth() const +_MTL4_INLINE void MTL4::RenderCommandEncoder::setFrontFacingWinding(MTL::Winding frontFacingWinding) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileWidth)); + _MTL4_msg_v_setFrontFacingWinding__MTL__Winding((const void*)this, nullptr, frontFacingWinding); } -_MTL_INLINE void MTL4::RenderCommandEncoder::writeTimestamp(MTL4::TimestampGranularity granularity, MTL::RenderStages stage, const MTL4::CounterHeap* counterHeap, NS::UInteger index) +_MTL4_INLINE void MTL4::RenderCommandEncoder::writeTimestamp(MTL4::TimestampGranularity granularity, MTL::RenderStages stage, MTL4::CounterHeap* counterHeap, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(writeTimestampWithGranularity_afterStage_intoHeap_atIndex_), granularity, stage, counterHeap, index); + _MTL4_msg_v_writeTimestampWithGranularity_afterStage_intoHeap_atIndex__MTL4__TimestampGranularity_MTL__RenderStages_MTL4__CounterHeapp_NS__UInteger((const void*)this, nullptr, granularity, stage, counterHeap, index); } diff --git a/thirdparty/metal-cpp/Metal/MTL4RenderPass.hpp b/thirdparty/metal-cpp/Metal/MTL4RenderPass.hpp index c5aa9ed61b4c..62816174ffd3 100644 --- a/thirdparty/metal-cpp/Metal/MTL4RenderPass.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4RenderPass.hpp @@ -1,280 +1,233 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4RenderPass.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLRenderPass.hpp" - -namespace MTL4 -{ -class RenderPassDescriptor; -} +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLStructs.hpp" -namespace MTL -{ -class Buffer; -class RasterizationRateMap; -class RenderPassColorAttachmentDescriptorArray; -class RenderPassDepthAttachmentDescriptor; -class RenderPassStencilAttachmentDescriptor; -struct SamplePosition; +namespace MTL { + class Buffer; + class RasterizationRateMap; + class RenderPassColorAttachmentDescriptorArray; + class RenderPassDepthAttachmentDescriptor; + class RenderPassStencilAttachmentDescriptor; + enum VisibilityResultType : NS::Integer; } namespace MTL4 { + class RenderPassDescriptor : public NS::Copying { public: - static RenderPassDescriptor* alloc(); + static RenderPassDescriptor* alloc(); + RenderPassDescriptor* init() const; MTL::RenderPassColorAttachmentDescriptorArray* colorAttachments() const; - NS::UInteger defaultRasterSampleCount() const; - MTL::RenderPassDepthAttachmentDescriptor* depthAttachment() const; - NS::UInteger getSamplePositions(MTL::SamplePosition* positions, NS::UInteger count); - NS::UInteger imageblockSampleLength() const; - - RenderPassDescriptor* init(); - MTL::RasterizationRateMap* rasterizationRateMap() const; - NS::UInteger renderTargetArrayLength() const; - NS::UInteger renderTargetHeight() const; - NS::UInteger renderTargetWidth() const; - void setDefaultRasterSampleCount(NS::UInteger defaultRasterSampleCount); - - void setDepthAttachment(const MTL::RenderPassDepthAttachmentDescriptor* depthAttachment); - + void setDepthAttachment(MTL::RenderPassDepthAttachmentDescriptor* depthAttachment); void setImageblockSampleLength(NS::UInteger imageblockSampleLength); - - void setRasterizationRateMap(const MTL::RasterizationRateMap* rasterizationRateMap); - + void setRasterizationRateMap(MTL::RasterizationRateMap* rasterizationRateMap); void setRenderTargetArrayLength(NS::UInteger renderTargetArrayLength); - void setRenderTargetHeight(NS::UInteger renderTargetHeight); - void setRenderTargetWidth(NS::UInteger renderTargetWidth); - - void setSamplePositions(const MTL::SamplePosition* positions, NS::UInteger count); - - void setStencilAttachment(const MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment); - + void setSamplePositions(const MTL::SamplePosition * positions, NS::UInteger count); + void setStencilAttachment(MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment); void setSupportColorAttachmentMapping(bool supportColorAttachmentMapping); - void setThreadgroupMemoryLength(NS::UInteger threadgroupMemoryLength); - void setTileHeight(NS::UInteger tileHeight); - void setTileWidth(NS::UInteger tileWidth); - - void setVisibilityResultBuffer(const MTL::Buffer* visibilityResultBuffer); - + void setVisibilityResultBuffer(MTL::Buffer* visibilityResultBuffer); void setVisibilityResultType(MTL::VisibilityResultType visibilityResultType); - MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment() const; - bool supportColorAttachmentMapping() const; - NS::UInteger threadgroupMemoryLength() const; - NS::UInteger tileHeight() const; - NS::UInteger tileWidth() const; - MTL::Buffer* visibilityResultBuffer() const; - MTL::VisibilityResultType visibilityResultType() const; + }; -} -_MTL_INLINE MTL4::RenderPassDescriptor* MTL4::RenderPassDescriptor::alloc() +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4RenderPassDescriptor; + +_MTL4_INLINE MTL4::RenderPassDescriptor* MTL4::RenderPassDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4RenderPassDescriptor)); + return _MTL4_msg_MTL4__RenderPassDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4RenderPassDescriptor, nullptr); } -_MTL_INLINE MTL::RenderPassColorAttachmentDescriptorArray* MTL4::RenderPassDescriptor::colorAttachments() const +_MTL4_INLINE MTL4::RenderPassDescriptor* MTL4::RenderPassDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(colorAttachments)); + return _MTL4_msg_MTL4__RenderPassDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::RenderPassDescriptor::defaultRasterSampleCount() const +_MTL4_INLINE MTL::RenderPassColorAttachmentDescriptorArray* MTL4::RenderPassDescriptor::colorAttachments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(defaultRasterSampleCount)); + return _MTL4_msg_MTL__RenderPassColorAttachmentDescriptorArrayp_colorAttachments((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPassDepthAttachmentDescriptor* MTL4::RenderPassDescriptor::depthAttachment() const +_MTL4_INLINE MTL::RenderPassDepthAttachmentDescriptor* MTL4::RenderPassDescriptor::depthAttachment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depthAttachment)); + return _MTL4_msg_MTL__RenderPassDepthAttachmentDescriptorp_depthAttachment((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::RenderPassDescriptor::getSamplePositions(MTL::SamplePosition* positions, NS::UInteger count) +_MTL4_INLINE void MTL4::RenderPassDescriptor::setDepthAttachment(MTL::RenderPassDepthAttachmentDescriptor* depthAttachment) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(getSamplePositions_count_), positions, count); + _MTL4_msg_v_setDepthAttachment__MTL__RenderPassDepthAttachmentDescriptorp((const void*)this, nullptr, depthAttachment); } -_MTL_INLINE NS::UInteger MTL4::RenderPassDescriptor::imageblockSampleLength() const +_MTL4_INLINE MTL::RenderPassStencilAttachmentDescriptor* MTL4::RenderPassDescriptor::stencilAttachment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(imageblockSampleLength)); + return _MTL4_msg_MTL__RenderPassStencilAttachmentDescriptorp_stencilAttachment((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderPassDescriptor* MTL4::RenderPassDescriptor::init() +_MTL4_INLINE void MTL4::RenderPassDescriptor::setStencilAttachment(MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment) { - return NS::Object::init(); + _MTL4_msg_v_setStencilAttachment__MTL__RenderPassStencilAttachmentDescriptorp((const void*)this, nullptr, stencilAttachment); } -_MTL_INLINE MTL::RasterizationRateMap* MTL4::RenderPassDescriptor::rasterizationRateMap() const +_MTL4_INLINE NS::UInteger MTL4::RenderPassDescriptor::renderTargetArrayLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rasterizationRateMap)); + return _MTL4_msg_NS__UInteger_renderTargetArrayLength((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::RenderPassDescriptor::renderTargetArrayLength() const +_MTL4_INLINE void MTL4::RenderPassDescriptor::setRenderTargetArrayLength(NS::UInteger renderTargetArrayLength) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(renderTargetArrayLength)); + _MTL4_msg_v_setRenderTargetArrayLength__NS__UInteger((const void*)this, nullptr, renderTargetArrayLength); } -_MTL_INLINE NS::UInteger MTL4::RenderPassDescriptor::renderTargetHeight() const +_MTL4_INLINE NS::UInteger MTL4::RenderPassDescriptor::imageblockSampleLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(renderTargetHeight)); + return _MTL4_msg_NS__UInteger_imageblockSampleLength((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::RenderPassDescriptor::renderTargetWidth() const +_MTL4_INLINE void MTL4::RenderPassDescriptor::setImageblockSampleLength(NS::UInteger imageblockSampleLength) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(renderTargetWidth)); + _MTL4_msg_v_setImageblockSampleLength__NS__UInteger((const void*)this, nullptr, imageblockSampleLength); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setDefaultRasterSampleCount(NS::UInteger defaultRasterSampleCount) +_MTL4_INLINE NS::UInteger MTL4::RenderPassDescriptor::threadgroupMemoryLength() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDefaultRasterSampleCount_), defaultRasterSampleCount); + return _MTL4_msg_NS__UInteger_threadgroupMemoryLength((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setDepthAttachment(const MTL::RenderPassDepthAttachmentDescriptor* depthAttachment) +_MTL4_INLINE void MTL4::RenderPassDescriptor::setThreadgroupMemoryLength(NS::UInteger threadgroupMemoryLength) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthAttachment_), depthAttachment); + _MTL4_msg_v_setThreadgroupMemoryLength__NS__UInteger((const void*)this, nullptr, threadgroupMemoryLength); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setImageblockSampleLength(NS::UInteger imageblockSampleLength) +_MTL4_INLINE NS::UInteger MTL4::RenderPassDescriptor::tileWidth() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setImageblockSampleLength_), imageblockSampleLength); + return _MTL4_msg_NS__UInteger_tileWidth((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setRasterizationRateMap(const MTL::RasterizationRateMap* rasterizationRateMap) +_MTL4_INLINE void MTL4::RenderPassDescriptor::setTileWidth(NS::UInteger tileWidth) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterizationRateMap_), rasterizationRateMap); + _MTL4_msg_v_setTileWidth__NS__UInteger((const void*)this, nullptr, tileWidth); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setRenderTargetArrayLength(NS::UInteger renderTargetArrayLength) +_MTL4_INLINE NS::UInteger MTL4::RenderPassDescriptor::tileHeight() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderTargetArrayLength_), renderTargetArrayLength); + return _MTL4_msg_NS__UInteger_tileHeight((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setRenderTargetHeight(NS::UInteger renderTargetHeight) +_MTL4_INLINE void MTL4::RenderPassDescriptor::setTileHeight(NS::UInteger tileHeight) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderTargetHeight_), renderTargetHeight); + _MTL4_msg_v_setTileHeight__NS__UInteger((const void*)this, nullptr, tileHeight); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setRenderTargetWidth(NS::UInteger renderTargetWidth) +_MTL4_INLINE NS::UInteger MTL4::RenderPassDescriptor::defaultRasterSampleCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderTargetWidth_), renderTargetWidth); + return _MTL4_msg_NS__UInteger_defaultRasterSampleCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setSamplePositions(const MTL::SamplePosition* positions, NS::UInteger count) +_MTL4_INLINE void MTL4::RenderPassDescriptor::setDefaultRasterSampleCount(NS::UInteger defaultRasterSampleCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSamplePositions_count_), positions, count); + _MTL4_msg_v_setDefaultRasterSampleCount__NS__UInteger((const void*)this, nullptr, defaultRasterSampleCount); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setStencilAttachment(const MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment) +_MTL4_INLINE NS::UInteger MTL4::RenderPassDescriptor::renderTargetWidth() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilAttachment_), stencilAttachment); + return _MTL4_msg_NS__UInteger_renderTargetWidth((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setSupportColorAttachmentMapping(bool supportColorAttachmentMapping) +_MTL4_INLINE void MTL4::RenderPassDescriptor::setRenderTargetWidth(NS::UInteger renderTargetWidth) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportColorAttachmentMapping_), supportColorAttachmentMapping); + _MTL4_msg_v_setRenderTargetWidth__NS__UInteger((const void*)this, nullptr, renderTargetWidth); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setThreadgroupMemoryLength(NS::UInteger threadgroupMemoryLength) +_MTL4_INLINE NS::UInteger MTL4::RenderPassDescriptor::renderTargetHeight() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadgroupMemoryLength_), threadgroupMemoryLength); + return _MTL4_msg_NS__UInteger_renderTargetHeight((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setTileHeight(NS::UInteger tileHeight) +_MTL4_INLINE void MTL4::RenderPassDescriptor::setRenderTargetHeight(NS::UInteger renderTargetHeight) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileHeight_), tileHeight); + _MTL4_msg_v_setRenderTargetHeight__NS__UInteger((const void*)this, nullptr, renderTargetHeight); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setTileWidth(NS::UInteger tileWidth) +_MTL4_INLINE MTL::RasterizationRateMap* MTL4::RenderPassDescriptor::rasterizationRateMap() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileWidth_), tileWidth); + return _MTL4_msg_MTL__RasterizationRateMapp_rasterizationRateMap((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setVisibilityResultBuffer(const MTL::Buffer* visibilityResultBuffer) +_MTL4_INLINE void MTL4::RenderPassDescriptor::setRasterizationRateMap(MTL::RasterizationRateMap* rasterizationRateMap) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibilityResultBuffer_), visibilityResultBuffer); + _MTL4_msg_v_setRasterizationRateMap__MTL__RasterizationRateMapp((const void*)this, nullptr, rasterizationRateMap); } -_MTL_INLINE void MTL4::RenderPassDescriptor::setVisibilityResultType(MTL::VisibilityResultType visibilityResultType) +_MTL4_INLINE MTL::Buffer* MTL4::RenderPassDescriptor::visibilityResultBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibilityResultType_), visibilityResultType); + return _MTL4_msg_MTL__Bufferp_visibilityResultBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPassStencilAttachmentDescriptor* MTL4::RenderPassDescriptor::stencilAttachment() const +_MTL4_INLINE void MTL4::RenderPassDescriptor::setVisibilityResultBuffer(MTL::Buffer* visibilityResultBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stencilAttachment)); + _MTL4_msg_v_setVisibilityResultBuffer__MTL__Bufferp((const void*)this, nullptr, visibilityResultBuffer); } -_MTL_INLINE bool MTL4::RenderPassDescriptor::supportColorAttachmentMapping() const +_MTL4_INLINE MTL::VisibilityResultType MTL4::RenderPassDescriptor::visibilityResultType() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportColorAttachmentMapping)); + return _MTL4_msg_MTL__VisibilityResultType_visibilityResultType((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::RenderPassDescriptor::threadgroupMemoryLength() const +_MTL4_INLINE void MTL4::RenderPassDescriptor::setVisibilityResultType(MTL::VisibilityResultType visibilityResultType) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadgroupMemoryLength)); + _MTL4_msg_v_setVisibilityResultType__MTL__VisibilityResultType((const void*)this, nullptr, visibilityResultType); } -_MTL_INLINE NS::UInteger MTL4::RenderPassDescriptor::tileHeight() const +_MTL4_INLINE bool MTL4::RenderPassDescriptor::supportColorAttachmentMapping() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileHeight)); + return _MTL4_msg_bool_supportColorAttachmentMapping((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::RenderPassDescriptor::tileWidth() const +_MTL4_INLINE void MTL4::RenderPassDescriptor::setSupportColorAttachmentMapping(bool supportColorAttachmentMapping) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileWidth)); + _MTL4_msg_v_setSupportColorAttachmentMapping__bool((const void*)this, nullptr, supportColorAttachmentMapping); } -_MTL_INLINE MTL::Buffer* MTL4::RenderPassDescriptor::visibilityResultBuffer() const +_MTL4_INLINE void MTL4::RenderPassDescriptor::setSamplePositions(const MTL::SamplePosition * positions, NS::UInteger count) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(visibilityResultBuffer)); + _MTL4_msg_v_setSamplePositions_count__constMTL__SamplePositionp_NS__UInteger((const void*)this, nullptr, positions, count); } -_MTL_INLINE MTL::VisibilityResultType MTL4::RenderPassDescriptor::visibilityResultType() const +_MTL4_INLINE NS::UInteger MTL4::RenderPassDescriptor::getSamplePositions(MTL::SamplePosition* positions, NS::UInteger count) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(visibilityResultType)); + return _MTL4_msg_NS__UInteger_getSamplePositions_count__MTL__SamplePositionp_NS__UInteger((const void*)this, nullptr, positions, count); } diff --git a/thirdparty/metal-cpp/Metal/MTL4RenderPipeline.hpp b/thirdparty/metal-cpp/Metal/MTL4RenderPipeline.hpp index fc2e5e6f66b5..e743c4dfa8d1 100644 --- a/thirdparty/metal-cpp/Metal/MTL4RenderPipeline.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4RenderPipeline.hpp @@ -1,587 +1,525 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4RenderPipeline.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4PipelineState.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPixelFormat.hpp" -#include "MTLPrivate.hpp" -#include "MTLRenderPipeline.hpp" -namespace MTL4 -{ -class FunctionDescriptor; -class RenderPipelineBinaryFunctionsDescriptor; -class RenderPipelineColorAttachmentDescriptor; -class RenderPipelineColorAttachmentDescriptorArray; -class RenderPipelineDescriptor; -class StaticLinkingDescriptor; +namespace MTL { + class VertexDescriptor; + enum BlendFactor : NS::UInteger; + enum BlendOperation : NS::UInteger; + using ColorWriteMask = NS::UInteger; + enum PixelFormat : NS::UInteger; + enum PrimitiveTopologyClass : NS::UInteger; } - -namespace MTL -{ -class VertexDescriptor; +namespace MTL4 { + class FunctionDescriptor; + class StaticLinkingDescriptor; + enum AlphaToCoverageState : NS::Integer; + enum AlphaToOneState : NS::Integer; + enum BlendState : NS::Integer; + enum IndirectCommandBufferSupportState : NS::Integer; +} +namespace NS { + class Array; } namespace MTL4 { -_MTL_ENUM(NS::Integer, LogicalToPhysicalColorAttachmentMappingState) { + +_MTL4_ENUM(NS::Integer, LogicalToPhysicalColorAttachmentMappingState) { LogicalToPhysicalColorAttachmentMappingStateIdentity = 0, LogicalToPhysicalColorAttachmentMappingStateInherited = 1, }; + +class RenderPipelineColorAttachmentDescriptor; +class RenderPipelineColorAttachmentDescriptorArray; +class RenderPipelineBinaryFunctionsDescriptor; +class RenderPipelineDescriptor; + class RenderPipelineColorAttachmentDescriptor : public NS::Copying { public: static RenderPipelineColorAttachmentDescriptor* alloc(); + RenderPipelineColorAttachmentDescriptor* init() const; + + MTL::BlendOperation alphaBlendOperation() const; + MTL4::BlendState blendingState() const; + MTL::BlendFactor destinationAlphaBlendFactor() const; + MTL::BlendFactor destinationRGBBlendFactor() const; + MTL::PixelFormat pixelFormat() const; + void reset(); + MTL::BlendOperation rgbBlendOperation() const; + void setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation); + void setBlendingState(MTL4::BlendState blendingState); + void setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor); + void setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor); + void setPixelFormat(MTL::PixelFormat pixelFormat); + void setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation); + void setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor); + void setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor); + void setWriteMask(MTL::ColorWriteMask writeMask); + MTL::BlendFactor sourceAlphaBlendFactor() const; + MTL::BlendFactor sourceRGBBlendFactor() const; + MTL::ColorWriteMask writeMask() const; - MTL::BlendOperation alphaBlendOperation() const; - - BlendState blendingState() const; - - MTL::BlendFactor destinationAlphaBlendFactor() const; - - MTL::BlendFactor destinationRGBBlendFactor() const; - - RenderPipelineColorAttachmentDescriptor* init(); - - MTL::PixelFormat pixelFormat() const; - - void reset(); - - MTL::BlendOperation rgbBlendOperation() const; - - void setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation); - - void setBlendingState(MTL4::BlendState blendingState); - - void setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor); - - void setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor); - - void setPixelFormat(MTL::PixelFormat pixelFormat); - - void setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation); - - void setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor); - - void setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor); - - void setWriteMask(MTL::ColorWriteMask writeMask); - - MTL::BlendFactor sourceAlphaBlendFactor() const; - - MTL::BlendFactor sourceRGBBlendFactor() const; - - MTL::ColorWriteMask writeMask() const; }; class RenderPipelineColorAttachmentDescriptorArray : public NS::Copying { public: static RenderPipelineColorAttachmentDescriptorArray* alloc(); + RenderPipelineColorAttachmentDescriptorArray* init() const; - RenderPipelineColorAttachmentDescriptorArray* init(); + MTL4::RenderPipelineColorAttachmentDescriptor* object(NS::UInteger attachmentIndex); + void reset(); + void setObject(MTL4::RenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); - RenderPipelineColorAttachmentDescriptor* object(NS::UInteger attachmentIndex); - - void reset(); - - void setObject(const MTL4::RenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); }; class RenderPipelineBinaryFunctionsDescriptor : public NS::Copying { public: static RenderPipelineBinaryFunctionsDescriptor* alloc(); + RenderPipelineBinaryFunctionsDescriptor* init() const; + + NS::Array* fragmentAdditionalBinaryFunctions() const; + NS::Array* meshAdditionalBinaryFunctions() const; + NS::Array* objectAdditionalBinaryFunctions() const; + void reset(); + void setFragmentAdditionalBinaryFunctions(NS::Array* fragmentAdditionalBinaryFunctions); + void setMeshAdditionalBinaryFunctions(NS::Array* meshAdditionalBinaryFunctions); + void setObjectAdditionalBinaryFunctions(NS::Array* objectAdditionalBinaryFunctions); + void setTileAdditionalBinaryFunctions(NS::Array* tileAdditionalBinaryFunctions); + void setVertexAdditionalBinaryFunctions(NS::Array* vertexAdditionalBinaryFunctions); + NS::Array* tileAdditionalBinaryFunctions() const; + NS::Array* vertexAdditionalBinaryFunctions() const; - NS::Array* fragmentAdditionalBinaryFunctions() const; - - RenderPipelineBinaryFunctionsDescriptor* init(); - - NS::Array* meshAdditionalBinaryFunctions() const; - - NS::Array* objectAdditionalBinaryFunctions() const; - - void reset(); - - void setFragmentAdditionalBinaryFunctions(const NS::Array* fragmentAdditionalBinaryFunctions); - - void setMeshAdditionalBinaryFunctions(const NS::Array* meshAdditionalBinaryFunctions); - - void setObjectAdditionalBinaryFunctions(const NS::Array* objectAdditionalBinaryFunctions); - - void setTileAdditionalBinaryFunctions(const NS::Array* tileAdditionalBinaryFunctions); - - void setVertexAdditionalBinaryFunctions(const NS::Array* vertexAdditionalBinaryFunctions); - - NS::Array* tileAdditionalBinaryFunctions() const; - - NS::Array* vertexAdditionalBinaryFunctions() const; }; -class RenderPipelineDescriptor : public NS::Copying +class RenderPipelineDescriptor : public NS::Referencing { public: - static RenderPipelineDescriptor* alloc(); - - AlphaToCoverageState alphaToCoverageState() const; - - AlphaToOneState alphaToOneState() const; - - LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState() const; - - RenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; - - FunctionDescriptor* fragmentFunctionDescriptor() const; - - StaticLinkingDescriptor* fragmentStaticLinkingDescriptor() const; - - RenderPipelineDescriptor* init(); - - MTL::PrimitiveTopologyClass inputPrimitiveTopology() const; - - bool isRasterizationEnabled() const; - - NS::UInteger maxVertexAmplificationCount() const; - - NS::UInteger rasterSampleCount() const; - - [[deprecated("please use isRasterizationEnabled instead")]] - bool rasterizationEnabled() const; - - void reset(); + static RenderPipelineDescriptor* alloc(); + RenderPipelineDescriptor* init() const; + + MTL4::AlphaToCoverageState alphaToCoverageState() const; + MTL4::AlphaToOneState alphaToOneState() const; + MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState() const; + MTL4::RenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; + MTL4::FunctionDescriptor* fragmentFunctionDescriptor() const; + MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor() const; + MTL::PrimitiveTopologyClass inputPrimitiveTopology() const; + bool isRasterizationEnabled(); + NS::UInteger maxVertexAmplificationCount() const; + NS::UInteger rasterSampleCount() const; + bool rasterizationEnabled() const; + void reset(); + void setAlphaToCoverageState(MTL4::AlphaToCoverageState alphaToCoverageState); + void setAlphaToOneState(MTL4::AlphaToOneState alphaToOneState); + void setColorAttachmentMappingState(MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState); + void setFragmentFunctionDescriptor(MTL4::FunctionDescriptor* fragmentFunctionDescriptor); + void setFragmentStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor); + void setInputPrimitiveTopology(MTL::PrimitiveTopologyClass inputPrimitiveTopology); + void setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount); + void setRasterSampleCount(NS::UInteger rasterSampleCount); + void setRasterizationEnabled(bool rasterizationEnabled); + void setSupportFragmentBinaryLinking(bool supportFragmentBinaryLinking); + void setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers); + void setSupportVertexBinaryLinking(bool supportVertexBinaryLinking); + void setVertexDescriptor(MTL::VertexDescriptor* vertexDescriptor); + void setVertexFunctionDescriptor(MTL4::FunctionDescriptor* vertexFunctionDescriptor); + void setVertexStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* vertexStaticLinkingDescriptor); + bool supportFragmentBinaryLinking() const; + MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers() const; + bool supportVertexBinaryLinking() const; + MTL::VertexDescriptor* vertexDescriptor() const; + MTL4::FunctionDescriptor* vertexFunctionDescriptor() const; + MTL4::StaticLinkingDescriptor* vertexStaticLinkingDescriptor() const; - void setAlphaToCoverageState(MTL4::AlphaToCoverageState alphaToCoverageState); - - void setAlphaToOneState(MTL4::AlphaToOneState alphaToOneState); - - void setColorAttachmentMappingState(MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState); - - void setFragmentFunctionDescriptor(const MTL4::FunctionDescriptor* fragmentFunctionDescriptor); - - void setFragmentStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor); - - void setInputPrimitiveTopology(MTL::PrimitiveTopologyClass inputPrimitiveTopology); - - void setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount); - - void setRasterSampleCount(NS::UInteger rasterSampleCount); - - void setRasterizationEnabled(bool rasterizationEnabled); - - void setSupportFragmentBinaryLinking(bool supportFragmentBinaryLinking); - - void setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers); - - void setSupportVertexBinaryLinking(bool supportVertexBinaryLinking); - - void setVertexDescriptor(const MTL::VertexDescriptor* vertexDescriptor); - - void setVertexFunctionDescriptor(const MTL4::FunctionDescriptor* vertexFunctionDescriptor); - - void setVertexStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* vertexStaticLinkingDescriptor); - - bool supportFragmentBinaryLinking() const; - - IndirectCommandBufferSupportState supportIndirectCommandBuffers() const; +}; - bool supportVertexBinaryLinking() const; +} // namespace MTL4 - MTL::VertexDescriptor* vertexDescriptor() const; +// --- Class symbols + inline implementations --- - FunctionDescriptor* vertexFunctionDescriptor() const; +extern "C" void *OBJC_CLASS_$_MTL4RenderPipelineColorAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4RenderPipelineColorAttachmentDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTL4RenderPipelineBinaryFunctionsDescriptor; +extern "C" void *OBJC_CLASS_$_MTL4RenderPipelineDescriptor; - StaticLinkingDescriptor* vertexStaticLinkingDescriptor() const; -}; - -} -_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptor* MTL4::RenderPipelineColorAttachmentDescriptor::alloc() +_MTL4_INLINE MTL4::RenderPipelineColorAttachmentDescriptor* MTL4::RenderPipelineColorAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4RenderPipelineColorAttachmentDescriptor)); + return _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4RenderPipelineColorAttachmentDescriptor, nullptr); } -_MTL_INLINE MTL::BlendOperation MTL4::RenderPipelineColorAttachmentDescriptor::alphaBlendOperation() const +_MTL4_INLINE MTL4::RenderPipelineColorAttachmentDescriptor* MTL4::RenderPipelineColorAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(alphaBlendOperation)); + return _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::BlendState MTL4::RenderPipelineColorAttachmentDescriptor::blendingState() const +_MTL4_INLINE MTL::PixelFormat MTL4::RenderPipelineColorAttachmentDescriptor::pixelFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(blendingState)); + return _MTL4_msg_MTL__PixelFormat_pixelFormat((const void*)this, nullptr); } -_MTL_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::destinationAlphaBlendFactor() const +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setPixelFormat(MTL::PixelFormat pixelFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(destinationAlphaBlendFactor)); + _MTL4_msg_v_setPixelFormat__MTL__PixelFormat((const void*)this, nullptr, pixelFormat); } -_MTL_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::destinationRGBBlendFactor() const +_MTL4_INLINE MTL4::BlendState MTL4::RenderPipelineColorAttachmentDescriptor::blendingState() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(destinationRGBBlendFactor)); + return _MTL4_msg_MTL4__BlendState_blendingState((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptor* MTL4::RenderPipelineColorAttachmentDescriptor::init() +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setBlendingState(MTL4::BlendState blendingState) { - return NS::Object::init(); + _MTL4_msg_v_setBlendingState__MTL4__BlendState((const void*)this, nullptr, blendingState); } -_MTL_INLINE MTL::PixelFormat MTL4::RenderPipelineColorAttachmentDescriptor::pixelFormat() const +_MTL4_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::sourceRGBBlendFactor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(pixelFormat)); + return _MTL4_msg_MTL__BlendFactor_sourceRGBBlendFactor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::reset() +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL4_msg_v_setSourceRGBBlendFactor__MTL__BlendFactor((const void*)this, nullptr, sourceRGBBlendFactor); } -_MTL_INLINE MTL::BlendOperation MTL4::RenderPipelineColorAttachmentDescriptor::rgbBlendOperation() const +_MTL4_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::destinationRGBBlendFactor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rgbBlendOperation)); + return _MTL4_msg_MTL__BlendFactor_destinationRGBBlendFactor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation) +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAlphaBlendOperation_), alphaBlendOperation); + _MTL4_msg_v_setDestinationRGBBlendFactor__MTL__BlendFactor((const void*)this, nullptr, destinationRGBBlendFactor); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setBlendingState(MTL4::BlendState blendingState) +_MTL4_INLINE MTL::BlendOperation MTL4::RenderPipelineColorAttachmentDescriptor::rgbBlendOperation() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBlendingState_), blendingState); + return _MTL4_msg_MTL__BlendOperation_rgbBlendOperation((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor) +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDestinationAlphaBlendFactor_), destinationAlphaBlendFactor); + _MTL4_msg_v_setRgbBlendOperation__MTL__BlendOperation((const void*)this, nullptr, rgbBlendOperation); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor) +_MTL4_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::sourceAlphaBlendFactor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDestinationRGBBlendFactor_), destinationRGBBlendFactor); + return _MTL4_msg_MTL__BlendFactor_sourceAlphaBlendFactor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setPixelFormat(MTL::PixelFormat pixelFormat) +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPixelFormat_), pixelFormat); + _MTL4_msg_v_setSourceAlphaBlendFactor__MTL__BlendFactor((const void*)this, nullptr, sourceAlphaBlendFactor); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation) +_MTL4_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::destinationAlphaBlendFactor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRgbBlendOperation_), rgbBlendOperation); + return _MTL4_msg_MTL__BlendFactor_destinationAlphaBlendFactor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor) +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSourceAlphaBlendFactor_), sourceAlphaBlendFactor); + _MTL4_msg_v_setDestinationAlphaBlendFactor__MTL__BlendFactor((const void*)this, nullptr, destinationAlphaBlendFactor); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor) +_MTL4_INLINE MTL::BlendOperation MTL4::RenderPipelineColorAttachmentDescriptor::alphaBlendOperation() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSourceRGBBlendFactor_), sourceRGBBlendFactor); + return _MTL4_msg_MTL__BlendOperation_alphaBlendOperation((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setWriteMask(MTL::ColorWriteMask writeMask) +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setWriteMask_), writeMask); + _MTL4_msg_v_setAlphaBlendOperation__MTL__BlendOperation((const void*)this, nullptr, alphaBlendOperation); } -_MTL_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::sourceAlphaBlendFactor() const +_MTL4_INLINE MTL::ColorWriteMask MTL4::RenderPipelineColorAttachmentDescriptor::writeMask() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sourceAlphaBlendFactor)); + return _MTL4_msg_MTL__ColorWriteMask_writeMask((const void*)this, nullptr); } -_MTL_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::sourceRGBBlendFactor() const +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setWriteMask(MTL::ColorWriteMask writeMask) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sourceRGBBlendFactor)); + _MTL4_msg_v_setWriteMask__MTL__ColorWriteMask((const void*)this, nullptr, writeMask); } -_MTL_INLINE MTL::ColorWriteMask MTL4::RenderPipelineColorAttachmentDescriptor::writeMask() const +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::reset() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(writeMask)); + _MTL4_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::RenderPipelineColorAttachmentDescriptorArray::alloc() +_MTL4_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::RenderPipelineColorAttachmentDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4RenderPipelineColorAttachmentDescriptorArray)); + return _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTL4RenderPipelineColorAttachmentDescriptorArray, nullptr); } -_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::RenderPipelineColorAttachmentDescriptorArray::init() +_MTL4_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::RenderPipelineColorAttachmentDescriptorArray::init() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorArrayp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptor* MTL4::RenderPipelineColorAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) +_MTL4_INLINE MTL4::RenderPipelineColorAttachmentDescriptor* MTL4::RenderPipelineColorAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex); + return _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, attachmentIndex); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptorArray::reset() +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptorArray::setObject(MTL4::RenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL4_msg_v_setObject_atIndexedSubscript__MTL4__RenderPipelineColorAttachmentDescriptorp_NS__UInteger((const void*)this, nullptr, attachment, attachmentIndex); } -_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptorArray::setObject(const MTL4::RenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) +_MTL4_INLINE void MTL4::RenderPipelineColorAttachmentDescriptorArray::reset() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex); + _MTL4_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderPipelineBinaryFunctionsDescriptor* MTL4::RenderPipelineBinaryFunctionsDescriptor::alloc() +_MTL4_INLINE MTL4::RenderPipelineBinaryFunctionsDescriptor* MTL4::RenderPipelineBinaryFunctionsDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4RenderPipelineBinaryFunctionsDescriptor)); + return _MTL4_msg_MTL4__RenderPipelineBinaryFunctionsDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4RenderPipelineBinaryFunctionsDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::fragmentAdditionalBinaryFunctions() const +_MTL4_INLINE MTL4::RenderPipelineBinaryFunctionsDescriptor* MTL4::RenderPipelineBinaryFunctionsDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentAdditionalBinaryFunctions)); + return _MTL4_msg_MTL4__RenderPipelineBinaryFunctionsDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderPipelineBinaryFunctionsDescriptor* MTL4::RenderPipelineBinaryFunctionsDescriptor::init() +_MTL4_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::vertexAdditionalBinaryFunctions() const { - return NS::Object::init(); + return _MTL4_msg_NS__Arrayp_vertexAdditionalBinaryFunctions((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::meshAdditionalBinaryFunctions() const +_MTL4_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setVertexAdditionalBinaryFunctions(NS::Array* vertexAdditionalBinaryFunctions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshAdditionalBinaryFunctions)); + _MTL4_msg_v_setVertexAdditionalBinaryFunctions__NS__Arrayp((const void*)this, nullptr, vertexAdditionalBinaryFunctions); } -_MTL_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::objectAdditionalBinaryFunctions() const +_MTL4_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::fragmentAdditionalBinaryFunctions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAdditionalBinaryFunctions)); + return _MTL4_msg_NS__Arrayp_fragmentAdditionalBinaryFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::reset() +_MTL4_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setFragmentAdditionalBinaryFunctions(NS::Array* fragmentAdditionalBinaryFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL4_msg_v_setFragmentAdditionalBinaryFunctions__NS__Arrayp((const void*)this, nullptr, fragmentAdditionalBinaryFunctions); } -_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setFragmentAdditionalBinaryFunctions(const NS::Array* fragmentAdditionalBinaryFunctions) +_MTL4_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::tileAdditionalBinaryFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentAdditionalBinaryFunctions_), fragmentAdditionalBinaryFunctions); + return _MTL4_msg_NS__Arrayp_tileAdditionalBinaryFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setMeshAdditionalBinaryFunctions(const NS::Array* meshAdditionalBinaryFunctions) +_MTL4_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setTileAdditionalBinaryFunctions(NS::Array* tileAdditionalBinaryFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshAdditionalBinaryFunctions_), meshAdditionalBinaryFunctions); + _MTL4_msg_v_setTileAdditionalBinaryFunctions__NS__Arrayp((const void*)this, nullptr, tileAdditionalBinaryFunctions); } -_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setObjectAdditionalBinaryFunctions(const NS::Array* objectAdditionalBinaryFunctions) +_MTL4_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::objectAdditionalBinaryFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectAdditionalBinaryFunctions_), objectAdditionalBinaryFunctions); + return _MTL4_msg_NS__Arrayp_objectAdditionalBinaryFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setTileAdditionalBinaryFunctions(const NS::Array* tileAdditionalBinaryFunctions) +_MTL4_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setObjectAdditionalBinaryFunctions(NS::Array* objectAdditionalBinaryFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileAdditionalBinaryFunctions_), tileAdditionalBinaryFunctions); + _MTL4_msg_v_setObjectAdditionalBinaryFunctions__NS__Arrayp((const void*)this, nullptr, objectAdditionalBinaryFunctions); } -_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setVertexAdditionalBinaryFunctions(const NS::Array* vertexAdditionalBinaryFunctions) +_MTL4_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::meshAdditionalBinaryFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexAdditionalBinaryFunctions_), vertexAdditionalBinaryFunctions); + return _MTL4_msg_NS__Arrayp_meshAdditionalBinaryFunctions((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::tileAdditionalBinaryFunctions() const +_MTL4_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setMeshAdditionalBinaryFunctions(NS::Array* meshAdditionalBinaryFunctions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileAdditionalBinaryFunctions)); + _MTL4_msg_v_setMeshAdditionalBinaryFunctions__NS__Arrayp((const void*)this, nullptr, meshAdditionalBinaryFunctions); } -_MTL_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::vertexAdditionalBinaryFunctions() const +_MTL4_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::reset() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexAdditionalBinaryFunctions)); + _MTL4_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderPipelineDescriptor* MTL4::RenderPipelineDescriptor::alloc() +_MTL4_INLINE MTL4::RenderPipelineDescriptor* MTL4::RenderPipelineDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4RenderPipelineDescriptor)); + return _MTL4_msg_MTL4__RenderPipelineDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4RenderPipelineDescriptor, nullptr); } -_MTL_INLINE MTL4::AlphaToCoverageState MTL4::RenderPipelineDescriptor::alphaToCoverageState() const +_MTL4_INLINE MTL4::RenderPipelineDescriptor* MTL4::RenderPipelineDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(alphaToCoverageState)); + return _MTL4_msg_MTL4__RenderPipelineDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::AlphaToOneState MTL4::RenderPipelineDescriptor::alphaToOneState() const +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::RenderPipelineDescriptor::vertexFunctionDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(alphaToOneState)); + return _MTL4_msg_MTL4__FunctionDescriptorp_vertexFunctionDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::LogicalToPhysicalColorAttachmentMappingState MTL4::RenderPipelineDescriptor::colorAttachmentMappingState() const +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setVertexFunctionDescriptor(MTL4::FunctionDescriptor* vertexFunctionDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(colorAttachmentMappingState)); + _MTL4_msg_v_setVertexFunctionDescriptor__MTL4__FunctionDescriptorp((const void*)this, nullptr, vertexFunctionDescriptor); } -_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::RenderPipelineDescriptor::colorAttachments() const +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::RenderPipelineDescriptor::fragmentFunctionDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(colorAttachments)); + return _MTL4_msg_MTL4__FunctionDescriptorp_fragmentFunctionDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::RenderPipelineDescriptor::fragmentFunctionDescriptor() const +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setFragmentFunctionDescriptor(MTL4::FunctionDescriptor* fragmentFunctionDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentFunctionDescriptor)); + _MTL4_msg_v_setFragmentFunctionDescriptor__MTL4__FunctionDescriptorp((const void*)this, nullptr, fragmentFunctionDescriptor); } -_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::RenderPipelineDescriptor::fragmentStaticLinkingDescriptor() const +_MTL4_INLINE MTL::VertexDescriptor* MTL4::RenderPipelineDescriptor::vertexDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentStaticLinkingDescriptor)); + return _MTL4_msg_MTL__VertexDescriptorp_vertexDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::RenderPipelineDescriptor* MTL4::RenderPipelineDescriptor::init() +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setVertexDescriptor(MTL::VertexDescriptor* vertexDescriptor) { - return NS::Object::init(); + _MTL4_msg_v_setVertexDescriptor__MTL__VertexDescriptorp((const void*)this, nullptr, vertexDescriptor); } -_MTL_INLINE MTL::PrimitiveTopologyClass MTL4::RenderPipelineDescriptor::inputPrimitiveTopology() const +_MTL4_INLINE NS::UInteger MTL4::RenderPipelineDescriptor::rasterSampleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inputPrimitiveTopology)); + return _MTL4_msg_NS__UInteger_rasterSampleCount((const void*)this, nullptr); } -_MTL_INLINE bool MTL4::RenderPipelineDescriptor::isRasterizationEnabled() const +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isRasterizationEnabled)); + _MTL4_msg_v_setRasterSampleCount__NS__UInteger((const void*)this, nullptr, rasterSampleCount); } -_MTL_INLINE NS::UInteger MTL4::RenderPipelineDescriptor::maxVertexAmplificationCount() const +_MTL4_INLINE MTL4::AlphaToCoverageState MTL4::RenderPipelineDescriptor::alphaToCoverageState() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxVertexAmplificationCount)); + return _MTL4_msg_MTL4__AlphaToCoverageState_alphaToCoverageState((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::RenderPipelineDescriptor::rasterSampleCount() const +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setAlphaToCoverageState(MTL4::AlphaToCoverageState alphaToCoverageState) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rasterSampleCount)); + _MTL4_msg_v_setAlphaToCoverageState__MTL4__AlphaToCoverageState((const void*)this, nullptr, alphaToCoverageState); } -_MTL_INLINE bool MTL4::RenderPipelineDescriptor::rasterizationEnabled() const +_MTL4_INLINE MTL4::AlphaToOneState MTL4::RenderPipelineDescriptor::alphaToOneState() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isRasterizationEnabled)); + return _MTL4_msg_MTL4__AlphaToOneState_alphaToOneState((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::reset() +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setAlphaToOneState(MTL4::AlphaToOneState alphaToOneState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL4_msg_v_setAlphaToOneState__MTL4__AlphaToOneState((const void*)this, nullptr, alphaToOneState); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setAlphaToCoverageState(MTL4::AlphaToCoverageState alphaToCoverageState) +_MTL4_INLINE bool MTL4::RenderPipelineDescriptor::rasterizationEnabled() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAlphaToCoverageState_), alphaToCoverageState); + return _MTL4_msg_bool_rasterizationEnabled((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setAlphaToOneState(MTL4::AlphaToOneState alphaToOneState) +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setRasterizationEnabled(bool rasterizationEnabled) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAlphaToOneState_), alphaToOneState); + _MTL4_msg_v_setRasterizationEnabled__bool((const void*)this, nullptr, rasterizationEnabled); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setColorAttachmentMappingState(MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState) +_MTL4_INLINE NS::UInteger MTL4::RenderPipelineDescriptor::maxVertexAmplificationCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setColorAttachmentMappingState_), colorAttachmentMappingState); + return _MTL4_msg_NS__UInteger_maxVertexAmplificationCount((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setFragmentFunctionDescriptor(const MTL4::FunctionDescriptor* fragmentFunctionDescriptor) +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentFunctionDescriptor_), fragmentFunctionDescriptor); + _MTL4_msg_v_setMaxVertexAmplificationCount__NS__UInteger((const void*)this, nullptr, maxVertexAmplificationCount); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setFragmentStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor) +_MTL4_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::RenderPipelineDescriptor::colorAttachments() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentStaticLinkingDescriptor_), fragmentStaticLinkingDescriptor); + return _MTL4_msg_MTL4__RenderPipelineColorAttachmentDescriptorArrayp_colorAttachments((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setInputPrimitiveTopology(MTL::PrimitiveTopologyClass inputPrimitiveTopology) +_MTL4_INLINE MTL::PrimitiveTopologyClass MTL4::RenderPipelineDescriptor::inputPrimitiveTopology() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInputPrimitiveTopology_), inputPrimitiveTopology); + return _MTL4_msg_MTL__PrimitiveTopologyClass_inputPrimitiveTopology((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount) +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setInputPrimitiveTopology(MTL::PrimitiveTopologyClass inputPrimitiveTopology) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxVertexAmplificationCount_), maxVertexAmplificationCount); + _MTL4_msg_v_setInputPrimitiveTopology__MTL__PrimitiveTopologyClass((const void*)this, nullptr, inputPrimitiveTopology); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) +_MTL4_INLINE MTL4::StaticLinkingDescriptor* MTL4::RenderPipelineDescriptor::vertexStaticLinkingDescriptor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterSampleCount_), rasterSampleCount); + return _MTL4_msg_MTL4__StaticLinkingDescriptorp_vertexStaticLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setRasterizationEnabled(bool rasterizationEnabled) +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setVertexStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* vertexStaticLinkingDescriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterizationEnabled_), rasterizationEnabled); + _MTL4_msg_v_setVertexStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp((const void*)this, nullptr, vertexStaticLinkingDescriptor); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setSupportFragmentBinaryLinking(bool supportFragmentBinaryLinking) +_MTL4_INLINE MTL4::StaticLinkingDescriptor* MTL4::RenderPipelineDescriptor::fragmentStaticLinkingDescriptor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportFragmentBinaryLinking_), supportFragmentBinaryLinking); + return _MTL4_msg_MTL4__StaticLinkingDescriptorp_fragmentStaticLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers) +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setFragmentStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportIndirectCommandBuffers_), supportIndirectCommandBuffers); + _MTL4_msg_v_setFragmentStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp((const void*)this, nullptr, fragmentStaticLinkingDescriptor); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setSupportVertexBinaryLinking(bool supportVertexBinaryLinking) +_MTL4_INLINE bool MTL4::RenderPipelineDescriptor::supportVertexBinaryLinking() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportVertexBinaryLinking_), supportVertexBinaryLinking); + return _MTL4_msg_bool_supportVertexBinaryLinking((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setVertexDescriptor(const MTL::VertexDescriptor* vertexDescriptor) +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setSupportVertexBinaryLinking(bool supportVertexBinaryLinking) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexDescriptor_), vertexDescriptor); + _MTL4_msg_v_setSupportVertexBinaryLinking__bool((const void*)this, nullptr, supportVertexBinaryLinking); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setVertexFunctionDescriptor(const MTL4::FunctionDescriptor* vertexFunctionDescriptor) +_MTL4_INLINE bool MTL4::RenderPipelineDescriptor::supportFragmentBinaryLinking() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexFunctionDescriptor_), vertexFunctionDescriptor); + return _MTL4_msg_bool_supportFragmentBinaryLinking((const void*)this, nullptr); } -_MTL_INLINE void MTL4::RenderPipelineDescriptor::setVertexStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* vertexStaticLinkingDescriptor) +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setSupportFragmentBinaryLinking(bool supportFragmentBinaryLinking) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexStaticLinkingDescriptor_), vertexStaticLinkingDescriptor); + _MTL4_msg_v_setSupportFragmentBinaryLinking__bool((const void*)this, nullptr, supportFragmentBinaryLinking); } -_MTL_INLINE bool MTL4::RenderPipelineDescriptor::supportFragmentBinaryLinking() const +_MTL4_INLINE MTL4::LogicalToPhysicalColorAttachmentMappingState MTL4::RenderPipelineDescriptor::colorAttachmentMappingState() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportFragmentBinaryLinking)); + return _MTL4_msg_MTL4__LogicalToPhysicalColorAttachmentMappingState_colorAttachmentMappingState((const void*)this, nullptr); } -_MTL_INLINE MTL4::IndirectCommandBufferSupportState MTL4::RenderPipelineDescriptor::supportIndirectCommandBuffers() const +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setColorAttachmentMappingState(MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers)); + _MTL4_msg_v_setColorAttachmentMappingState__MTL4__LogicalToPhysicalColorAttachmentMappingState((const void*)this, nullptr, colorAttachmentMappingState); } -_MTL_INLINE bool MTL4::RenderPipelineDescriptor::supportVertexBinaryLinking() const +_MTL4_INLINE MTL4::IndirectCommandBufferSupportState MTL4::RenderPipelineDescriptor::supportIndirectCommandBuffers() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportVertexBinaryLinking)); + return _MTL4_msg_MTL4__IndirectCommandBufferSupportState_supportIndirectCommandBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL::VertexDescriptor* MTL4::RenderPipelineDescriptor::vertexDescriptor() const +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexDescriptor)); + _MTL4_msg_v_setSupportIndirectCommandBuffers__MTL4__IndirectCommandBufferSupportState((const void*)this, nullptr, supportIndirectCommandBuffers); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::RenderPipelineDescriptor::vertexFunctionDescriptor() const +_MTL4_INLINE void MTL4::RenderPipelineDescriptor::reset() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexFunctionDescriptor)); + _MTL4_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::RenderPipelineDescriptor::vertexStaticLinkingDescriptor() const +_MTL4_INLINE bool MTL4::RenderPipelineDescriptor::isRasterizationEnabled() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexStaticLinkingDescriptor)); + return _MTL4_msg_bool_isRasterizationEnabled((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTL4SpecializedFunctionDescriptor.hpp b/thirdparty/metal-cpp/Metal/MTL4SpecializedFunctionDescriptor.hpp index 57c0094dda09..c964cffc9d91 100644 --- a/thirdparty/metal-cpp/Metal/MTL4SpecializedFunctionDescriptor.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4SpecializedFunctionDescriptor.hpp @@ -1,100 +1,84 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4SpecializedFunctionDescriptor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4FunctionDescriptor.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -namespace MTL4 -{ -class FunctionDescriptor; -class SpecializedFunctionDescriptor; +namespace MTL { + class FunctionConstantValues; } - -namespace MTL -{ -class FunctionConstantValues; +namespace MTL4 { + class FunctionDescriptor; +} +namespace NS { + class String; } namespace MTL4 { -class SpecializedFunctionDescriptor : public NS::Copying + +class SpecializedFunctionDescriptor : public NS::Referencing { public: static SpecializedFunctionDescriptor* alloc(); + SpecializedFunctionDescriptor* init() const; - MTL::FunctionConstantValues* constantValues() const; + MTL::FunctionConstantValues* constantValues() const; + MTL4::FunctionDescriptor* functionDescriptor() const; + void setConstantValues(MTL::FunctionConstantValues* constantValues); + void setFunctionDescriptor(MTL4::FunctionDescriptor* functionDescriptor); + void setSpecializedName(NS::String* specializedName); + NS::String* specializedName() const; - FunctionDescriptor* functionDescriptor() const; +}; - SpecializedFunctionDescriptor* init(); +} // namespace MTL4 - void setConstantValues(const MTL::FunctionConstantValues* constantValues); +// --- Class symbols + inline implementations --- - void setFunctionDescriptor(const MTL4::FunctionDescriptor* functionDescriptor); +extern "C" void *OBJC_CLASS_$_MTL4SpecializedFunctionDescriptor; - void setSpecializedName(const NS::String* specializedName); - NS::String* specializedName() const; -}; - -} -_MTL_INLINE MTL4::SpecializedFunctionDescriptor* MTL4::SpecializedFunctionDescriptor::alloc() +_MTL4_INLINE MTL4::SpecializedFunctionDescriptor* MTL4::SpecializedFunctionDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4SpecializedFunctionDescriptor)); + return _MTL4_msg_MTL4__SpecializedFunctionDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4SpecializedFunctionDescriptor, nullptr); } -_MTL_INLINE MTL::FunctionConstantValues* MTL4::SpecializedFunctionDescriptor::constantValues() const +_MTL4_INLINE MTL4::SpecializedFunctionDescriptor* MTL4::SpecializedFunctionDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(constantValues)); + return _MTL4_msg_MTL4__SpecializedFunctionDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::SpecializedFunctionDescriptor::functionDescriptor() const +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::SpecializedFunctionDescriptor::functionDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionDescriptor)); + return _MTL4_msg_MTL4__FunctionDescriptorp_functionDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::SpecializedFunctionDescriptor* MTL4::SpecializedFunctionDescriptor::init() +_MTL4_INLINE void MTL4::SpecializedFunctionDescriptor::setFunctionDescriptor(MTL4::FunctionDescriptor* functionDescriptor) { - return NS::Object::init(); + _MTL4_msg_v_setFunctionDescriptor__MTL4__FunctionDescriptorp((const void*)this, nullptr, functionDescriptor); } -_MTL_INLINE void MTL4::SpecializedFunctionDescriptor::setConstantValues(const MTL::FunctionConstantValues* constantValues) +_MTL4_INLINE NS::String* MTL4::SpecializedFunctionDescriptor::specializedName() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setConstantValues_), constantValues); + return _MTL4_msg_NS__Stringp_specializedName((const void*)this, nullptr); } -_MTL_INLINE void MTL4::SpecializedFunctionDescriptor::setFunctionDescriptor(const MTL4::FunctionDescriptor* functionDescriptor) +_MTL4_INLINE void MTL4::SpecializedFunctionDescriptor::setSpecializedName(NS::String* specializedName) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctionDescriptor_), functionDescriptor); + _MTL4_msg_v_setSpecializedName__NS__Stringp((const void*)this, nullptr, specializedName); } -_MTL_INLINE void MTL4::SpecializedFunctionDescriptor::setSpecializedName(const NS::String* specializedName) +_MTL4_INLINE MTL::FunctionConstantValues* MTL4::SpecializedFunctionDescriptor::constantValues() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSpecializedName_), specializedName); + return _MTL4_msg_MTL__FunctionConstantValuesp_constantValues((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL4::SpecializedFunctionDescriptor::specializedName() const +_MTL4_INLINE void MTL4::SpecializedFunctionDescriptor::setConstantValues(MTL::FunctionConstantValues* constantValues) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(specializedName)); + _MTL4_msg_v_setConstantValues__MTL__FunctionConstantValuesp((const void*)this, nullptr, constantValues); } diff --git a/thirdparty/metal-cpp/Metal/MTL4StitchedFunctionDescriptor.hpp b/thirdparty/metal-cpp/Metal/MTL4StitchedFunctionDescriptor.hpp index ca8ea5cfd9eb..b2f487e742e5 100644 --- a/thirdparty/metal-cpp/Metal/MTL4StitchedFunctionDescriptor.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4StitchedFunctionDescriptor.hpp @@ -1,86 +1,69 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4StitchedFunctionDescriptor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4FunctionDescriptor.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -namespace MTL4 -{ -class StitchedFunctionDescriptor; +namespace MTL { + class FunctionStitchingGraph; } - -namespace MTL -{ -class FunctionStitchingGraph; +namespace NS { + class Array; } namespace MTL4 { -class StitchedFunctionDescriptor : public NS::Copying + +class StitchedFunctionDescriptor : public NS::Referencing { public: static StitchedFunctionDescriptor* alloc(); + StitchedFunctionDescriptor* init() const; - NS::Array* functionDescriptors() const; + NS::Array* functionDescriptors() const; + MTL::FunctionStitchingGraph* functionGraph() const; + void setFunctionDescriptors(NS::Array* functionDescriptors); + void setFunctionGraph(MTL::FunctionStitchingGraph* functionGraph); - MTL::FunctionStitchingGraph* functionGraph() const; +}; - StitchedFunctionDescriptor* init(); +} // namespace MTL4 - void setFunctionDescriptors(const NS::Array* functionDescriptors); +// --- Class symbols + inline implementations --- - void setFunctionGraph(const MTL::FunctionStitchingGraph* functionGraph); -}; +extern "C" void *OBJC_CLASS_$_MTL4StitchedFunctionDescriptor; -} -_MTL_INLINE MTL4::StitchedFunctionDescriptor* MTL4::StitchedFunctionDescriptor::alloc() +_MTL4_INLINE MTL4::StitchedFunctionDescriptor* MTL4::StitchedFunctionDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4StitchedFunctionDescriptor)); + return _MTL4_msg_MTL4__StitchedFunctionDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4StitchedFunctionDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL4::StitchedFunctionDescriptor::functionDescriptors() const +_MTL4_INLINE MTL4::StitchedFunctionDescriptor* MTL4::StitchedFunctionDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionDescriptors)); + return _MTL4_msg_MTL4__StitchedFunctionDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionStitchingGraph* MTL4::StitchedFunctionDescriptor::functionGraph() const +_MTL4_INLINE MTL::FunctionStitchingGraph* MTL4::StitchedFunctionDescriptor::functionGraph() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionGraph)); + return _MTL4_msg_MTL__FunctionStitchingGraphp_functionGraph((const void*)this, nullptr); } -_MTL_INLINE MTL4::StitchedFunctionDescriptor* MTL4::StitchedFunctionDescriptor::init() +_MTL4_INLINE void MTL4::StitchedFunctionDescriptor::setFunctionGraph(MTL::FunctionStitchingGraph* functionGraph) { - return NS::Object::init(); + _MTL4_msg_v_setFunctionGraph__MTL__FunctionStitchingGraphp((const void*)this, nullptr, functionGraph); } -_MTL_INLINE void MTL4::StitchedFunctionDescriptor::setFunctionDescriptors(const NS::Array* functionDescriptors) +_MTL4_INLINE NS::Array* MTL4::StitchedFunctionDescriptor::functionDescriptors() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctionDescriptors_), functionDescriptors); + return _MTL4_msg_NS__Arrayp_functionDescriptors((const void*)this, nullptr); } -_MTL_INLINE void MTL4::StitchedFunctionDescriptor::setFunctionGraph(const MTL::FunctionStitchingGraph* functionGraph) +_MTL4_INLINE void MTL4::StitchedFunctionDescriptor::setFunctionDescriptors(NS::Array* functionDescriptors) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctionGraph_), functionGraph); + _MTL4_msg_v_setFunctionDescriptors__NS__Arrayp((const void*)this, nullptr, functionDescriptors); } diff --git a/thirdparty/metal-cpp/Metal/MTL4Structs.hpp b/thirdparty/metal-cpp/Metal/MTL4Structs.hpp new file mode 100644 index 000000000000..43a6c1221aa6 --- /dev/null +++ b/thirdparty/metal-cpp/Metal/MTL4Structs.hpp @@ -0,0 +1,44 @@ +#pragma once + +#include "MTL4Defines.hpp" +#include "../Foundation/NSTypes.hpp" + +namespace MTL { + enum SparseTextureMappingMode : NS::UInteger; +} + +namespace MTL4 { + +struct UpdateSparseTextureMappingOperation { + MTL::SparseTextureMappingMode mode; + MTL::Region textureRegion; + NS::UInteger textureLevel; + NS::UInteger textureSlice; + NS::UInteger heapOffset; +} _MTL4_PACKED; + +struct CopySparseTextureMappingOperation { + MTL::Region sourceRegion; + NS::UInteger sourceLevel; + NS::UInteger sourceSlice; + MTL::Origin destinationOrigin; + NS::UInteger destinationLevel; + NS::UInteger destinationSlice; +} _MTL4_PACKED; + +struct UpdateSparseBufferMappingOperation { + MTL::SparseTextureMappingMode mode; + NS::Range bufferRange; + NS::UInteger heapOffset; +} _MTL4_PACKED; + +struct CopySparseBufferMappingOperation { + NS::Range sourceRange; + NS::UInteger destinationOffset; +} _MTL4_PACKED; + +struct TimestampHeapEntry { + uint64_t timestamp; +} _MTL4_PACKED; + +} // MTL4 diff --git a/thirdparty/metal-cpp/Metal/MTL4TileRenderPipeline.hpp b/thirdparty/metal-cpp/Metal/MTL4TileRenderPipeline.hpp index dc74f484b4a4..b6d7b62cf654 100644 --- a/thirdparty/metal-cpp/Metal/MTL4TileRenderPipeline.hpp +++ b/thirdparty/metal-cpp/Metal/MTL4TileRenderPipeline.hpp @@ -1,173 +1,143 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTL4TileRenderPipeline.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4Bridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTL4PipelineState.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" +#include "MTLStructs.hpp" -namespace MTL4 -{ -class FunctionDescriptor; -class StaticLinkingDescriptor; -class TileRenderPipelineDescriptor; +namespace MTL { + class TileRenderPipelineColorAttachmentDescriptorArray; } - -namespace MTL -{ -class TileRenderPipelineColorAttachmentDescriptorArray; +namespace MTL4 { + class FunctionDescriptor; + class StaticLinkingDescriptor; } namespace MTL4 { -class TileRenderPipelineDescriptor : public NS::Copying + +class TileRenderPipelineDescriptor : public NS::Referencing { public: - static TileRenderPipelineDescriptor* alloc(); + static TileRenderPipelineDescriptor* alloc(); + TileRenderPipelineDescriptor* init() const; MTL::TileRenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; - - TileRenderPipelineDescriptor* init(); - NS::UInteger maxTotalThreadsPerThreadgroup() const; - NS::UInteger rasterSampleCount() const; - MTL::Size requiredThreadsPerThreadgroup() const; - void reset(); - void setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup); - void setRasterSampleCount(NS::UInteger rasterSampleCount); - void setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup); - - void setStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* staticLinkingDescriptor); - + void setStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* staticLinkingDescriptor); void setSupportBinaryLinking(bool supportBinaryLinking); - void setThreadgroupSizeMatchesTileSize(bool threadgroupSizeMatchesTileSize); - - void setTileFunctionDescriptor(const MTL4::FunctionDescriptor* tileFunctionDescriptor); - - StaticLinkingDescriptor* staticLinkingDescriptor() const; - + void setTileFunctionDescriptor(MTL4::FunctionDescriptor* tileFunctionDescriptor); + MTL4::StaticLinkingDescriptor* staticLinkingDescriptor() const; bool supportBinaryLinking() const; - bool threadgroupSizeMatchesTileSize() const; + MTL4::FunctionDescriptor* tileFunctionDescriptor() const; - FunctionDescriptor* tileFunctionDescriptor() const; }; -} -_MTL_INLINE MTL4::TileRenderPipelineDescriptor* MTL4::TileRenderPipelineDescriptor::alloc() +} // namespace MTL4 + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4TileRenderPipelineDescriptor; + +_MTL4_INLINE MTL4::TileRenderPipelineDescriptor* MTL4::TileRenderPipelineDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTL4TileRenderPipelineDescriptor)); + return _MTL4_msg_MTL4__TileRenderPipelineDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTL4TileRenderPipelineDescriptor, nullptr); } -_MTL_INLINE MTL::TileRenderPipelineColorAttachmentDescriptorArray* MTL4::TileRenderPipelineDescriptor::colorAttachments() const +_MTL4_INLINE MTL4::TileRenderPipelineDescriptor* MTL4::TileRenderPipelineDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(colorAttachments)); + return _MTL4_msg_MTL4__TileRenderPipelineDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL4::TileRenderPipelineDescriptor* MTL4::TileRenderPipelineDescriptor::init() +_MTL4_INLINE MTL4::FunctionDescriptor* MTL4::TileRenderPipelineDescriptor::tileFunctionDescriptor() const { - return NS::Object::init(); + return _MTL4_msg_MTL4__FunctionDescriptorp_tileFunctionDescriptor((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL4::TileRenderPipelineDescriptor::maxTotalThreadsPerThreadgroup() const +_MTL4_INLINE void MTL4::TileRenderPipelineDescriptor::setTileFunctionDescriptor(MTL4::FunctionDescriptor* tileFunctionDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerThreadgroup)); + _MTL4_msg_v_setTileFunctionDescriptor__MTL4__FunctionDescriptorp((const void*)this, nullptr, tileFunctionDescriptor); } -_MTL_INLINE NS::UInteger MTL4::TileRenderPipelineDescriptor::rasterSampleCount() const +_MTL4_INLINE NS::UInteger MTL4::TileRenderPipelineDescriptor::rasterSampleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rasterSampleCount)); + return _MTL4_msg_NS__UInteger_rasterSampleCount((const void*)this, nullptr); } -_MTL_INLINE MTL::Size MTL4::TileRenderPipelineDescriptor::requiredThreadsPerThreadgroup() const +_MTL4_INLINE void MTL4::TileRenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerThreadgroup)); + _MTL4_msg_v_setRasterSampleCount__NS__UInteger((const void*)this, nullptr, rasterSampleCount); } -_MTL_INLINE void MTL4::TileRenderPipelineDescriptor::reset() +_MTL4_INLINE MTL::TileRenderPipelineColorAttachmentDescriptorArray* MTL4::TileRenderPipelineDescriptor::colorAttachments() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + return _MTL4_msg_MTL__TileRenderPipelineColorAttachmentDescriptorArrayp_colorAttachments((const void*)this, nullptr); } -_MTL_INLINE void MTL4::TileRenderPipelineDescriptor::setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup) +_MTL4_INLINE bool MTL4::TileRenderPipelineDescriptor::threadgroupSizeMatchesTileSize() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadsPerThreadgroup_), maxTotalThreadsPerThreadgroup); + return _MTL4_msg_bool_threadgroupSizeMatchesTileSize((const void*)this, nullptr); } -_MTL_INLINE void MTL4::TileRenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) +_MTL4_INLINE void MTL4::TileRenderPipelineDescriptor::setThreadgroupSizeMatchesTileSize(bool threadgroupSizeMatchesTileSize) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterSampleCount_), rasterSampleCount); + _MTL4_msg_v_setThreadgroupSizeMatchesTileSize__bool((const void*)this, nullptr, threadgroupSizeMatchesTileSize); } -_MTL_INLINE void MTL4::TileRenderPipelineDescriptor::setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup) +_MTL4_INLINE NS::UInteger MTL4::TileRenderPipelineDescriptor::maxTotalThreadsPerThreadgroup() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRequiredThreadsPerThreadgroup_), requiredThreadsPerThreadgroup); + return _MTL4_msg_NS__UInteger_maxTotalThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE void MTL4::TileRenderPipelineDescriptor::setStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* staticLinkingDescriptor) +_MTL4_INLINE void MTL4::TileRenderPipelineDescriptor::setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStaticLinkingDescriptor_), staticLinkingDescriptor); + _MTL4_msg_v_setMaxTotalThreadsPerThreadgroup__NS__UInteger((const void*)this, nullptr, maxTotalThreadsPerThreadgroup); } -_MTL_INLINE void MTL4::TileRenderPipelineDescriptor::setSupportBinaryLinking(bool supportBinaryLinking) +_MTL4_INLINE MTL::Size MTL4::TileRenderPipelineDescriptor::requiredThreadsPerThreadgroup() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportBinaryLinking_), supportBinaryLinking); + return _MTL4_msg_MTL__Size_requiredThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE void MTL4::TileRenderPipelineDescriptor::setThreadgroupSizeMatchesTileSize(bool threadgroupSizeMatchesTileSize) +_MTL4_INLINE void MTL4::TileRenderPipelineDescriptor::setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadgroupSizeMatchesTileSize_), threadgroupSizeMatchesTileSize); + _MTL4_msg_v_setRequiredThreadsPerThreadgroup__MTL__Size((const void*)this, nullptr, requiredThreadsPerThreadgroup); } -_MTL_INLINE void MTL4::TileRenderPipelineDescriptor::setTileFunctionDescriptor(const MTL4::FunctionDescriptor* tileFunctionDescriptor) +_MTL4_INLINE MTL4::StaticLinkingDescriptor* MTL4::TileRenderPipelineDescriptor::staticLinkingDescriptor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileFunctionDescriptor_), tileFunctionDescriptor); + return _MTL4_msg_MTL4__StaticLinkingDescriptorp_staticLinkingDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::TileRenderPipelineDescriptor::staticLinkingDescriptor() const +_MTL4_INLINE void MTL4::TileRenderPipelineDescriptor::setStaticLinkingDescriptor(MTL4::StaticLinkingDescriptor* staticLinkingDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(staticLinkingDescriptor)); + _MTL4_msg_v_setStaticLinkingDescriptor__MTL4__StaticLinkingDescriptorp((const void*)this, nullptr, staticLinkingDescriptor); } -_MTL_INLINE bool MTL4::TileRenderPipelineDescriptor::supportBinaryLinking() const +_MTL4_INLINE bool MTL4::TileRenderPipelineDescriptor::supportBinaryLinking() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportBinaryLinking)); + return _MTL4_msg_bool_supportBinaryLinking((const void*)this, nullptr); } -_MTL_INLINE bool MTL4::TileRenderPipelineDescriptor::threadgroupSizeMatchesTileSize() const +_MTL4_INLINE void MTL4::TileRenderPipelineDescriptor::setSupportBinaryLinking(bool supportBinaryLinking) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadgroupSizeMatchesTileSize)); + _MTL4_msg_v_setSupportBinaryLinking__bool((const void*)this, nullptr, supportBinaryLinking); } -_MTL_INLINE MTL4::FunctionDescriptor* MTL4::TileRenderPipelineDescriptor::tileFunctionDescriptor() const +_MTL4_INLINE void MTL4::TileRenderPipelineDescriptor::reset() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileFunctionDescriptor)); + _MTL4_msg_v_reset((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLAccelerationStructure.hpp b/thirdparty/metal-cpp/Metal/MTLAccelerationStructure.hpp index d3457c392989..c2488728fc5b 100644 --- a/thirdparty/metal-cpp/Metal/MTLAccelerationStructure.hpp +++ b/thirdparty/metal-cpp/Metal/MTLAccelerationStructure.hpp @@ -1,55 +1,49 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLAccelerationStructure.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLAccelerationStructureTypes.hpp" -#include "MTLArgument.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLResource.hpp" -#include "MTLStageInputOutputDescriptor.hpp" -#include "MTLTypes.hpp" -#include -namespace MTL -{ -class AccelerationStructureBoundingBoxGeometryDescriptor; -class AccelerationStructureCurveGeometryDescriptor; -class AccelerationStructureDescriptor; -class AccelerationStructureGeometryDescriptor; -class AccelerationStructureMotionBoundingBoxGeometryDescriptor; -class AccelerationStructureMotionCurveGeometryDescriptor; -class AccelerationStructureMotionTriangleGeometryDescriptor; -class AccelerationStructureTriangleGeometryDescriptor; -class Buffer; -class IndirectInstanceAccelerationStructureDescriptor; -class InstanceAccelerationStructureDescriptor; -class MotionKeyframeData; -class PrimitiveAccelerationStructureDescriptor; +namespace MTL { + class Buffer; + enum AttributeFormat : NS::UInteger; + enum IndexType : NS::UInteger; +} +namespace NS { + class Array; + class String; } namespace MTL { + +_MTL_OPTIONS(NS::UInteger, AccelerationStructureRefitOptions) { + AccelerationStructureRefitOptionVertexData = (1 << 0), + AccelerationStructureRefitOptionPerPrimitiveData = (1 << 1), +}; + +_MTL_OPTIONS(NS::UInteger, AccelerationStructureUsage) { + AccelerationStructureUsageNone = 0, + AccelerationStructureUsageRefit = (1 << 0), + AccelerationStructureUsagePreferFastBuild = (1 << 1), + AccelerationStructureUsageExtendedLimits = (1 << 2), + AccelerationStructureUsagePreferFastIntersection = (1 << 4), + AccelerationStructureUsageMinimizeMemory = (1 << 5), +}; + +_MTL_OPTIONS(uint32_t, AccelerationStructureInstanceOptions) { + AccelerationStructureInstanceOptionNone = 0, + AccelerationStructureInstanceOptionDisableTriangleCulling = (1 << 0), + AccelerationStructureInstanceOptionTriangleFrontFacingWindingCounterClockwise = (1 << 1), + AccelerationStructureInstanceOptionOpaque = (1 << 2), + AccelerationStructureInstanceOptionNonOpaque = (1 << 3), +}; + _MTL_ENUM(NS::Integer, MatrixLayout) { MatrixLayoutColumnMajor = 0, MatrixLayoutRowMajor = 1, @@ -91,1797 +85,1599 @@ _MTL_ENUM(NS::Integer, TransformType) { TransformTypeComponent = 1, }; -_MTL_OPTIONS(NS::UInteger, AccelerationStructureRefitOptions) { - AccelerationStructureRefitOptionVertexData = 1, - AccelerationStructureRefitOptionPerPrimitiveData = 1 << 1, -}; - -_MTL_OPTIONS(NS::UInteger, AccelerationStructureUsage) { - AccelerationStructureUsageNone = 0, - AccelerationStructureUsageRefit = 1, - AccelerationStructureUsagePreferFastBuild = 1 << 1, - AccelerationStructureUsageExtendedLimits = 1 << 2, - AccelerationStructureUsagePreferFastIntersection = 1 << 4, - AccelerationStructureUsageMinimizeMemory = 1 << 5, -}; - -_MTL_OPTIONS(uint32_t, AccelerationStructureInstanceOptions) { - AccelerationStructureInstanceOptionNone = 0, - AccelerationStructureInstanceOptionDisableTriangleCulling = 1, - AccelerationStructureInstanceOptionTriangleFrontFacingWindingCounterClockwise = 1 << 1, - AccelerationStructureInstanceOptionOpaque = 1 << 2, - AccelerationStructureInstanceOptionNonOpaque = 1 << 3, -}; -struct AccelerationStructureInstanceDescriptor -{ - MTL::PackedFloat4x3 transformationMatrix; - MTL::AccelerationStructureInstanceOptions options; - uint32_t mask; - uint32_t intersectionFunctionTableOffset; - uint32_t accelerationStructureIndex; -} _MTL_PACKED; - -struct AccelerationStructureUserIDInstanceDescriptor -{ - MTL::PackedFloat4x3 transformationMatrix; - MTL::AccelerationStructureInstanceOptions options; - uint32_t mask; - uint32_t intersectionFunctionTableOffset; - uint32_t accelerationStructureIndex; - uint32_t userID; -} _MTL_PACKED; - -struct AccelerationStructureMotionInstanceDescriptor -{ - MTL::AccelerationStructureInstanceOptions options; - uint32_t mask; - uint32_t intersectionFunctionTableOffset; - uint32_t accelerationStructureIndex; - uint32_t userID; - uint32_t motionTransformsStartIndex; - uint32_t motionTransformsCount; - MTL::MotionBorderMode motionStartBorderMode; - MTL::MotionBorderMode motionEndBorderMode; - float motionStartTime; - float motionEndTime; -} _MTL_PACKED; - -struct IndirectAccelerationStructureInstanceDescriptor -{ - MTL::PackedFloat4x3 transformationMatrix; - MTL::AccelerationStructureInstanceOptions options; - uint32_t mask; - uint32_t intersectionFunctionTableOffset; - uint32_t userID; - MTL::ResourceID accelerationStructureID; -} _MTL_PACKED; - -struct IndirectAccelerationStructureMotionInstanceDescriptor -{ - MTL::AccelerationStructureInstanceOptions options; - uint32_t mask; - uint32_t intersectionFunctionTableOffset; - uint32_t userID; - MTL::ResourceID accelerationStructureID; - uint32_t motionTransformsStartIndex; - uint32_t motionTransformsCount; - MTL::MotionBorderMode motionStartBorderMode; - MTL::MotionBorderMode motionEndBorderMode; - float motionStartTime; - float motionEndTime; -} _MTL_PACKED; +class AccelerationStructureDescriptor; +class AccelerationStructureGeometryDescriptor; +class PrimitiveAccelerationStructureDescriptor; +class AccelerationStructureTriangleGeometryDescriptor; +class AccelerationStructureBoundingBoxGeometryDescriptor; +class MotionKeyframeData; +class AccelerationStructureMotionTriangleGeometryDescriptor; +class AccelerationStructureMotionBoundingBoxGeometryDescriptor; +class AccelerationStructureCurveGeometryDescriptor; +class AccelerationStructureMotionCurveGeometryDescriptor; +class InstanceAccelerationStructureDescriptor; +class IndirectInstanceAccelerationStructureDescriptor; +class AccelerationStructure; class AccelerationStructureDescriptor : public NS::Copying { public: static AccelerationStructureDescriptor* alloc(); + AccelerationStructureDescriptor* init() const; - AccelerationStructureDescriptor* init(); + void setUsage(MTL::AccelerationStructureUsage usage); + MTL::AccelerationStructureUsage usage() const; - void setUsage(MTL::AccelerationStructureUsage usage); - AccelerationStructureUsage usage() const; }; + class AccelerationStructureGeometryDescriptor : public NS::Copying { public: static AccelerationStructureGeometryDescriptor* alloc(); + AccelerationStructureGeometryDescriptor* init() const; + + bool allowDuplicateIntersectionFunctionInvocation() const; + NS::UInteger intersectionFunctionTableOffset() const; + NS::String* label() const; + bool opaque() const; + MTL::Buffer* primitiveDataBuffer() const; + NS::UInteger primitiveDataBufferOffset() const; + NS::UInteger primitiveDataElementSize() const; + NS::UInteger primitiveDataStride() const; + void setAllowDuplicateIntersectionFunctionInvocation(bool allowDuplicateIntersectionFunctionInvocation); + void setIntersectionFunctionTableOffset(NS::UInteger intersectionFunctionTableOffset); + void setLabel(NS::String* label); + void setOpaque(bool opaque); + void setPrimitiveDataBuffer(MTL::Buffer* primitiveDataBuffer); + void setPrimitiveDataBufferOffset(NS::UInteger primitiveDataBufferOffset); + void setPrimitiveDataElementSize(NS::UInteger primitiveDataElementSize); + void setPrimitiveDataStride(NS::UInteger primitiveDataStride); - bool allowDuplicateIntersectionFunctionInvocation() const; - - AccelerationStructureGeometryDescriptor* init(); - - NS::UInteger intersectionFunctionTableOffset() const; - - NS::String* label() const; - - bool opaque() const; - - Buffer* primitiveDataBuffer() const; - NS::UInteger primitiveDataBufferOffset() const; - - NS::UInteger primitiveDataElementSize() const; - - NS::UInteger primitiveDataStride() const; - - void setAllowDuplicateIntersectionFunctionInvocation(bool allowDuplicateIntersectionFunctionInvocation); - - void setIntersectionFunctionTableOffset(NS::UInteger intersectionFunctionTableOffset); - - void setLabel(const NS::String* label); - - void setOpaque(bool opaque); - - void setPrimitiveDataBuffer(const MTL::Buffer* primitiveDataBuffer); - void setPrimitiveDataBufferOffset(NS::UInteger primitiveDataBufferOffset); - - void setPrimitiveDataElementSize(NS::UInteger primitiveDataElementSize); - - void setPrimitiveDataStride(NS::UInteger primitiveDataStride); }; -class PrimitiveAccelerationStructureDescriptor : public NS::Copying + +class PrimitiveAccelerationStructureDescriptor : public NS::Referencing { public: static PrimitiveAccelerationStructureDescriptor* alloc(); + PrimitiveAccelerationStructureDescriptor* init() const; + + static MTL::PrimitiveAccelerationStructureDescriptor* descriptor(); + + NS::Array* geometryDescriptors() const; + MTL::MotionBorderMode motionEndBorderMode() const; + float motionEndTime() const; + NS::UInteger motionKeyframeCount() const; + MTL::MotionBorderMode motionStartBorderMode() const; + float motionStartTime() const; + void setGeometryDescriptors(NS::Array* geometryDescriptors); + void setMotionEndBorderMode(MTL::MotionBorderMode motionEndBorderMode); + void setMotionEndTime(float motionEndTime); + void setMotionKeyframeCount(NS::UInteger motionKeyframeCount); + void setMotionStartBorderMode(MTL::MotionBorderMode motionStartBorderMode); + void setMotionStartTime(float motionStartTime); - static PrimitiveAccelerationStructureDescriptor* descriptor(); - NS::Array* geometryDescriptors() const; - - PrimitiveAccelerationStructureDescriptor* init(); - - MotionBorderMode motionEndBorderMode() const; - - float motionEndTime() const; - - NS::UInteger motionKeyframeCount() const; - - MotionBorderMode motionStartBorderMode() const; - - float motionStartTime() const; - - void setGeometryDescriptors(const NS::Array* geometryDescriptors); - - void setMotionEndBorderMode(MTL::MotionBorderMode motionEndBorderMode); - - void setMotionEndTime(float motionEndTime); - - void setMotionKeyframeCount(NS::UInteger motionKeyframeCount); - - void setMotionStartBorderMode(MTL::MotionBorderMode motionStartBorderMode); - - void setMotionStartTime(float motionStartTime); }; -class AccelerationStructureTriangleGeometryDescriptor : public NS::Copying + +class AccelerationStructureTriangleGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureTriangleGeometryDescriptor* alloc(); + AccelerationStructureTriangleGeometryDescriptor* init() const; + + static MTL::AccelerationStructureTriangleGeometryDescriptor* descriptor(); + + MTL::Buffer* indexBuffer() const; + NS::UInteger indexBufferOffset() const; + MTL::IndexType indexType() const; + void setIndexBuffer(MTL::Buffer* indexBuffer); + void setIndexBufferOffset(NS::UInteger indexBufferOffset); + void setIndexType(MTL::IndexType indexType); + void setTransformationMatrixBuffer(MTL::Buffer* transformationMatrixBuffer); + void setTransformationMatrixBufferOffset(NS::UInteger transformationMatrixBufferOffset); + void setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout); + void setTriangleCount(NS::UInteger triangleCount); + void setVertexBuffer(MTL::Buffer* vertexBuffer); + void setVertexBufferOffset(NS::UInteger vertexBufferOffset); + void setVertexFormat(MTL::AttributeFormat vertexFormat); + void setVertexStride(NS::UInteger vertexStride); + MTL::Buffer* transformationMatrixBuffer() const; + NS::UInteger transformationMatrixBufferOffset() const; + MTL::MatrixLayout transformationMatrixLayout() const; + NS::UInteger triangleCount() const; + MTL::Buffer* vertexBuffer() const; + NS::UInteger vertexBufferOffset() const; + MTL::AttributeFormat vertexFormat() const; + NS::UInteger vertexStride() const; - static AccelerationStructureTriangleGeometryDescriptor* descriptor(); - - Buffer* indexBuffer() const; - NS::UInteger indexBufferOffset() const; - - IndexType indexType() const; - - AccelerationStructureTriangleGeometryDescriptor* init(); - - void setIndexBuffer(const MTL::Buffer* indexBuffer); - void setIndexBufferOffset(NS::UInteger indexBufferOffset); - - void setIndexType(MTL::IndexType indexType); - - void setTransformationMatrixBuffer(const MTL::Buffer* transformationMatrixBuffer); - void setTransformationMatrixBufferOffset(NS::UInteger transformationMatrixBufferOffset); - - void setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout); - - void setTriangleCount(NS::UInteger triangleCount); - - void setVertexBuffer(const MTL::Buffer* vertexBuffer); - void setVertexBufferOffset(NS::UInteger vertexBufferOffset); - - void setVertexFormat(MTL::AttributeFormat vertexFormat); - - void setVertexStride(NS::UInteger vertexStride); - - Buffer* transformationMatrixBuffer() const; - NS::UInteger transformationMatrixBufferOffset() const; - - MatrixLayout transformationMatrixLayout() const; - - NS::UInteger triangleCount() const; - - Buffer* vertexBuffer() const; - NS::UInteger vertexBufferOffset() const; - - AttributeFormat vertexFormat() const; - - NS::UInteger vertexStride() const; }; -class AccelerationStructureBoundingBoxGeometryDescriptor : public NS::Copying + +class AccelerationStructureBoundingBoxGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureBoundingBoxGeometryDescriptor* alloc(); + AccelerationStructureBoundingBoxGeometryDescriptor* init() const; - Buffer* boundingBoxBuffer() const; - NS::UInteger boundingBoxBufferOffset() const; - - NS::UInteger boundingBoxCount() const; - - NS::UInteger boundingBoxStride() const; - - static AccelerationStructureBoundingBoxGeometryDescriptor* descriptor(); - - AccelerationStructureBoundingBoxGeometryDescriptor* init(); - - void setBoundingBoxBuffer(const MTL::Buffer* boundingBoxBuffer); - void setBoundingBoxBufferOffset(NS::UInteger boundingBoxBufferOffset); + static MTL::AccelerationStructureBoundingBoxGeometryDescriptor* descriptor(); - void setBoundingBoxCount(NS::UInteger boundingBoxCount); + MTL::Buffer* boundingBoxBuffer() const; + NS::UInteger boundingBoxBufferOffset() const; + NS::UInteger boundingBoxCount() const; + NS::UInteger boundingBoxStride() const; + void setBoundingBoxBuffer(MTL::Buffer* boundingBoxBuffer); + void setBoundingBoxBufferOffset(NS::UInteger boundingBoxBufferOffset); + void setBoundingBoxCount(NS::UInteger boundingBoxCount); + void setBoundingBoxStride(NS::UInteger boundingBoxStride); - void setBoundingBoxStride(NS::UInteger boundingBoxStride); }; + class MotionKeyframeData : public NS::Referencing { public: static MotionKeyframeData* alloc(); + MotionKeyframeData* init() const; - Buffer* buffer() const; - - static MotionKeyframeData* data(); - - MotionKeyframeData* init(); + static MTL::MotionKeyframeData* data(); - NS::UInteger offset() const; + MTL::Buffer* buffer() const; + NS::UInteger offset() const; + void setBuffer(MTL::Buffer* buffer); + void setOffset(NS::UInteger offset); - void setBuffer(const MTL::Buffer* buffer); - - void setOffset(NS::UInteger offset); }; -class AccelerationStructureMotionTriangleGeometryDescriptor : public NS::Copying + +class AccelerationStructureMotionTriangleGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureMotionTriangleGeometryDescriptor* alloc(); + AccelerationStructureMotionTriangleGeometryDescriptor* init() const; + + static MTL::AccelerationStructureMotionTriangleGeometryDescriptor* descriptor(); + + MTL::Buffer* indexBuffer() const; + NS::UInteger indexBufferOffset() const; + MTL::IndexType indexType() const; + void setIndexBuffer(MTL::Buffer* indexBuffer); + void setIndexBufferOffset(NS::UInteger indexBufferOffset); + void setIndexType(MTL::IndexType indexType); + void setTransformationMatrixBuffer(MTL::Buffer* transformationMatrixBuffer); + void setTransformationMatrixBufferOffset(NS::UInteger transformationMatrixBufferOffset); + void setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout); + void setTriangleCount(NS::UInteger triangleCount); + void setVertexBuffers(NS::Array* vertexBuffers); + void setVertexFormat(MTL::AttributeFormat vertexFormat); + void setVertexStride(NS::UInteger vertexStride); + MTL::Buffer* transformationMatrixBuffer() const; + NS::UInteger transformationMatrixBufferOffset() const; + MTL::MatrixLayout transformationMatrixLayout() const; + NS::UInteger triangleCount() const; + NS::Array* vertexBuffers() const; + MTL::AttributeFormat vertexFormat() const; + NS::UInteger vertexStride() const; - static AccelerationStructureMotionTriangleGeometryDescriptor* descriptor(); - - Buffer* indexBuffer() const; - NS::UInteger indexBufferOffset() const; - - IndexType indexType() const; - - AccelerationStructureMotionTriangleGeometryDescriptor* init(); - - void setIndexBuffer(const MTL::Buffer* indexBuffer); - void setIndexBufferOffset(NS::UInteger indexBufferOffset); - - void setIndexType(MTL::IndexType indexType); - - void setTransformationMatrixBuffer(const MTL::Buffer* transformationMatrixBuffer); - void setTransformationMatrixBufferOffset(NS::UInteger transformationMatrixBufferOffset); - - void setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout); - - void setTriangleCount(NS::UInteger triangleCount); - - void setVertexBuffers(const NS::Array* vertexBuffers); - - void setVertexFormat(MTL::AttributeFormat vertexFormat); - - void setVertexStride(NS::UInteger vertexStride); - - Buffer* transformationMatrixBuffer() const; - NS::UInteger transformationMatrixBufferOffset() const; - - MatrixLayout transformationMatrixLayout() const; - - NS::UInteger triangleCount() const; - - NS::Array* vertexBuffers() const; - - AttributeFormat vertexFormat() const; - - NS::UInteger vertexStride() const; }; -class AccelerationStructureMotionBoundingBoxGeometryDescriptor : public NS::Copying + +class AccelerationStructureMotionBoundingBoxGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureMotionBoundingBoxGeometryDescriptor* alloc(); + AccelerationStructureMotionBoundingBoxGeometryDescriptor* init() const; - NS::Array* boundingBoxBuffers() const; - - NS::UInteger boundingBoxCount() const; - - NS::UInteger boundingBoxStride() const; - - static AccelerationStructureMotionBoundingBoxGeometryDescriptor* descriptor(); - - AccelerationStructureMotionBoundingBoxGeometryDescriptor* init(); - - void setBoundingBoxBuffers(const NS::Array* boundingBoxBuffers); + static MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* descriptor(); - void setBoundingBoxCount(NS::UInteger boundingBoxCount); + NS::Array* boundingBoxBuffers() const; + NS::UInteger boundingBoxCount() const; + NS::UInteger boundingBoxStride() const; + void setBoundingBoxBuffers(NS::Array* boundingBoxBuffers); + void setBoundingBoxCount(NS::UInteger boundingBoxCount); + void setBoundingBoxStride(NS::UInteger boundingBoxStride); - void setBoundingBoxStride(NS::UInteger boundingBoxStride); }; -class AccelerationStructureCurveGeometryDescriptor : public NS::Copying + +class AccelerationStructureCurveGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureCurveGeometryDescriptor* alloc(); + AccelerationStructureCurveGeometryDescriptor* init() const; + + static MTL::AccelerationStructureCurveGeometryDescriptor* descriptor(); + + MTL::Buffer* controlPointBuffer() const; + NS::UInteger controlPointBufferOffset() const; + NS::UInteger controlPointCount() const; + MTL::AttributeFormat controlPointFormat() const; + NS::UInteger controlPointStride() const; + MTL::CurveBasis curveBasis() const; + MTL::CurveEndCaps curveEndCaps() const; + MTL::CurveType curveType() const; + MTL::Buffer* indexBuffer() const; + NS::UInteger indexBufferOffset() const; + MTL::IndexType indexType() const; + MTL::Buffer* radiusBuffer() const; + NS::UInteger radiusBufferOffset() const; + MTL::AttributeFormat radiusFormat() const; + NS::UInteger radiusStride() const; + NS::UInteger segmentControlPointCount() const; + NS::UInteger segmentCount() const; + void setControlPointBuffer(MTL::Buffer* controlPointBuffer); + void setControlPointBufferOffset(NS::UInteger controlPointBufferOffset); + void setControlPointCount(NS::UInteger controlPointCount); + void setControlPointFormat(MTL::AttributeFormat controlPointFormat); + void setControlPointStride(NS::UInteger controlPointStride); + void setCurveBasis(MTL::CurveBasis curveBasis); + void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); + void setCurveType(MTL::CurveType curveType); + void setIndexBuffer(MTL::Buffer* indexBuffer); + void setIndexBufferOffset(NS::UInteger indexBufferOffset); + void setIndexType(MTL::IndexType indexType); + void setRadiusBuffer(MTL::Buffer* radiusBuffer); + void setRadiusBufferOffset(NS::UInteger radiusBufferOffset); + void setRadiusFormat(MTL::AttributeFormat radiusFormat); + void setRadiusStride(NS::UInteger radiusStride); + void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); + void setSegmentCount(NS::UInteger segmentCount); - Buffer* controlPointBuffer() const; - NS::UInteger controlPointBufferOffset() const; - - NS::UInteger controlPointCount() const; - - AttributeFormat controlPointFormat() const; - - NS::UInteger controlPointStride() const; - - CurveBasis curveBasis() const; - - CurveEndCaps curveEndCaps() const; - - CurveType curveType() const; - - static AccelerationStructureCurveGeometryDescriptor* descriptor(); - - Buffer* indexBuffer() const; - NS::UInteger indexBufferOffset() const; - - IndexType indexType() const; - - AccelerationStructureCurveGeometryDescriptor* init(); - - Buffer* radiusBuffer() const; - NS::UInteger radiusBufferOffset() const; - - AttributeFormat radiusFormat() const; - - NS::UInteger radiusStride() const; - - NS::UInteger segmentControlPointCount() const; - - NS::UInteger segmentCount() const; - - void setControlPointBuffer(const MTL::Buffer* controlPointBuffer); - void setControlPointBufferOffset(NS::UInteger controlPointBufferOffset); - - void setControlPointCount(NS::UInteger controlPointCount); - - void setControlPointFormat(MTL::AttributeFormat controlPointFormat); - - void setControlPointStride(NS::UInteger controlPointStride); - - void setCurveBasis(MTL::CurveBasis curveBasis); - - void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); - - void setCurveType(MTL::CurveType curveType); - - void setIndexBuffer(const MTL::Buffer* indexBuffer); - void setIndexBufferOffset(NS::UInteger indexBufferOffset); - - void setIndexType(MTL::IndexType indexType); - - void setRadiusBuffer(const MTL::Buffer* radiusBuffer); - void setRadiusBufferOffset(NS::UInteger radiusBufferOffset); - - void setRadiusFormat(MTL::AttributeFormat radiusFormat); - - void setRadiusStride(NS::UInteger radiusStride); - - void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); - - void setSegmentCount(NS::UInteger segmentCount); }; -class AccelerationStructureMotionCurveGeometryDescriptor : public NS::Copying + +class AccelerationStructureMotionCurveGeometryDescriptor : public NS::Referencing { public: static AccelerationStructureMotionCurveGeometryDescriptor* alloc(); + AccelerationStructureMotionCurveGeometryDescriptor* init() const; + + static MTL::AccelerationStructureMotionCurveGeometryDescriptor* descriptor(); + + NS::Array* controlPointBuffers() const; + NS::UInteger controlPointCount() const; + MTL::AttributeFormat controlPointFormat() const; + NS::UInteger controlPointStride() const; + MTL::CurveBasis curveBasis() const; + MTL::CurveEndCaps curveEndCaps() const; + MTL::CurveType curveType() const; + MTL::Buffer* indexBuffer() const; + NS::UInteger indexBufferOffset() const; + MTL::IndexType indexType() const; + NS::Array* radiusBuffers() const; + MTL::AttributeFormat radiusFormat() const; + NS::UInteger radiusStride() const; + NS::UInteger segmentControlPointCount() const; + NS::UInteger segmentCount() const; + void setControlPointBuffers(NS::Array* controlPointBuffers); + void setControlPointCount(NS::UInteger controlPointCount); + void setControlPointFormat(MTL::AttributeFormat controlPointFormat); + void setControlPointStride(NS::UInteger controlPointStride); + void setCurveBasis(MTL::CurveBasis curveBasis); + void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); + void setCurveType(MTL::CurveType curveType); + void setIndexBuffer(MTL::Buffer* indexBuffer); + void setIndexBufferOffset(NS::UInteger indexBufferOffset); + void setIndexType(MTL::IndexType indexType); + void setRadiusBuffers(NS::Array* radiusBuffers); + void setRadiusFormat(MTL::AttributeFormat radiusFormat); + void setRadiusStride(NS::UInteger radiusStride); + void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); + void setSegmentCount(NS::UInteger segmentCount); - NS::Array* controlPointBuffers() const; - - NS::UInteger controlPointCount() const; - - AttributeFormat controlPointFormat() const; - - NS::UInteger controlPointStride() const; - - CurveBasis curveBasis() const; - - CurveEndCaps curveEndCaps() const; - - CurveType curveType() const; - - static AccelerationStructureMotionCurveGeometryDescriptor* descriptor(); - - Buffer* indexBuffer() const; - NS::UInteger indexBufferOffset() const; - - IndexType indexType() const; - - AccelerationStructureMotionCurveGeometryDescriptor* init(); - - NS::Array* radiusBuffers() const; - - AttributeFormat radiusFormat() const; - - NS::UInteger radiusStride() const; - - NS::UInteger segmentControlPointCount() const; - - NS::UInteger segmentCount() const; - - void setControlPointBuffers(const NS::Array* controlPointBuffers); - - void setControlPointCount(NS::UInteger controlPointCount); - - void setControlPointFormat(MTL::AttributeFormat controlPointFormat); - - void setControlPointStride(NS::UInteger controlPointStride); - - void setCurveBasis(MTL::CurveBasis curveBasis); - - void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); - - void setCurveType(MTL::CurveType curveType); - - void setIndexBuffer(const MTL::Buffer* indexBuffer); - void setIndexBufferOffset(NS::UInteger indexBufferOffset); - - void setIndexType(MTL::IndexType indexType); - - void setRadiusBuffers(const NS::Array* radiusBuffers); - - void setRadiusFormat(MTL::AttributeFormat radiusFormat); - - void setRadiusStride(NS::UInteger radiusStride); - - void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); - - void setSegmentCount(NS::UInteger segmentCount); }; -class InstanceAccelerationStructureDescriptor : public NS::Copying + +class InstanceAccelerationStructureDescriptor : public NS::Referencing { public: static InstanceAccelerationStructureDescriptor* alloc(); + InstanceAccelerationStructureDescriptor* init() const; + + static MTL::InstanceAccelerationStructureDescriptor* descriptor(); + + NS::UInteger instanceCount() const; + MTL::Buffer* instanceDescriptorBuffer() const; + NS::UInteger instanceDescriptorBufferOffset() const; + NS::UInteger instanceDescriptorStride() const; + MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType() const; + MTL::MatrixLayout instanceTransformationMatrixLayout() const; + NS::Array* instancedAccelerationStructures() const; + MTL::Buffer* motionTransformBuffer() const; + NS::UInteger motionTransformBufferOffset() const; + NS::UInteger motionTransformCount() const; + NS::UInteger motionTransformStride() const; + MTL::TransformType motionTransformType() const; + void setInstanceCount(NS::UInteger instanceCount); + void setInstanceDescriptorBuffer(MTL::Buffer* instanceDescriptorBuffer); + void setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset); + void setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride); + void setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType); + void setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout); + void setInstancedAccelerationStructures(NS::Array* instancedAccelerationStructures); + void setMotionTransformBuffer(MTL::Buffer* motionTransformBuffer); + void setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset); + void setMotionTransformCount(NS::UInteger motionTransformCount); + void setMotionTransformStride(NS::UInteger motionTransformStride); + void setMotionTransformType(MTL::TransformType motionTransformType); - static InstanceAccelerationStructureDescriptor* descriptor(); - - InstanceAccelerationStructureDescriptor* init(); - - NS::UInteger instanceCount() const; - - Buffer* instanceDescriptorBuffer() const; - NS::UInteger instanceDescriptorBufferOffset() const; - - NS::UInteger instanceDescriptorStride() const; - - AccelerationStructureInstanceDescriptorType instanceDescriptorType() const; - - MatrixLayout instanceTransformationMatrixLayout() const; - - NS::Array* instancedAccelerationStructures() const; - - Buffer* motionTransformBuffer() const; - NS::UInteger motionTransformBufferOffset() const; - - NS::UInteger motionTransformCount() const; - - NS::UInteger motionTransformStride() const; - - TransformType motionTransformType() const; - - void setInstanceCount(NS::UInteger instanceCount); - - void setInstanceDescriptorBuffer(const MTL::Buffer* instanceDescriptorBuffer); - void setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset); - - void setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride); - - void setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType); - - void setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout); - - void setInstancedAccelerationStructures(const NS::Array* instancedAccelerationStructures); - - void setMotionTransformBuffer(const MTL::Buffer* motionTransformBuffer); - void setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset); - - void setMotionTransformCount(NS::UInteger motionTransformCount); - - void setMotionTransformStride(NS::UInteger motionTransformStride); - - void setMotionTransformType(MTL::TransformType motionTransformType); }; -class IndirectInstanceAccelerationStructureDescriptor : public NS::Copying + +class IndirectInstanceAccelerationStructureDescriptor : public NS::Referencing { public: static IndirectInstanceAccelerationStructureDescriptor* alloc(); + IndirectInstanceAccelerationStructureDescriptor* init() const; + + static MTL::IndirectInstanceAccelerationStructureDescriptor* descriptor(); + + MTL::Buffer* instanceCountBuffer() const; + NS::UInteger instanceCountBufferOffset() const; + MTL::Buffer* instanceDescriptorBuffer() const; + NS::UInteger instanceDescriptorBufferOffset() const; + NS::UInteger instanceDescriptorStride() const; + MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType() const; + MTL::MatrixLayout instanceTransformationMatrixLayout() const; + NS::UInteger maxInstanceCount() const; + NS::UInteger maxMotionTransformCount() const; + MTL::Buffer* motionTransformBuffer() const; + NS::UInteger motionTransformBufferOffset() const; + MTL::Buffer* motionTransformCountBuffer() const; + NS::UInteger motionTransformCountBufferOffset() const; + NS::UInteger motionTransformStride() const; + MTL::TransformType motionTransformType() const; + void setInstanceCountBuffer(MTL::Buffer* instanceCountBuffer); + void setInstanceCountBufferOffset(NS::UInteger instanceCountBufferOffset); + void setInstanceDescriptorBuffer(MTL::Buffer* instanceDescriptorBuffer); + void setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset); + void setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride); + void setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType); + void setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout); + void setMaxInstanceCount(NS::UInteger maxInstanceCount); + void setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount); + void setMotionTransformBuffer(MTL::Buffer* motionTransformBuffer); + void setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset); + void setMotionTransformCountBuffer(MTL::Buffer* motionTransformCountBuffer); + void setMotionTransformCountBufferOffset(NS::UInteger motionTransformCountBufferOffset); + void setMotionTransformStride(NS::UInteger motionTransformStride); + void setMotionTransformType(MTL::TransformType motionTransformType); - static IndirectInstanceAccelerationStructureDescriptor* descriptor(); - - IndirectInstanceAccelerationStructureDescriptor* init(); - - Buffer* instanceCountBuffer() const; - NS::UInteger instanceCountBufferOffset() const; - - Buffer* instanceDescriptorBuffer() const; - NS::UInteger instanceDescriptorBufferOffset() const; - - NS::UInteger instanceDescriptorStride() const; - - AccelerationStructureInstanceDescriptorType instanceDescriptorType() const; - - MatrixLayout instanceTransformationMatrixLayout() const; - - NS::UInteger maxInstanceCount() const; - - NS::UInteger maxMotionTransformCount() const; - - Buffer* motionTransformBuffer() const; - NS::UInteger motionTransformBufferOffset() const; - - Buffer* motionTransformCountBuffer() const; - NS::UInteger motionTransformCountBufferOffset() const; - - NS::UInteger motionTransformStride() const; - - TransformType motionTransformType() const; - - void setInstanceCountBuffer(const MTL::Buffer* instanceCountBuffer); - void setInstanceCountBufferOffset(NS::UInteger instanceCountBufferOffset); - - void setInstanceDescriptorBuffer(const MTL::Buffer* instanceDescriptorBuffer); - void setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset); - - void setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride); - - void setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType); - - void setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout); +}; - void setMaxInstanceCount(NS::UInteger maxInstanceCount); +class AccelerationStructure : public NS::Referencing +{ +public: + MTL::ResourceID gpuResourceID() const; + NS::UInteger size() const; - void setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount); +}; - void setMotionTransformBuffer(const MTL::Buffer* motionTransformBuffer); - void setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset); +} // namespace MTL - void setMotionTransformCountBuffer(const MTL::Buffer* motionTransformCountBuffer); - void setMotionTransformCountBufferOffset(NS::UInteger motionTransformCountBufferOffset); +// --- Class symbols + inline implementations --- - void setMotionTransformStride(NS::UInteger motionTransformStride); +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructureDescriptor; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructureGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTLPrimitiveAccelerationStructureDescriptor; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructureTriangleGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructureBoundingBoxGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTLMotionKeyframeData; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructureMotionTriangleGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructureCurveGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructureMotionCurveGeometryDescriptor; +extern "C" void *OBJC_CLASS_$_MTLInstanceAccelerationStructureDescriptor; +extern "C" void *OBJC_CLASS_$_MTLIndirectInstanceAccelerationStructureDescriptor; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructure; - void setMotionTransformType(MTL::TransformType motionTransformType); -}; -class AccelerationStructure : public NS::Referencing +_MTL_INLINE MTL::AccelerationStructureDescriptor* MTL::AccelerationStructureDescriptor::alloc() { -public: - ResourceID gpuResourceID() const; - - NS::UInteger size() const; -}; - + return _MTL_msg_MTL__AccelerationStructureDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructureDescriptor, nullptr); } -_MTL_INLINE MTL::AccelerationStructureDescriptor* MTL::AccelerationStructureDescriptor::alloc() +_MTL_INLINE MTL::AccelerationStructureDescriptor* MTL::AccelerationStructureDescriptor::init() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureDescriptor)); + return _MTL_msg_MTL__AccelerationStructureDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureDescriptor* MTL::AccelerationStructureDescriptor::init() +_MTL_INLINE MTL::AccelerationStructureUsage MTL::AccelerationStructureDescriptor::usage() const { - return NS::Object::init(); + return _MTL_msg_MTL__AccelerationStructureUsage_usage((const void*)this, nullptr); } _MTL_INLINE void MTL::AccelerationStructureDescriptor::setUsage(MTL::AccelerationStructureUsage usage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setUsage_), usage); + _MTL_msg_v_setUsage__MTL__AccelerationStructureUsage((const void*)this, nullptr, usage); } -_MTL_INLINE MTL::AccelerationStructureUsage MTL::AccelerationStructureDescriptor::usage() const +_MTL_INLINE MTL::AccelerationStructureGeometryDescriptor* MTL::AccelerationStructureGeometryDescriptor::alloc() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(usage)); + return _MTL_msg_MTL__AccelerationStructureGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructureGeometryDescriptor, nullptr); } -_MTL_INLINE MTL::AccelerationStructureGeometryDescriptor* MTL::AccelerationStructureGeometryDescriptor::alloc() +_MTL_INLINE MTL::AccelerationStructureGeometryDescriptor* MTL::AccelerationStructureGeometryDescriptor::init() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureGeometryDescriptor)); + return _MTL_msg_MTL__AccelerationStructureGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE bool MTL::AccelerationStructureGeometryDescriptor::allowDuplicateIntersectionFunctionInvocation() const +_MTL_INLINE NS::UInteger MTL::AccelerationStructureGeometryDescriptor::intersectionFunctionTableOffset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allowDuplicateIntersectionFunctionInvocation)); + return _MTL_msg_NS__UInteger_intersectionFunctionTableOffset((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureGeometryDescriptor* MTL::AccelerationStructureGeometryDescriptor::init() +_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setIntersectionFunctionTableOffset(NS::UInteger intersectionFunctionTableOffset) { - return NS::Object::init(); + _MTL_msg_v_setIntersectionFunctionTableOffset__NS__UInteger((const void*)this, nullptr, intersectionFunctionTableOffset); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureGeometryDescriptor::intersectionFunctionTableOffset() const +_MTL_INLINE bool MTL::AccelerationStructureGeometryDescriptor::opaque() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(intersectionFunctionTableOffset)); + return _MTL_msg_bool_opaque((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::AccelerationStructureGeometryDescriptor::label() const +_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setOpaque(bool opaque) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL_msg_v_setOpaque__bool((const void*)this, nullptr, opaque); } -_MTL_INLINE bool MTL::AccelerationStructureGeometryDescriptor::opaque() const +_MTL_INLINE bool MTL::AccelerationStructureGeometryDescriptor::allowDuplicateIntersectionFunctionInvocation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(opaque)); + return _MTL_msg_bool_allowDuplicateIntersectionFunctionInvocation((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureGeometryDescriptor::primitiveDataBuffer() const +_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setAllowDuplicateIntersectionFunctionInvocation(bool allowDuplicateIntersectionFunctionInvocation) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(primitiveDataBuffer)); + _MTL_msg_v_setAllowDuplicateIntersectionFunctionInvocation__bool((const void*)this, nullptr, allowDuplicateIntersectionFunctionInvocation); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureGeometryDescriptor::primitiveDataBufferOffset() const +_MTL_INLINE NS::String* MTL::AccelerationStructureGeometryDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(primitiveDataBufferOffset)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureGeometryDescriptor::primitiveDataElementSize() const +_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(primitiveDataElementSize)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureGeometryDescriptor::primitiveDataStride() const +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureGeometryDescriptor::primitiveDataBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(primitiveDataStride)); + return _MTL_msg_MTL__Bufferp_primitiveDataBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setAllowDuplicateIntersectionFunctionInvocation(bool allowDuplicateIntersectionFunctionInvocation) +_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setPrimitiveDataBuffer(MTL::Buffer* primitiveDataBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAllowDuplicateIntersectionFunctionInvocation_), allowDuplicateIntersectionFunctionInvocation); + _MTL_msg_v_setPrimitiveDataBuffer__MTL__Bufferp((const void*)this, nullptr, primitiveDataBuffer); } -_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setIntersectionFunctionTableOffset(NS::UInteger intersectionFunctionTableOffset) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureGeometryDescriptor::primitiveDataBufferOffset() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIntersectionFunctionTableOffset_), intersectionFunctionTableOffset); + return _MTL_msg_NS__UInteger_primitiveDataBufferOffset((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setLabel(const NS::String* label) +_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setPrimitiveDataBufferOffset(NS::UInteger primitiveDataBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setPrimitiveDataBufferOffset__NS__UInteger((const void*)this, nullptr, primitiveDataBufferOffset); } -_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setOpaque(bool opaque) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureGeometryDescriptor::primitiveDataStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaque_), opaque); + return _MTL_msg_NS__UInteger_primitiveDataStride((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setPrimitiveDataBuffer(const MTL::Buffer* primitiveDataBuffer) +_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setPrimitiveDataStride(NS::UInteger primitiveDataStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPrimitiveDataBuffer_), primitiveDataBuffer); + _MTL_msg_v_setPrimitiveDataStride__NS__UInteger((const void*)this, nullptr, primitiveDataStride); } -_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setPrimitiveDataBufferOffset(NS::UInteger primitiveDataBufferOffset) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureGeometryDescriptor::primitiveDataElementSize() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPrimitiveDataBufferOffset_), primitiveDataBufferOffset); + return _MTL_msg_NS__UInteger_primitiveDataElementSize((const void*)this, nullptr); } _MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setPrimitiveDataElementSize(NS::UInteger primitiveDataElementSize) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPrimitiveDataElementSize_), primitiveDataElementSize); + _MTL_msg_v_setPrimitiveDataElementSize__NS__UInteger((const void*)this, nullptr, primitiveDataElementSize); } -_MTL_INLINE void MTL::AccelerationStructureGeometryDescriptor::setPrimitiveDataStride(NS::UInteger primitiveDataStride) +_MTL_INLINE MTL::PrimitiveAccelerationStructureDescriptor* MTL::PrimitiveAccelerationStructureDescriptor::alloc() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPrimitiveDataStride_), primitiveDataStride); + return _MTL_msg_MTL__PrimitiveAccelerationStructureDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLPrimitiveAccelerationStructureDescriptor, nullptr); } -_MTL_INLINE MTL::PrimitiveAccelerationStructureDescriptor* MTL::PrimitiveAccelerationStructureDescriptor::alloc() +_MTL_INLINE MTL::PrimitiveAccelerationStructureDescriptor* MTL::PrimitiveAccelerationStructureDescriptor::init() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLPrimitiveAccelerationStructureDescriptor)); + return _MTL_msg_MTL__PrimitiveAccelerationStructureDescriptorp_init((const void*)this, nullptr); } _MTL_INLINE MTL::PrimitiveAccelerationStructureDescriptor* MTL::PrimitiveAccelerationStructureDescriptor::descriptor() { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLPrimitiveAccelerationStructureDescriptor), _MTL_PRIVATE_SEL(descriptor)); + return _MTL_msg_MTL__PrimitiveAccelerationStructureDescriptorp_descriptor((const void*)&OBJC_CLASS_$_MTLPrimitiveAccelerationStructureDescriptor, nullptr); } _MTL_INLINE NS::Array* MTL::PrimitiveAccelerationStructureDescriptor::geometryDescriptors() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(geometryDescriptors)); + return _MTL_msg_NS__Arrayp_geometryDescriptors((const void*)this, nullptr); } -_MTL_INLINE MTL::PrimitiveAccelerationStructureDescriptor* MTL::PrimitiveAccelerationStructureDescriptor::init() +_MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setGeometryDescriptors(NS::Array* geometryDescriptors) { - return NS::Object::init(); + _MTL_msg_v_setGeometryDescriptors__NS__Arrayp((const void*)this, nullptr, geometryDescriptors); } -_MTL_INLINE MTL::MotionBorderMode MTL::PrimitiveAccelerationStructureDescriptor::motionEndBorderMode() const +_MTL_INLINE MTL::MotionBorderMode MTL::PrimitiveAccelerationStructureDescriptor::motionStartBorderMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionEndBorderMode)); + return _MTL_msg_MTL__MotionBorderMode_motionStartBorderMode((const void*)this, nullptr); } -_MTL_INLINE float MTL::PrimitiveAccelerationStructureDescriptor::motionEndTime() const +_MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setMotionStartBorderMode(MTL::MotionBorderMode motionStartBorderMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionEndTime)); + _MTL_msg_v_setMotionStartBorderMode__MTL__MotionBorderMode((const void*)this, nullptr, motionStartBorderMode); } -_MTL_INLINE NS::UInteger MTL::PrimitiveAccelerationStructureDescriptor::motionKeyframeCount() const +_MTL_INLINE MTL::MotionBorderMode MTL::PrimitiveAccelerationStructureDescriptor::motionEndBorderMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionKeyframeCount)); + return _MTL_msg_MTL__MotionBorderMode_motionEndBorderMode((const void*)this, nullptr); } -_MTL_INLINE MTL::MotionBorderMode MTL::PrimitiveAccelerationStructureDescriptor::motionStartBorderMode() const +_MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setMotionEndBorderMode(MTL::MotionBorderMode motionEndBorderMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionStartBorderMode)); + _MTL_msg_v_setMotionEndBorderMode__MTL__MotionBorderMode((const void*)this, nullptr, motionEndBorderMode); } _MTL_INLINE float MTL::PrimitiveAccelerationStructureDescriptor::motionStartTime() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionStartTime)); + return _MTL_msg_float_motionStartTime((const void*)this, nullptr); } -_MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setGeometryDescriptors(const NS::Array* geometryDescriptors) +_MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setMotionStartTime(float motionStartTime) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setGeometryDescriptors_), geometryDescriptors); + _MTL_msg_v_setMotionStartTime__float((const void*)this, nullptr, motionStartTime); } -_MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setMotionEndBorderMode(MTL::MotionBorderMode motionEndBorderMode) +_MTL_INLINE float MTL::PrimitiveAccelerationStructureDescriptor::motionEndTime() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionEndBorderMode_), motionEndBorderMode); + return _MTL_msg_float_motionEndTime((const void*)this, nullptr); } _MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setMotionEndTime(float motionEndTime) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionEndTime_), motionEndTime); + _MTL_msg_v_setMotionEndTime__float((const void*)this, nullptr, motionEndTime); } -_MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setMotionKeyframeCount(NS::UInteger motionKeyframeCount) -{ - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionKeyframeCount_), motionKeyframeCount); -} - -_MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setMotionStartBorderMode(MTL::MotionBorderMode motionStartBorderMode) +_MTL_INLINE NS::UInteger MTL::PrimitiveAccelerationStructureDescriptor::motionKeyframeCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionStartBorderMode_), motionStartBorderMode); + return _MTL_msg_NS__UInteger_motionKeyframeCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setMotionStartTime(float motionStartTime) +_MTL_INLINE void MTL::PrimitiveAccelerationStructureDescriptor::setMotionKeyframeCount(NS::UInteger motionKeyframeCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionStartTime_), motionStartTime); + _MTL_msg_v_setMotionKeyframeCount__NS__UInteger((const void*)this, nullptr, motionKeyframeCount); } _MTL_INLINE MTL::AccelerationStructureTriangleGeometryDescriptor* MTL::AccelerationStructureTriangleGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureTriangleGeometryDescriptor)); + return _MTL_msg_MTL__AccelerationStructureTriangleGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructureTriangleGeometryDescriptor, nullptr); } -_MTL_INLINE MTL::AccelerationStructureTriangleGeometryDescriptor* MTL::AccelerationStructureTriangleGeometryDescriptor::descriptor() +_MTL_INLINE MTL::AccelerationStructureTriangleGeometryDescriptor* MTL::AccelerationStructureTriangleGeometryDescriptor::init() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureTriangleGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); + return _MTL_msg_MTL__AccelerationStructureTriangleGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureTriangleGeometryDescriptor::indexBuffer() const +_MTL_INLINE MTL::AccelerationStructureTriangleGeometryDescriptor* MTL::AccelerationStructureTriangleGeometryDescriptor::descriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); + return _MTL_msg_MTL__AccelerationStructureTriangleGeometryDescriptorp_descriptor((const void*)&OBJC_CLASS_$_MTLAccelerationStructureTriangleGeometryDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureTriangleGeometryDescriptor::indexBufferOffset() const +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureTriangleGeometryDescriptor::vertexBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBufferOffset)); + return _MTL_msg_MTL__Bufferp_vertexBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::IndexType MTL::AccelerationStructureTriangleGeometryDescriptor::indexType() const +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setVertexBuffer(MTL::Buffer* vertexBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + _MTL_msg_v_setVertexBuffer__MTL__Bufferp((const void*)this, nullptr, vertexBuffer); } -_MTL_INLINE MTL::AccelerationStructureTriangleGeometryDescriptor* MTL::AccelerationStructureTriangleGeometryDescriptor::init() +_MTL_INLINE NS::UInteger MTL::AccelerationStructureTriangleGeometryDescriptor::vertexBufferOffset() const { - return NS::Object::init(); + return _MTL_msg_NS__UInteger_vertexBufferOffset((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setIndexBuffer(const MTL::Buffer* indexBuffer) +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setVertexBufferOffset(NS::UInteger vertexBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); + _MTL_msg_v_setVertexBufferOffset__NS__UInteger((const void*)this, nullptr, vertexBufferOffset); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureTriangleGeometryDescriptor::vertexFormat() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBufferOffset_), indexBufferOffset); + return _MTL_msg_MTL__AttributeFormat_vertexFormat((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setIndexType(MTL::IndexType indexType) +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setVertexFormat(MTL::AttributeFormat vertexFormat) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); + _MTL_msg_v_setVertexFormat__MTL__AttributeFormat((const void*)this, nullptr, vertexFormat); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setTransformationMatrixBuffer(const MTL::Buffer* transformationMatrixBuffer) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureTriangleGeometryDescriptor::vertexStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTransformationMatrixBuffer_), transformationMatrixBuffer); + return _MTL_msg_NS__UInteger_vertexStride((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setTransformationMatrixBufferOffset(NS::UInteger transformationMatrixBufferOffset) +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setVertexStride(NS::UInteger vertexStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTransformationMatrixBufferOffset_), transformationMatrixBufferOffset); + _MTL_msg_v_setVertexStride__NS__UInteger((const void*)this, nullptr, vertexStride); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout) +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureTriangleGeometryDescriptor::indexBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTransformationMatrixLayout_), transformationMatrixLayout); + return _MTL_msg_MTL__Bufferp_indexBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setTriangleCount(NS::UInteger triangleCount) +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setIndexBuffer(MTL::Buffer* indexBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTriangleCount_), triangleCount); + _MTL_msg_v_setIndexBuffer__MTL__Bufferp((const void*)this, nullptr, indexBuffer); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setVertexBuffer(const MTL::Buffer* vertexBuffer) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureTriangleGeometryDescriptor::indexBufferOffset() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffer_), vertexBuffer); + return _MTL_msg_NS__UInteger_indexBufferOffset((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setVertexBufferOffset(NS::UInteger vertexBufferOffset) +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBufferOffset_), vertexBufferOffset); + _MTL_msg_v_setIndexBufferOffset__NS__UInteger((const void*)this, nullptr, indexBufferOffset); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setVertexFormat(MTL::AttributeFormat vertexFormat) +_MTL_INLINE MTL::IndexType MTL::AccelerationStructureTriangleGeometryDescriptor::indexType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexFormat_), vertexFormat); + return _MTL_msg_MTL__IndexType_indexType((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setVertexStride(NS::UInteger vertexStride) +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setIndexType(MTL::IndexType indexType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexStride_), vertexStride); + _MTL_msg_v_setIndexType__MTL__IndexType((const void*)this, nullptr, indexType); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureTriangleGeometryDescriptor::transformationMatrixBuffer() const +_MTL_INLINE NS::UInteger MTL::AccelerationStructureTriangleGeometryDescriptor::triangleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(transformationMatrixBuffer)); + return _MTL_msg_NS__UInteger_triangleCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureTriangleGeometryDescriptor::transformationMatrixBufferOffset() const +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setTriangleCount(NS::UInteger triangleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(transformationMatrixBufferOffset)); + _MTL_msg_v_setTriangleCount__NS__UInteger((const void*)this, nullptr, triangleCount); } -_MTL_INLINE MTL::MatrixLayout MTL::AccelerationStructureTriangleGeometryDescriptor::transformationMatrixLayout() const +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureTriangleGeometryDescriptor::transformationMatrixBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(transformationMatrixLayout)); + return _MTL_msg_MTL__Bufferp_transformationMatrixBuffer((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureTriangleGeometryDescriptor::triangleCount() const +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setTransformationMatrixBuffer(MTL::Buffer* transformationMatrixBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(triangleCount)); + _MTL_msg_v_setTransformationMatrixBuffer__MTL__Bufferp((const void*)this, nullptr, transformationMatrixBuffer); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureTriangleGeometryDescriptor::vertexBuffer() const +_MTL_INLINE NS::UInteger MTL::AccelerationStructureTriangleGeometryDescriptor::transformationMatrixBufferOffset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexBuffer)); + return _MTL_msg_NS__UInteger_transformationMatrixBufferOffset((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureTriangleGeometryDescriptor::vertexBufferOffset() const +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setTransformationMatrixBufferOffset(NS::UInteger transformationMatrixBufferOffset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexBufferOffset)); + _MTL_msg_v_setTransformationMatrixBufferOffset__NS__UInteger((const void*)this, nullptr, transformationMatrixBufferOffset); } -_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureTriangleGeometryDescriptor::vertexFormat() const +_MTL_INLINE MTL::MatrixLayout MTL::AccelerationStructureTriangleGeometryDescriptor::transformationMatrixLayout() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexFormat)); + return _MTL_msg_MTL__MatrixLayout_transformationMatrixLayout((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureTriangleGeometryDescriptor::vertexStride() const +_MTL_INLINE void MTL::AccelerationStructureTriangleGeometryDescriptor::setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexStride)); + _MTL_msg_v_setTransformationMatrixLayout__MTL__MatrixLayout((const void*)this, nullptr, transformationMatrixLayout); } _MTL_INLINE MTL::AccelerationStructureBoundingBoxGeometryDescriptor* MTL::AccelerationStructureBoundingBoxGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureBoundingBoxGeometryDescriptor)); + return _MTL_msg_MTL__AccelerationStructureBoundingBoxGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructureBoundingBoxGeometryDescriptor, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxBuffer() const +_MTL_INLINE MTL::AccelerationStructureBoundingBoxGeometryDescriptor* MTL::AccelerationStructureBoundingBoxGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxBuffer)); + return _MTL_msg_MTL__AccelerationStructureBoundingBoxGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxBufferOffset() const +_MTL_INLINE MTL::AccelerationStructureBoundingBoxGeometryDescriptor* MTL::AccelerationStructureBoundingBoxGeometryDescriptor::descriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxBufferOffset)); + return _MTL_msg_MTL__AccelerationStructureBoundingBoxGeometryDescriptorp_descriptor((const void*)&OBJC_CLASS_$_MTLAccelerationStructureBoundingBoxGeometryDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxCount() const +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxCount)); + return _MTL_msg_MTL__Bufferp_boundingBoxBuffer((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxStride() const +_MTL_INLINE void MTL::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxBuffer(MTL::Buffer* boundingBoxBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxStride)); + _MTL_msg_v_setBoundingBoxBuffer__MTL__Bufferp((const void*)this, nullptr, boundingBoxBuffer); } -_MTL_INLINE MTL::AccelerationStructureBoundingBoxGeometryDescriptor* MTL::AccelerationStructureBoundingBoxGeometryDescriptor::descriptor() +_MTL_INLINE NS::UInteger MTL::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxBufferOffset() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureBoundingBoxGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); + return _MTL_msg_NS__UInteger_boundingBoxBufferOffset((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureBoundingBoxGeometryDescriptor* MTL::AccelerationStructureBoundingBoxGeometryDescriptor::init() +_MTL_INLINE void MTL::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxBufferOffset(NS::UInteger boundingBoxBufferOffset) { - return NS::Object::init(); + _MTL_msg_v_setBoundingBoxBufferOffset__NS__UInteger((const void*)this, nullptr, boundingBoxBufferOffset); } -_MTL_INLINE void MTL::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxBuffer(const MTL::Buffer* boundingBoxBuffer) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxBuffer_), boundingBoxBuffer); + return _MTL_msg_NS__UInteger_boundingBoxStride((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxBufferOffset(NS::UInteger boundingBoxBufferOffset) +_MTL_INLINE void MTL::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxStride(NS::UInteger boundingBoxStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxBufferOffset_), boundingBoxBufferOffset); + _MTL_msg_v_setBoundingBoxStride__NS__UInteger((const void*)this, nullptr, boundingBoxStride); } -_MTL_INLINE void MTL::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxCount(NS::UInteger boundingBoxCount) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureBoundingBoxGeometryDescriptor::boundingBoxCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxCount_), boundingBoxCount); + return _MTL_msg_NS__UInteger_boundingBoxCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxStride(NS::UInteger boundingBoxStride) +_MTL_INLINE void MTL::AccelerationStructureBoundingBoxGeometryDescriptor::setBoundingBoxCount(NS::UInteger boundingBoxCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxStride_), boundingBoxStride); + _MTL_msg_v_setBoundingBoxCount__NS__UInteger((const void*)this, nullptr, boundingBoxCount); } _MTL_INLINE MTL::MotionKeyframeData* MTL::MotionKeyframeData::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLMotionKeyframeData)); + return _MTL_msg_MTL__MotionKeyframeDatap_alloc((const void*)&OBJC_CLASS_$_MTLMotionKeyframeData, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::MotionKeyframeData::buffer() const +_MTL_INLINE MTL::MotionKeyframeData* MTL::MotionKeyframeData::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(buffer)); + return _MTL_msg_MTL__MotionKeyframeDatap_init((const void*)this, nullptr); } _MTL_INLINE MTL::MotionKeyframeData* MTL::MotionKeyframeData::data() { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLMotionKeyframeData), _MTL_PRIVATE_SEL(data)); + return _MTL_msg_MTL__MotionKeyframeDatap_data((const void*)&OBJC_CLASS_$_MTLMotionKeyframeData, nullptr); } -_MTL_INLINE MTL::MotionKeyframeData* MTL::MotionKeyframeData::init() +_MTL_INLINE MTL::Buffer* MTL::MotionKeyframeData::buffer() const { - return NS::Object::init(); + return _MTL_msg_MTL__Bufferp_buffer((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::MotionKeyframeData::offset() const +_MTL_INLINE void MTL::MotionKeyframeData::setBuffer(MTL::Buffer* buffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(offset)); + _MTL_msg_v_setBuffer__MTL__Bufferp((const void*)this, nullptr, buffer); } -_MTL_INLINE void MTL::MotionKeyframeData::setBuffer(const MTL::Buffer* buffer) +_MTL_INLINE NS::UInteger MTL::MotionKeyframeData::offset() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffer_), buffer); + return _MTL_msg_NS__UInteger_offset((const void*)this, nullptr); } _MTL_INLINE void MTL::MotionKeyframeData::setOffset(NS::UInteger offset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOffset_), offset); + _MTL_msg_v_setOffset__NS__UInteger((const void*)this, nullptr, offset); } _MTL_INLINE MTL::AccelerationStructureMotionTriangleGeometryDescriptor* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionTriangleGeometryDescriptor)); + return _MTL_msg_MTL__AccelerationStructureMotionTriangleGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructureMotionTriangleGeometryDescriptor, nullptr); } -_MTL_INLINE MTL::AccelerationStructureMotionTriangleGeometryDescriptor* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::descriptor() +_MTL_INLINE MTL::AccelerationStructureMotionTriangleGeometryDescriptor* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::init() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionTriangleGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); + return _MTL_msg_MTL__AccelerationStructureMotionTriangleGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::indexBuffer() const +_MTL_INLINE MTL::AccelerationStructureMotionTriangleGeometryDescriptor* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::descriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); + return _MTL_msg_MTL__AccelerationStructureMotionTriangleGeometryDescriptorp_descriptor((const void*)&OBJC_CLASS_$_MTLAccelerationStructureMotionTriangleGeometryDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionTriangleGeometryDescriptor::indexBufferOffset() const +_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::vertexBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBufferOffset)); + return _MTL_msg_NS__Arrayp_vertexBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL::IndexType MTL::AccelerationStructureMotionTriangleGeometryDescriptor::indexType() const +_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexBuffers(NS::Array* vertexBuffers) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + _MTL_msg_v_setVertexBuffers__NS__Arrayp((const void*)this, nullptr, vertexBuffers); } -_MTL_INLINE MTL::AccelerationStructureMotionTriangleGeometryDescriptor* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::init() +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureMotionTriangleGeometryDescriptor::vertexFormat() const { - return NS::Object::init(); + return _MTL_msg_MTL__AttributeFormat_vertexFormat((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setIndexBuffer(const MTL::Buffer* indexBuffer) +_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexFormat(MTL::AttributeFormat vertexFormat) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); + _MTL_msg_v_setVertexFormat__MTL__AttributeFormat((const void*)this, nullptr, vertexFormat); } -_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionTriangleGeometryDescriptor::vertexStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBufferOffset_), indexBufferOffset); + return _MTL_msg_NS__UInteger_vertexStride((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setIndexType(MTL::IndexType indexType) +_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexStride(NS::UInteger vertexStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); + _MTL_msg_v_setVertexStride__NS__UInteger((const void*)this, nullptr, vertexStride); } -_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setTransformationMatrixBuffer(const MTL::Buffer* transformationMatrixBuffer) +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::indexBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTransformationMatrixBuffer_), transformationMatrixBuffer); + return _MTL_msg_MTL__Bufferp_indexBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setTransformationMatrixBufferOffset(NS::UInteger transformationMatrixBufferOffset) +_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setIndexBuffer(MTL::Buffer* indexBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTransformationMatrixBufferOffset_), transformationMatrixBufferOffset); + _MTL_msg_v_setIndexBuffer__MTL__Bufferp((const void*)this, nullptr, indexBuffer); } -_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionTriangleGeometryDescriptor::indexBufferOffset() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTransformationMatrixLayout_), transformationMatrixLayout); + return _MTL_msg_NS__UInteger_indexBufferOffset((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setTriangleCount(NS::UInteger triangleCount) +_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTriangleCount_), triangleCount); + _MTL_msg_v_setIndexBufferOffset__NS__UInteger((const void*)this, nullptr, indexBufferOffset); } -_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexBuffers(const NS::Array* vertexBuffers) +_MTL_INLINE MTL::IndexType MTL::AccelerationStructureMotionTriangleGeometryDescriptor::indexType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffers_), vertexBuffers); + return _MTL_msg_MTL__IndexType_indexType((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexFormat(MTL::AttributeFormat vertexFormat) +_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setIndexType(MTL::IndexType indexType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexFormat_), vertexFormat); + _MTL_msg_v_setIndexType__MTL__IndexType((const void*)this, nullptr, indexType); } -_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setVertexStride(NS::UInteger vertexStride) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionTriangleGeometryDescriptor::triangleCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexStride_), vertexStride); + return _MTL_msg_NS__UInteger_triangleCount((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::transformationMatrixBuffer() const +_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setTriangleCount(NS::UInteger triangleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(transformationMatrixBuffer)); + _MTL_msg_v_setTriangleCount__NS__UInteger((const void*)this, nullptr, triangleCount); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionTriangleGeometryDescriptor::transformationMatrixBufferOffset() const +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::transformationMatrixBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(transformationMatrixBufferOffset)); + return _MTL_msg_MTL__Bufferp_transformationMatrixBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::MatrixLayout MTL::AccelerationStructureMotionTriangleGeometryDescriptor::transformationMatrixLayout() const +_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setTransformationMatrixBuffer(MTL::Buffer* transformationMatrixBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(transformationMatrixLayout)); + _MTL_msg_v_setTransformationMatrixBuffer__MTL__Bufferp((const void*)this, nullptr, transformationMatrixBuffer); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionTriangleGeometryDescriptor::triangleCount() const +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionTriangleGeometryDescriptor::transformationMatrixBufferOffset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(triangleCount)); + return _MTL_msg_NS__UInteger_transformationMatrixBufferOffset((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionTriangleGeometryDescriptor::vertexBuffers() const +_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setTransformationMatrixBufferOffset(NS::UInteger transformationMatrixBufferOffset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexBuffers)); + _MTL_msg_v_setTransformationMatrixBufferOffset__NS__UInteger((const void*)this, nullptr, transformationMatrixBufferOffset); } -_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureMotionTriangleGeometryDescriptor::vertexFormat() const +_MTL_INLINE MTL::MatrixLayout MTL::AccelerationStructureMotionTriangleGeometryDescriptor::transformationMatrixLayout() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexFormat)); + return _MTL_msg_MTL__MatrixLayout_transformationMatrixLayout((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionTriangleGeometryDescriptor::vertexStride() const +_MTL_INLINE void MTL::AccelerationStructureMotionTriangleGeometryDescriptor::setTransformationMatrixLayout(MTL::MatrixLayout transformationMatrixLayout) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexStride)); + _MTL_msg_v_setTransformationMatrixLayout__MTL__MatrixLayout((const void*)this, nullptr, transformationMatrixLayout); } _MTL_INLINE MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor)); + return _MTL_msg_MTL__AccelerationStructureMotionBoundingBoxGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxBuffers() const +_MTL_INLINE MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxBuffers)); + return _MTL_msg_MTL__AccelerationStructureMotionBoundingBoxGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxCount() const +_MTL_INLINE MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::descriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxCount)); + return _MTL_msg_MTL__AccelerationStructureMotionBoundingBoxGeometryDescriptorp_descriptor((const void*)&OBJC_CLASS_$_MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxStride() const +_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(boundingBoxStride)); + return _MTL_msg_NS__Arrayp_boundingBoxBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::descriptor() +_MTL_INLINE void MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxBuffers(NS::Array* boundingBoxBuffers) { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); + _MTL_msg_v_setBoundingBoxBuffers__NS__Arrayp((const void*)this, nullptr, boundingBoxBuffers); } -_MTL_INLINE MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::init() +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxStride() const { - return NS::Object::init(); + return _MTL_msg_NS__UInteger_boundingBoxStride((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxBuffers(const NS::Array* boundingBoxBuffers) +_MTL_INLINE void MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxStride(NS::UInteger boundingBoxStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxBuffers_), boundingBoxBuffers); + _MTL_msg_v_setBoundingBoxStride__NS__UInteger((const void*)this, nullptr, boundingBoxStride); } -_MTL_INLINE void MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxCount(NS::UInteger boundingBoxCount) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::boundingBoxCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxCount_), boundingBoxCount); + return _MTL_msg_NS__UInteger_boundingBoxCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxStride(NS::UInteger boundingBoxStride) +_MTL_INLINE void MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor::setBoundingBoxCount(NS::UInteger boundingBoxCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBoundingBoxStride_), boundingBoxStride); + _MTL_msg_v_setBoundingBoxCount__NS__UInteger((const void*)this, nullptr, boundingBoxCount); } _MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureCurveGeometryDescriptor)); + return _MTL_msg_MTL__AccelerationStructureCurveGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructureCurveGeometryDescriptor, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::controlPointBuffer() const +_MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBuffer)); + return _MTL_msg_MTL__AccelerationStructureCurveGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointBufferOffset() const +_MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::descriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBufferOffset)); + return _MTL_msg_MTL__AccelerationStructureCurveGeometryDescriptorp_descriptor((const void*)&OBJC_CLASS_$_MTLAccelerationStructureCurveGeometryDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointCount() const +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::controlPointBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointCount)); + return _MTL_msg_MTL__Bufferp_controlPointBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureCurveGeometryDescriptor::controlPointFormat() const +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointBuffer(MTL::Buffer* controlPointBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointFormat)); + _MTL_msg_v_setControlPointBuffer__MTL__Bufferp((const void*)this, nullptr, controlPointBuffer); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointStride() const +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointBufferOffset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointStride)); + return _MTL_msg_NS__UInteger_controlPointBufferOffset((const void*)this, nullptr); } -_MTL_INLINE MTL::CurveBasis MTL::AccelerationStructureCurveGeometryDescriptor::curveBasis() const +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointBufferOffset(NS::UInteger controlPointBufferOffset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveBasis)); + _MTL_msg_v_setControlPointBufferOffset__NS__UInteger((const void*)this, nullptr, controlPointBufferOffset); } -_MTL_INLINE MTL::CurveEndCaps MTL::AccelerationStructureCurveGeometryDescriptor::curveEndCaps() const +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveEndCaps)); + return _MTL_msg_NS__UInteger_controlPointCount((const void*)this, nullptr); } -_MTL_INLINE MTL::CurveType MTL::AccelerationStructureCurveGeometryDescriptor::curveType() const +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveType)); + _MTL_msg_v_setControlPointCount__NS__UInteger((const void*)this, nullptr, controlPointCount); } -_MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::descriptor() +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointStride() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureCurveGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); + return _MTL_msg_NS__UInteger_controlPointStride((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::indexBuffer() const +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); + _MTL_msg_v_setControlPointStride__NS__UInteger((const void*)this, nullptr, controlPointStride); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::indexBufferOffset() const +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureCurveGeometryDescriptor::controlPointFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBufferOffset)); + return _MTL_msg_MTL__AttributeFormat_controlPointFormat((const void*)this, nullptr); } -_MTL_INLINE MTL::IndexType MTL::AccelerationStructureCurveGeometryDescriptor::indexType() const +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + _MTL_msg_v_setControlPointFormat__MTL__AttributeFormat((const void*)this, nullptr, controlPointFormat); } -_MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::init() +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::radiusBuffer() const { - return NS::Object::init(); + return _MTL_msg_MTL__Bufferp_radiusBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::radiusBuffer() const +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusBuffer(MTL::Buffer* radiusBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBuffer)); + _MTL_msg_v_setRadiusBuffer__MTL__Bufferp((const void*)this, nullptr, radiusBuffer); } _MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::radiusBufferOffset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBufferOffset)); + return _MTL_msg_NS__UInteger_radiusBufferOffset((const void*)this, nullptr); } -_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureCurveGeometryDescriptor::radiusFormat() const +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusBufferOffset(NS::UInteger radiusBufferOffset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusFormat)); + _MTL_msg_v_setRadiusBufferOffset__NS__UInteger((const void*)this, nullptr, radiusBufferOffset); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::radiusStride() const +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureCurveGeometryDescriptor::radiusFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusStride)); + return _MTL_msg_MTL__AttributeFormat_radiusFormat((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::segmentControlPointCount() const +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentControlPointCount)); + _MTL_msg_v_setRadiusFormat__MTL__AttributeFormat((const void*)this, nullptr, radiusFormat); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::segmentCount() const +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::radiusStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentCount)); + return _MTL_msg_NS__UInteger_radiusStride((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointBuffer(const MTL::Buffer* controlPointBuffer) +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBuffer_), controlPointBuffer); + _MTL_msg_v_setRadiusStride__NS__UInteger((const void*)this, nullptr, radiusStride); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointBufferOffset(NS::UInteger controlPointBufferOffset) +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::indexBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBufferOffset_), controlPointBufferOffset); + return _MTL_msg_MTL__Bufferp_indexBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexBuffer(MTL::Buffer* indexBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointCount_), controlPointCount); + _MTL_msg_v_setIndexBuffer__MTL__Bufferp((const void*)this, nullptr, indexBuffer); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::indexBufferOffset() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointFormat_), controlPointFormat); + return _MTL_msg_NS__UInteger_indexBufferOffset((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointStride_), controlPointStride); + _MTL_msg_v_setIndexBufferOffset__NS__UInteger((const void*)this, nullptr, indexBufferOffset); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) +_MTL_INLINE MTL::IndexType MTL::AccelerationStructureCurveGeometryDescriptor::indexType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveBasis_), curveBasis); + return _MTL_msg_MTL__IndexType_indexType((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveEndCaps_), curveEndCaps); + _MTL_msg_v_setIndexType__MTL__IndexType((const void*)this, nullptr, indexType); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::segmentCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveType_), curveType); + return _MTL_msg_NS__UInteger_segmentCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexBuffer(const MTL::Buffer* indexBuffer) +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); + _MTL_msg_v_setSegmentCount__NS__UInteger((const void*)this, nullptr, segmentCount); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::segmentControlPointCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBufferOffset_), indexBufferOffset); + return _MTL_msg_NS__UInteger_segmentControlPointCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); + _MTL_msg_v_setSegmentControlPointCount__NS__UInteger((const void*)this, nullptr, segmentControlPointCount); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusBuffer(const MTL::Buffer* radiusBuffer) +_MTL_INLINE MTL::CurveType MTL::AccelerationStructureCurveGeometryDescriptor::curveType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBuffer_), radiusBuffer); + return _MTL_msg_MTL__CurveType_curveType((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusBufferOffset(NS::UInteger radiusBufferOffset) +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBufferOffset_), radiusBufferOffset); + _MTL_msg_v_setCurveType__MTL__CurveType((const void*)this, nullptr, curveType); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) +_MTL_INLINE MTL::CurveBasis MTL::AccelerationStructureCurveGeometryDescriptor::curveBasis() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusFormat_), radiusFormat); + return _MTL_msg_MTL__CurveBasis_curveBasis((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusStride_), radiusStride); + _MTL_msg_v_setCurveBasis__MTL__CurveBasis((const void*)this, nullptr, curveBasis); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) +_MTL_INLINE MTL::CurveEndCaps MTL::AccelerationStructureCurveGeometryDescriptor::curveEndCaps() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentControlPointCount_), segmentControlPointCount); + return _MTL_msg_MTL__CurveEndCaps_curveEndCaps((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentCount_), segmentCount); + _MTL_msg_v_setCurveEndCaps__MTL__CurveEndCaps((const void*)this, nullptr, curveEndCaps); } _MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionCurveGeometryDescriptor)); + return _MTL_msg_MTL__AccelerationStructureMotionCurveGeometryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructureMotionCurveGeometryDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointBuffers() const +_MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBuffers)); + return _MTL_msg_MTL__AccelerationStructureMotionCurveGeometryDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointCount() const +_MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::descriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointCount)); + return _MTL_msg_MTL__AccelerationStructureMotionCurveGeometryDescriptorp_descriptor((const void*)&OBJC_CLASS_$_MTLAccelerationStructureMotionCurveGeometryDescriptor, nullptr); } -_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointFormat() const +_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointFormat)); + return _MTL_msg_NS__Arrayp_controlPointBuffers((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointStride() const +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointBuffers(NS::Array* controlPointBuffers) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointStride)); + _MTL_msg_v_setControlPointBuffers__NS__Arrayp((const void*)this, nullptr, controlPointBuffers); } -_MTL_INLINE MTL::CurveBasis MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveBasis() const +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveBasis)); + return _MTL_msg_NS__UInteger_controlPointCount((const void*)this, nullptr); } -_MTL_INLINE MTL::CurveEndCaps MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveEndCaps() const +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveEndCaps)); + _MTL_msg_v_setControlPointCount__NS__UInteger((const void*)this, nullptr, controlPointCount); } -_MTL_INLINE MTL::CurveType MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveType() const +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveType)); + return _MTL_msg_NS__UInteger_controlPointStride((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::descriptor() +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionCurveGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); + _MTL_msg_v_setControlPointStride__NS__UInteger((const void*)this, nullptr, controlPointStride); } -_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexBuffer() const +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); + return _MTL_msg_MTL__AttributeFormat_controlPointFormat((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexBufferOffset() const +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBufferOffset)); + _MTL_msg_v_setControlPointFormat__MTL__AttributeFormat((const void*)this, nullptr, controlPointFormat); } -_MTL_INLINE MTL::IndexType MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexType() const +_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + return _MTL_msg_NS__Arrayp_radiusBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::init() +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusBuffers(NS::Array* radiusBuffers) { - return NS::Object::init(); + _MTL_msg_v_setRadiusBuffers__NS__Arrayp((const void*)this, nullptr, radiusBuffers); } -_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusBuffers() const +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBuffers)); + return _MTL_msg_MTL__AttributeFormat_radiusFormat((const void*)this, nullptr); } -_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusFormat() const +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusFormat)); + _MTL_msg_v_setRadiusFormat__MTL__AttributeFormat((const void*)this, nullptr, radiusFormat); } _MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusStride)); + return _MTL_msg_NS__UInteger_radiusStride((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::segmentControlPointCount() const +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentControlPointCount)); + _MTL_msg_v_setRadiusStride__NS__UInteger((const void*)this, nullptr, radiusStride); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::segmentCount() const +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentCount)); + return _MTL_msg_MTL__Bufferp_indexBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointBuffers(const NS::Array* controlPointBuffers) +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexBuffer(MTL::Buffer* indexBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBuffers_), controlPointBuffers); + _MTL_msg_v_setIndexBuffer__MTL__Bufferp((const void*)this, nullptr, indexBuffer); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexBufferOffset() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointCount_), controlPointCount); + return _MTL_msg_NS__UInteger_indexBufferOffset((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointFormat_), controlPointFormat); + _MTL_msg_v_setIndexBufferOffset__NS__UInteger((const void*)this, nullptr, indexBufferOffset); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) +_MTL_INLINE MTL::IndexType MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointStride_), controlPointStride); + return _MTL_msg_MTL__IndexType_indexType((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveBasis_), curveBasis); + _MTL_msg_v_setIndexType__MTL__IndexType((const void*)this, nullptr, indexType); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::segmentCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveEndCaps_), curveEndCaps); + return _MTL_msg_NS__UInteger_segmentCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveType_), curveType); + _MTL_msg_v_setSegmentCount__NS__UInteger((const void*)this, nullptr, segmentCount); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexBuffer(const MTL::Buffer* indexBuffer) +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::segmentControlPointCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); + return _MTL_msg_NS__UInteger_segmentControlPointCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBufferOffset_), indexBufferOffset); + _MTL_msg_v_setSegmentControlPointCount__NS__UInteger((const void*)this, nullptr, segmentControlPointCount); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) +_MTL_INLINE MTL::CurveType MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); + return _MTL_msg_MTL__CurveType_curveType((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusBuffers(const NS::Array* radiusBuffers) +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBuffers_), radiusBuffers); + _MTL_msg_v_setCurveType__MTL__CurveType((const void*)this, nullptr, curveType); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) +_MTL_INLINE MTL::CurveBasis MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveBasis() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusFormat_), radiusFormat); + return _MTL_msg_MTL__CurveBasis_curveBasis((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusStride_), radiusStride); + _MTL_msg_v_setCurveBasis__MTL__CurveBasis((const void*)this, nullptr, curveBasis); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) +_MTL_INLINE MTL::CurveEndCaps MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveEndCaps() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentControlPointCount_), segmentControlPointCount); + return _MTL_msg_MTL__CurveEndCaps_curveEndCaps((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentCount_), segmentCount); + _MTL_msg_v_setCurveEndCaps__MTL__CurveEndCaps((const void*)this, nullptr, curveEndCaps); } _MTL_INLINE MTL::InstanceAccelerationStructureDescriptor* MTL::InstanceAccelerationStructureDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLInstanceAccelerationStructureDescriptor)); + return _MTL_msg_MTL__InstanceAccelerationStructureDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLInstanceAccelerationStructureDescriptor, nullptr); } -_MTL_INLINE MTL::InstanceAccelerationStructureDescriptor* MTL::InstanceAccelerationStructureDescriptor::descriptor() +_MTL_INLINE MTL::InstanceAccelerationStructureDescriptor* MTL::InstanceAccelerationStructureDescriptor::init() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLInstanceAccelerationStructureDescriptor), _MTL_PRIVATE_SEL(descriptor)); + return _MTL_msg_MTL__InstanceAccelerationStructureDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::InstanceAccelerationStructureDescriptor* MTL::InstanceAccelerationStructureDescriptor::init() +_MTL_INLINE MTL::InstanceAccelerationStructureDescriptor* MTL::InstanceAccelerationStructureDescriptor::descriptor() { - return NS::Object::init(); + return _MTL_msg_MTL__InstanceAccelerationStructureDescriptorp_descriptor((const void*)&OBJC_CLASS_$_MTLInstanceAccelerationStructureDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::instanceCount() const +_MTL_INLINE MTL::Buffer* MTL::InstanceAccelerationStructureDescriptor::instanceDescriptorBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceCount)); + return _MTL_msg_MTL__Bufferp_instanceDescriptorBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::InstanceAccelerationStructureDescriptor::instanceDescriptorBuffer() const +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceDescriptorBuffer(MTL::Buffer* instanceDescriptorBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorBuffer)); + _MTL_msg_v_setInstanceDescriptorBuffer__MTL__Bufferp((const void*)this, nullptr, instanceDescriptorBuffer); } _MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::instanceDescriptorBufferOffset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorBufferOffset)); + return _MTL_msg_NS__UInteger_instanceDescriptorBufferOffset((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::instanceDescriptorStride() const +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorStride)); + _MTL_msg_v_setInstanceDescriptorBufferOffset__NS__UInteger((const void*)this, nullptr, instanceDescriptorBufferOffset); } -_MTL_INLINE MTL::AccelerationStructureInstanceDescriptorType MTL::InstanceAccelerationStructureDescriptor::instanceDescriptorType() const +_MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::instanceDescriptorStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorType)); + return _MTL_msg_NS__UInteger_instanceDescriptorStride((const void*)this, nullptr); } -_MTL_INLINE MTL::MatrixLayout MTL::InstanceAccelerationStructureDescriptor::instanceTransformationMatrixLayout() const +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceTransformationMatrixLayout)); + _MTL_msg_v_setInstanceDescriptorStride__NS__UInteger((const void*)this, nullptr, instanceDescriptorStride); } -_MTL_INLINE NS::Array* MTL::InstanceAccelerationStructureDescriptor::instancedAccelerationStructures() const +_MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::instanceCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instancedAccelerationStructures)); + return _MTL_msg_NS__UInteger_instanceCount((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::InstanceAccelerationStructureDescriptor::motionTransformBuffer() const +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceCount(NS::UInteger instanceCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformBuffer)); + _MTL_msg_v_setInstanceCount__NS__UInteger((const void*)this, nullptr, instanceCount); } -_MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::motionTransformBufferOffset() const +_MTL_INLINE NS::Array* MTL::InstanceAccelerationStructureDescriptor::instancedAccelerationStructures() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformBufferOffset)); + return _MTL_msg_NS__Arrayp_instancedAccelerationStructures((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::motionTransformCount() const +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstancedAccelerationStructures(NS::Array* instancedAccelerationStructures) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformCount)); + _MTL_msg_v_setInstancedAccelerationStructures__NS__Arrayp((const void*)this, nullptr, instancedAccelerationStructures); } -_MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::motionTransformStride() const +_MTL_INLINE MTL::AccelerationStructureInstanceDescriptorType MTL::InstanceAccelerationStructureDescriptor::instanceDescriptorType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformStride)); + return _MTL_msg_MTL__AccelerationStructureInstanceDescriptorType_instanceDescriptorType((const void*)this, nullptr); } -_MTL_INLINE MTL::TransformType MTL::InstanceAccelerationStructureDescriptor::motionTransformType() const +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformType)); + _MTL_msg_v_setInstanceDescriptorType__MTL__AccelerationStructureInstanceDescriptorType((const void*)this, nullptr, instanceDescriptorType); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceCount(NS::UInteger instanceCount) +_MTL_INLINE MTL::Buffer* MTL::InstanceAccelerationStructureDescriptor::motionTransformBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceCount_), instanceCount); + return _MTL_msg_MTL__Bufferp_motionTransformBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceDescriptorBuffer(const MTL::Buffer* instanceDescriptorBuffer) +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setMotionTransformBuffer(MTL::Buffer* motionTransformBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorBuffer_), instanceDescriptorBuffer); + _MTL_msg_v_setMotionTransformBuffer__MTL__Bufferp((const void*)this, nullptr, motionTransformBuffer); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset) +_MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::motionTransformBufferOffset() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorBufferOffset_), instanceDescriptorBufferOffset); + return _MTL_msg_NS__UInteger_motionTransformBufferOffset((const void*)this, nullptr); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride) +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorStride_), instanceDescriptorStride); + _MTL_msg_v_setMotionTransformBufferOffset__NS__UInteger((const void*)this, nullptr, motionTransformBufferOffset); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType) +_MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::motionTransformCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorType_), instanceDescriptorType); + return _MTL_msg_NS__UInteger_motionTransformCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout) +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setMotionTransformCount(NS::UInteger motionTransformCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceTransformationMatrixLayout_), instanceTransformationMatrixLayout); + _MTL_msg_v_setMotionTransformCount__NS__UInteger((const void*)this, nullptr, motionTransformCount); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstancedAccelerationStructures(const NS::Array* instancedAccelerationStructures) +_MTL_INLINE MTL::MatrixLayout MTL::InstanceAccelerationStructureDescriptor::instanceTransformationMatrixLayout() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstancedAccelerationStructures_), instancedAccelerationStructures); + return _MTL_msg_MTL__MatrixLayout_instanceTransformationMatrixLayout((const void*)this, nullptr); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setMotionTransformBuffer(const MTL::Buffer* motionTransformBuffer) +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformBuffer_), motionTransformBuffer); + _MTL_msg_v_setInstanceTransformationMatrixLayout__MTL__MatrixLayout((const void*)this, nullptr, instanceTransformationMatrixLayout); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset) +_MTL_INLINE MTL::TransformType MTL::InstanceAccelerationStructureDescriptor::motionTransformType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformBufferOffset_), motionTransformBufferOffset); + return _MTL_msg_MTL__TransformType_motionTransformType((const void*)this, nullptr); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setMotionTransformCount(NS::UInteger motionTransformCount) +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setMotionTransformType(MTL::TransformType motionTransformType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformCount_), motionTransformCount); + _MTL_msg_v_setMotionTransformType__MTL__TransformType((const void*)this, nullptr, motionTransformType); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setMotionTransformStride(NS::UInteger motionTransformStride) +_MTL_INLINE NS::UInteger MTL::InstanceAccelerationStructureDescriptor::motionTransformStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformStride_), motionTransformStride); + return _MTL_msg_NS__UInteger_motionTransformStride((const void*)this, nullptr); } -_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setMotionTransformType(MTL::TransformType motionTransformType) +_MTL_INLINE void MTL::InstanceAccelerationStructureDescriptor::setMotionTransformStride(NS::UInteger motionTransformStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformType_), motionTransformType); + _MTL_msg_v_setMotionTransformStride__NS__UInteger((const void*)this, nullptr, motionTransformStride); } _MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLIndirectInstanceAccelerationStructureDescriptor)); + return _MTL_msg_MTL__IndirectInstanceAccelerationStructureDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLIndirectInstanceAccelerationStructureDescriptor, nullptr); } -_MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::descriptor() +_MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::init() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLIndirectInstanceAccelerationStructureDescriptor), _MTL_PRIVATE_SEL(descriptor)); + return _MTL_msg_MTL__IndirectInstanceAccelerationStructureDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::init() +_MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::descriptor() { - return NS::Object::init(); + return _MTL_msg_MTL__IndirectInstanceAccelerationStructureDescriptorp_descriptor((const void*)&OBJC_CLASS_$_MTLIndirectInstanceAccelerationStructureDescriptor, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::instanceCountBuffer() const +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceCountBuffer)); + return _MTL_msg_MTL__Bufferp_instanceDescriptorBuffer((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceCountBufferOffset() const +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorBuffer(MTL::Buffer* instanceDescriptorBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceCountBufferOffset)); + _MTL_msg_v_setInstanceDescriptorBuffer__MTL__Bufferp((const void*)this, nullptr, instanceDescriptorBuffer); } -_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorBuffer() const +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorBufferOffset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorBuffer)); + return _MTL_msg_NS__UInteger_instanceDescriptorBufferOffset((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorBufferOffset() const +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorBufferOffset)); + _MTL_msg_v_setInstanceDescriptorBufferOffset__NS__UInteger((const void*)this, nullptr, instanceDescriptorBufferOffset); } _MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorStride)); + return _MTL_msg_NS__UInteger_instanceDescriptorStride((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureInstanceDescriptorType MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorType() const +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorType)); + _MTL_msg_v_setInstanceDescriptorStride__NS__UInteger((const void*)this, nullptr, instanceDescriptorStride); } -_MTL_INLINE MTL::MatrixLayout MTL::IndirectInstanceAccelerationStructureDescriptor::instanceTransformationMatrixLayout() const +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::maxInstanceCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceTransformationMatrixLayout)); + return _MTL_msg_NS__UInteger_maxInstanceCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::maxInstanceCount() const +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMaxInstanceCount(NS::UInteger maxInstanceCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxInstanceCount)); + _MTL_msg_v_setMaxInstanceCount__NS__UInteger((const void*)this, nullptr, maxInstanceCount); } -_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::maxMotionTransformCount() const +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::instanceCountBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxMotionTransformCount)); + return _MTL_msg_MTL__Bufferp_instanceCountBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformBuffer() const +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceCountBuffer(MTL::Buffer* instanceCountBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformBuffer)); + _MTL_msg_v_setInstanceCountBuffer__MTL__Bufferp((const void*)this, nullptr, instanceCountBuffer); } -_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformBufferOffset() const +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceCountBufferOffset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformBufferOffset)); + return _MTL_msg_NS__UInteger_instanceCountBufferOffset((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformCountBuffer() const +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceCountBufferOffset(NS::UInteger instanceCountBufferOffset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformCountBuffer)); + _MTL_msg_v_setInstanceCountBufferOffset__NS__UInteger((const void*)this, nullptr, instanceCountBufferOffset); } -_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformCountBufferOffset() const +_MTL_INLINE MTL::AccelerationStructureInstanceDescriptorType MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformCountBufferOffset)); + return _MTL_msg_MTL__AccelerationStructureInstanceDescriptorType_instanceDescriptorType((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformStride() const +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformStride)); + _MTL_msg_v_setInstanceDescriptorType__MTL__AccelerationStructureInstanceDescriptorType((const void*)this, nullptr, instanceDescriptorType); } -_MTL_INLINE MTL::TransformType MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformType() const +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformType)); + return _MTL_msg_MTL__Bufferp_motionTransformBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceCountBuffer(const MTL::Buffer* instanceCountBuffer) +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformBuffer(MTL::Buffer* motionTransformBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceCountBuffer_), instanceCountBuffer); + _MTL_msg_v_setMotionTransformBuffer__MTL__Bufferp((const void*)this, nullptr, motionTransformBuffer); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceCountBufferOffset(NS::UInteger instanceCountBufferOffset) +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformBufferOffset() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceCountBufferOffset_), instanceCountBufferOffset); + return _MTL_msg_NS__UInteger_motionTransformBufferOffset((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorBuffer(const MTL::Buffer* instanceDescriptorBuffer) +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorBuffer_), instanceDescriptorBuffer); + _MTL_msg_v_setMotionTransformBufferOffset__NS__UInteger((const void*)this, nullptr, motionTransformBufferOffset); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset) +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::maxMotionTransformCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorBufferOffset_), instanceDescriptorBufferOffset); + return _MTL_msg_NS__UInteger_maxMotionTransformCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride) +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorStride_), instanceDescriptorStride); + _MTL_msg_v_setMaxMotionTransformCount__NS__UInteger((const void*)this, nullptr, maxMotionTransformCount); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType) +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformCountBuffer() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorType_), instanceDescriptorType); + return _MTL_msg_MTL__Bufferp_motionTransformCountBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout) +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformCountBuffer(MTL::Buffer* motionTransformCountBuffer) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceTransformationMatrixLayout_), instanceTransformationMatrixLayout); + _MTL_msg_v_setMotionTransformCountBuffer__MTL__Bufferp((const void*)this, nullptr, motionTransformCountBuffer); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMaxInstanceCount(NS::UInteger maxInstanceCount) +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformCountBufferOffset() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxInstanceCount_), maxInstanceCount); + return _MTL_msg_NS__UInteger_motionTransformCountBufferOffset((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount) +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformCountBufferOffset(NS::UInteger motionTransformCountBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxMotionTransformCount_), maxMotionTransformCount); + _MTL_msg_v_setMotionTransformCountBufferOffset__NS__UInteger((const void*)this, nullptr, motionTransformCountBufferOffset); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformBuffer(const MTL::Buffer* motionTransformBuffer) +_MTL_INLINE MTL::MatrixLayout MTL::IndirectInstanceAccelerationStructureDescriptor::instanceTransformationMatrixLayout() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformBuffer_), motionTransformBuffer); + return _MTL_msg_MTL__MatrixLayout_instanceTransformationMatrixLayout((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset) +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceTransformationMatrixLayout(MTL::MatrixLayout instanceTransformationMatrixLayout) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformBufferOffset_), motionTransformBufferOffset); + _MTL_msg_v_setInstanceTransformationMatrixLayout__MTL__MatrixLayout((const void*)this, nullptr, instanceTransformationMatrixLayout); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformCountBuffer(const MTL::Buffer* motionTransformCountBuffer) +_MTL_INLINE MTL::TransformType MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformCountBuffer_), motionTransformCountBuffer); + return _MTL_msg_MTL__TransformType_motionTransformType((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformCountBufferOffset(NS::UInteger motionTransformCountBufferOffset) +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformType(MTL::TransformType motionTransformType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformCountBufferOffset_), motionTransformCountBufferOffset); + _MTL_msg_v_setMotionTransformType__MTL__TransformType((const void*)this, nullptr, motionTransformType); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformStride(NS::UInteger motionTransformStride) +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformStride_), motionTransformStride); + return _MTL_msg_NS__UInteger_motionTransformStride((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformType(MTL::TransformType motionTransformType) +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformStride(NS::UInteger motionTransformStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformType_), motionTransformType); + _MTL_msg_v_setMotionTransformStride__NS__UInteger((const void*)this, nullptr, motionTransformStride); } -_MTL_INLINE MTL::ResourceID MTL::AccelerationStructure::gpuResourceID() const +_MTL_INLINE NS::UInteger MTL::AccelerationStructure::size() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_NS__UInteger_size((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructure::size() const +_MTL_INLINE MTL::ResourceID MTL::AccelerationStructure::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(size)); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLAccelerationStructureCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTLAccelerationStructureCommandEncoder.hpp index 5f82344ae42c..72f0caaca388 100644 --- a/thirdparty/metal-cpp/Metal/MTLAccelerationStructureCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTLAccelerationStructureCommandEncoder.hpp @@ -1,260 +1,248 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLAccelerationStructureCommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLAccelerationStructure.hpp" -#include "MTLCommandEncoder.hpp" -#include "MTLDataType.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLCommandEncoder.hpp" + +namespace MTL { + class AccelerationStructure; + class AccelerationStructureDescriptor; + class Buffer; + class CounterSampleBuffer; + class Fence; + class Heap; + class Resource; + using AccelerationStructureRefitOptions = NS::UInteger; + enum DataType : NS::UInteger; + using ResourceUsage = NS::UInteger; +} namespace MTL { -class AccelerationStructure; -class AccelerationStructureDescriptor; -class AccelerationStructurePassDescriptor; + +class AccelerationStructureCommandEncoder; class AccelerationStructurePassSampleBufferAttachmentDescriptor; class AccelerationStructurePassSampleBufferAttachmentDescriptorArray; -class Buffer; -class CounterSampleBuffer; -class Fence; -class Heap; -class Resource; +class AccelerationStructurePassDescriptor; -class AccelerationStructureCommandEncoder : public NS::Referencing +class AccelerationStructureCommandEncoder : public NS::Referencing { public: - void buildAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, const MTL::AccelerationStructureDescriptor* descriptor, const MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset); - - void copyAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructure* destinationAccelerationStructure); - - void copyAndCompactAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructure* destinationAccelerationStructure); - - void refitAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructureDescriptor* descriptor, const MTL::AccelerationStructure* destinationAccelerationStructure, const MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset); - void refitAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructureDescriptor* descriptor, const MTL::AccelerationStructure* destinationAccelerationStructure, const MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset, MTL::AccelerationStructureRefitOptions options); + void build(MTL::AccelerationStructure* accelerationStructure, MTL::AccelerationStructureDescriptor* descriptor, MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset); + void copyAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructure* destinationAccelerationStructure); + void copyAndCompactAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructure* destinationAccelerationStructure); + void refitAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructureDescriptor* descriptor, MTL::AccelerationStructure* destinationAccelerationStructure, MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset); + void refitAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructureDescriptor* descriptor, MTL::AccelerationStructure* destinationAccelerationStructure, MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset, MTL::AccelerationStructureRefitOptions options); + void sampleCountersInBuffer(MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier); + void updateFence(MTL::Fence* fence); + void useHeap(MTL::Heap* heap); + void useHeaps(const MTL::Heap* const * heaps, NS::UInteger count); + void useResource(MTL::Resource* resource, MTL::ResourceUsage usage); + void useResources(const MTL::Resource* const * resources, NS::UInteger count, MTL::ResourceUsage usage); + void waitForFence(MTL::Fence* fence); + void writeCompactedAccelerationStructureSize(MTL::AccelerationStructure* accelerationStructure, MTL::Buffer* buffer, NS::UInteger offset); + void writeCompactedAccelerationStructureSize(MTL::AccelerationStructure* accelerationStructure, MTL::Buffer* buffer, NS::UInteger offset, MTL::DataType sizeDataType); - void sampleCountersInBuffer(const MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier); - - void updateFence(const MTL::Fence* fence); - - void useHeap(const MTL::Heap* heap); - void useHeaps(const MTL::Heap* const heaps[], NS::UInteger count); - - void useResource(const MTL::Resource* resource, MTL::ResourceUsage usage); - void useResources(const MTL::Resource* const resources[], NS::UInteger count, MTL::ResourceUsage usage); - - void waitForFence(const MTL::Fence* fence); - - void writeCompactedAccelerationStructureSize(const MTL::AccelerationStructure* accelerationStructure, const MTL::Buffer* buffer, NS::UInteger offset); - void writeCompactedAccelerationStructureSize(const MTL::AccelerationStructure* accelerationStructure, const MTL::Buffer* buffer, NS::UInteger offset, MTL::DataType sizeDataType); }; + class AccelerationStructurePassSampleBufferAttachmentDescriptor : public NS::Copying { public: static AccelerationStructurePassSampleBufferAttachmentDescriptor* alloc(); + AccelerationStructurePassSampleBufferAttachmentDescriptor* init() const; - NS::UInteger endOfEncoderSampleIndex() const; - - AccelerationStructurePassSampleBufferAttachmentDescriptor* init(); - - CounterSampleBuffer* sampleBuffer() const; - - void setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex); - - void setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer); + NS::UInteger endOfEncoderSampleIndex() const; + MTL::CounterSampleBuffer* sampleBuffer() const; + void setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex); + void setSampleBuffer(MTL::CounterSampleBuffer* sampleBuffer); + void setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex); + NS::UInteger startOfEncoderSampleIndex() const; - void setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex); - NS::UInteger startOfEncoderSampleIndex() const; }; + class AccelerationStructurePassSampleBufferAttachmentDescriptorArray : public NS::Referencing { public: static AccelerationStructurePassSampleBufferAttachmentDescriptorArray* alloc(); + AccelerationStructurePassSampleBufferAttachmentDescriptorArray* init() const; - AccelerationStructurePassSampleBufferAttachmentDescriptorArray* init(); + MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); + void setObject(MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); - AccelerationStructurePassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); - void setObject(const MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); }; + class AccelerationStructurePassDescriptor : public NS::Copying { public: - static AccelerationStructurePassDescriptor* accelerationStructurePassDescriptor(); + static AccelerationStructurePassDescriptor* alloc(); + AccelerationStructurePassDescriptor* init() const; - static AccelerationStructurePassDescriptor* alloc(); + static MTL::AccelerationStructurePassDescriptor* accelerationStructurePassDescriptor(); - AccelerationStructurePassDescriptor* init(); + MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; - AccelerationStructurePassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; }; -} -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::buildAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, const MTL::AccelerationStructureDescriptor* descriptor, const MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset) +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructureCommandEncoder; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructurePassSampleBufferAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLAccelerationStructurePassDescriptor; + +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::build(MTL::AccelerationStructure* accelerationStructure, MTL::AccelerationStructureDescriptor* descriptor, MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(buildAccelerationStructure_descriptor_scratchBuffer_scratchBufferOffset_), accelerationStructure, descriptor, scratchBuffer, scratchBufferOffset); + _MTL_msg_v_buildAccelerationStructure_descriptor_scratchBuffer_scratchBufferOffset__MTL__AccelerationStructurep_MTL__AccelerationStructureDescriptorp_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, accelerationStructure, descriptor, scratchBuffer, scratchBufferOffset); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::copyAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructure* destinationAccelerationStructure) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::refitAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructureDescriptor* descriptor, MTL::AccelerationStructure* destinationAccelerationStructure, MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyAccelerationStructure_toAccelerationStructure_), sourceAccelerationStructure, destinationAccelerationStructure); + _MTL_msg_v_refitAccelerationStructure_descriptor_destination_scratchBuffer_scratchBufferOffset__MTL__AccelerationStructurep_MTL__AccelerationStructureDescriptorp_MTL__AccelerationStructurep_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, sourceAccelerationStructure, descriptor, destinationAccelerationStructure, scratchBuffer, scratchBufferOffset); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::copyAndCompactAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructure* destinationAccelerationStructure) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::refitAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructureDescriptor* descriptor, MTL::AccelerationStructure* destinationAccelerationStructure, MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset, MTL::AccelerationStructureRefitOptions options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyAndCompactAccelerationStructure_toAccelerationStructure_), sourceAccelerationStructure, destinationAccelerationStructure); + _MTL_msg_v_refitAccelerationStructure_descriptor_destination_scratchBuffer_scratchBufferOffset_options__MTL__AccelerationStructurep_MTL__AccelerationStructureDescriptorp_MTL__AccelerationStructurep_MTL__Bufferp_NS__UInteger_MTL__AccelerationStructureRefitOptions((const void*)this, nullptr, sourceAccelerationStructure, descriptor, destinationAccelerationStructure, scratchBuffer, scratchBufferOffset, options); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::refitAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructureDescriptor* descriptor, const MTL::AccelerationStructure* destinationAccelerationStructure, const MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::copyAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructure* destinationAccelerationStructure) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(refitAccelerationStructure_descriptor_destination_scratchBuffer_scratchBufferOffset_), sourceAccelerationStructure, descriptor, destinationAccelerationStructure, scratchBuffer, scratchBufferOffset); + _MTL_msg_v_copyAccelerationStructure_toAccelerationStructure__MTL__AccelerationStructurep_MTL__AccelerationStructurep((const void*)this, nullptr, sourceAccelerationStructure, destinationAccelerationStructure); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::refitAccelerationStructure(const MTL::AccelerationStructure* sourceAccelerationStructure, const MTL::AccelerationStructureDescriptor* descriptor, const MTL::AccelerationStructure* destinationAccelerationStructure, const MTL::Buffer* scratchBuffer, NS::UInteger scratchBufferOffset, MTL::AccelerationStructureRefitOptions options) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::writeCompactedAccelerationStructureSize(MTL::AccelerationStructure* accelerationStructure, MTL::Buffer* buffer, NS::UInteger offset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(refitAccelerationStructure_descriptor_destination_scratchBuffer_scratchBufferOffset_options_), sourceAccelerationStructure, descriptor, destinationAccelerationStructure, scratchBuffer, scratchBufferOffset, options); + _MTL_msg_v_writeCompactedAccelerationStructureSize_toBuffer_offset__MTL__AccelerationStructurep_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, accelerationStructure, buffer, offset); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::sampleCountersInBuffer(const MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::writeCompactedAccelerationStructureSize(MTL::AccelerationStructure* accelerationStructure, MTL::Buffer* buffer, NS::UInteger offset, MTL::DataType sizeDataType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleCountersInBuffer_atSampleIndex_withBarrier_), sampleBuffer, sampleIndex, barrier); + _MTL_msg_v_writeCompactedAccelerationStructureSize_toBuffer_offset_sizeDataType__MTL__AccelerationStructurep_MTL__Bufferp_NS__UInteger_MTL__DataType((const void*)this, nullptr, accelerationStructure, buffer, offset, sizeDataType); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::updateFence(const MTL::Fence* fence) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::copyAndCompactAccelerationStructure(MTL::AccelerationStructure* sourceAccelerationStructure, MTL::AccelerationStructure* destinationAccelerationStructure) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateFence_), fence); + _MTL_msg_v_copyAndCompactAccelerationStructure_toAccelerationStructure__MTL__AccelerationStructurep_MTL__AccelerationStructurep((const void*)this, nullptr, sourceAccelerationStructure, destinationAccelerationStructure); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::useHeap(const MTL::Heap* heap) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::updateFence(MTL::Fence* fence) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useHeap_), heap); + _MTL_msg_v_updateFence__MTL__Fencep((const void*)this, nullptr, fence); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::useHeaps(const MTL::Heap* const heaps[], NS::UInteger count) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::waitForFence(MTL::Fence* fence) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useHeaps_count_), heaps, count); + _MTL_msg_v_waitForFence__MTL__Fencep((const void*)this, nullptr, fence); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::useResource(const MTL::Resource* resource, MTL::ResourceUsage usage) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::useResource(MTL::Resource* resource, MTL::ResourceUsage usage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResource_usage_), resource, usage); + _MTL_msg_v_useResource_usage__MTL__Resourcep_MTL__ResourceUsage((const void*)this, nullptr, resource, usage); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::useResources(const MTL::Resource* const resources[], NS::UInteger count, MTL::ResourceUsage usage) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::useResources(const MTL::Resource* const * resources, NS::UInteger count, MTL::ResourceUsage usage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResources_count_usage_), resources, count, usage); + _MTL_msg_v_useResources_count_usage__constMTL__Resourcepconstp_NS__UInteger_MTL__ResourceUsage((const void*)this, nullptr, resources, count, usage); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::waitForFence(const MTL::Fence* fence) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::useHeap(MTL::Heap* heap) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitForFence_), fence); + _MTL_msg_v_useHeap__MTL__Heapp((const void*)this, nullptr, heap); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::writeCompactedAccelerationStructureSize(const MTL::AccelerationStructure* accelerationStructure, const MTL::Buffer* buffer, NS::UInteger offset) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::useHeaps(const MTL::Heap* const * heaps, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(writeCompactedAccelerationStructureSize_toBuffer_offset_), accelerationStructure, buffer, offset); + _MTL_msg_v_useHeaps_count__constMTL__Heappconstp_NS__UInteger((const void*)this, nullptr, heaps, count); } -_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::writeCompactedAccelerationStructureSize(const MTL::AccelerationStructure* accelerationStructure, const MTL::Buffer* buffer, NS::UInteger offset, MTL::DataType sizeDataType) +_MTL_INLINE void MTL::AccelerationStructureCommandEncoder::sampleCountersInBuffer(MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(writeCompactedAccelerationStructureSize_toBuffer_offset_sizeDataType_), accelerationStructure, buffer, offset, sizeDataType); + _MTL_msg_v_sampleCountersInBuffer_atSampleIndex_withBarrier__MTL__CounterSampleBufferp_NS__UInteger_bool((const void*)this, nullptr, sampleBuffer, sampleIndex, barrier); } _MTL_INLINE MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructurePassSampleBufferAttachmentDescriptor)); + return _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructurePassSampleBufferAttachmentDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::endOfEncoderSampleIndex() const +_MTL_INLINE MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(endOfEncoderSampleIndex)); + return _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::init() +_MTL_INLINE MTL::CounterSampleBuffer* MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::sampleBuffer() const { - return NS::Object::init(); + return _MTL_msg_MTL__CounterSampleBufferp_sampleBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::CounterSampleBuffer* MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::sampleBuffer() const +_MTL_INLINE void MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::setSampleBuffer(MTL::CounterSampleBuffer* sampleBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleBuffer)); + _MTL_msg_v_setSampleBuffer__MTL__CounterSampleBufferp((const void*)this, nullptr, sampleBuffer); } -_MTL_INLINE void MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex) +_MTL_INLINE NS::UInteger MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::startOfEncoderSampleIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setEndOfEncoderSampleIndex_), endOfEncoderSampleIndex); + return _MTL_msg_NS__UInteger_startOfEncoderSampleIndex((const void*)this, nullptr); } -_MTL_INLINE void MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer) +_MTL_INLINE void MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSampleBuffer_), sampleBuffer); + _MTL_msg_v_setStartOfEncoderSampleIndex__NS__UInteger((const void*)this, nullptr, startOfEncoderSampleIndex); } -_MTL_INLINE void MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex) +_MTL_INLINE NS::UInteger MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::endOfEncoderSampleIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStartOfEncoderSampleIndex_), startOfEncoderSampleIndex); + return _MTL_msg_NS__UInteger_endOfEncoderSampleIndex((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::startOfEncoderSampleIndex() const +_MTL_INLINE void MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor::setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(startOfEncoderSampleIndex)); + _MTL_msg_v_setEndOfEncoderSampleIndex__NS__UInteger((const void*)this, nullptr, endOfEncoderSampleIndex); } _MTL_INLINE MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray* MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray)); + return _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray, nullptr); } -_MTL_INLINE MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray* MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray::init() +_MTL_INLINE MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray* MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex); + return _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, attachmentIndex); } -_MTL_INLINE void MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray::setObject(const MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) +_MTL_INLINE void MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray::setObject(MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorp_NS__UInteger((const void*)this, nullptr, attachment, attachmentIndex); } -_MTL_INLINE MTL::AccelerationStructurePassDescriptor* MTL::AccelerationStructurePassDescriptor::accelerationStructurePassDescriptor() +_MTL_INLINE MTL::AccelerationStructurePassDescriptor* MTL::AccelerationStructurePassDescriptor::alloc() { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructurePassDescriptor), _MTL_PRIVATE_SEL(accelerationStructurePassDescriptor)); + return _MTL_msg_MTL__AccelerationStructurePassDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAccelerationStructurePassDescriptor, nullptr); } -_MTL_INLINE MTL::AccelerationStructurePassDescriptor* MTL::AccelerationStructurePassDescriptor::alloc() +_MTL_INLINE MTL::AccelerationStructurePassDescriptor* MTL::AccelerationStructurePassDescriptor::init() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructurePassDescriptor)); + return _MTL_msg_MTL__AccelerationStructurePassDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructurePassDescriptor* MTL::AccelerationStructurePassDescriptor::init() +_MTL_INLINE MTL::AccelerationStructurePassDescriptor* MTL::AccelerationStructurePassDescriptor::accelerationStructurePassDescriptor() { - return NS::Object::init(); + return _MTL_msg_MTL__AccelerationStructurePassDescriptorp_accelerationStructurePassDescriptor((const void*)&OBJC_CLASS_$_MTLAccelerationStructurePassDescriptor, nullptr); } _MTL_INLINE MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray* MTL::AccelerationStructurePassDescriptor::sampleBufferAttachments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleBufferAttachments)); + return _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorArrayp_sampleBufferAttachments((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLAllocation.hpp b/thirdparty/metal-cpp/Metal/MTLAllocation.hpp index ba2010588a71..ccfa704e1714 100644 --- a/thirdparty/metal-cpp/Metal/MTLAllocation.hpp +++ b/thirdparty/metal-cpp/Metal/MTLAllocation.hpp @@ -1,40 +1,30 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLAllocation.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" namespace MTL { + class Allocation : public NS::Referencing { public: NS::UInteger allocatedSize() const; + }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLAllocation; + _MTL_INLINE NS::UInteger MTL::Allocation::allocatedSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allocatedSize)); + return _MTL_msg_NS__UInteger_allocatedSize((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLArgument.hpp b/thirdparty/metal-cpp/Metal/MTLArgument.hpp index f91bd917de7c..96496b65973d 100644 --- a/thirdparty/metal-cpp/Metal/MTLArgument.hpp +++ b/thirdparty/metal-cpp/Metal/MTLArgument.hpp @@ -1,44 +1,27 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLArgument.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDataType.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTensor.hpp" -#include "MTLTexture.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class TensorExtents; + enum DataType : NS::UInteger; + enum TensorDataType : NS::Integer; + enum TextureType : NS::UInteger; +} +namespace NS { + class Array; + class String; +} namespace MTL { -class Argument; -class ArrayType; -class PointerType; -class StructMember; -class StructType; -class TensorExtents; -class TensorReferenceType; -class TextureReferenceType; -class Type; + _MTL_ENUM(NS::UInteger, IndexType) { IndexTypeUInt16 = 0, IndexTypeUInt32 = 1, @@ -76,712 +59,698 @@ _MTL_ENUM(NS::UInteger, BindingAccess) { BindingAccessReadOnly = 0, BindingAccessReadWrite = 1, BindingAccessWriteOnly = 2, - ArgumentAccessReadOnly = 0, - ArgumentAccessReadWrite = 1, - ArgumentAccessWriteOnly = 2, + ArgumentAccessReadOnly = BindingAccessReadOnly, + ArgumentAccessReadWrite = BindingAccessReadWrite, + ArgumentAccessWriteOnly = BindingAccessWriteOnly, }; + +class Type; +class StructMember; +class StructType; +class ArrayType; +class PointerType; +class TextureReferenceType; +class TensorReferenceType; +class Argument; +class Binding; +class BufferBinding; +class ThreadgroupBinding; +class TextureBinding; +class ObjectPayloadBinding; +class TensorBinding; + class Type : public NS::Referencing { public: static Type* alloc(); + Type* init() const; - DataType dataType() const; + MTL::DataType dataType() const; - Type* init(); }; + class StructMember : public NS::Referencing { public: - static StructMember* alloc(); - - NS::UInteger argumentIndex() const; - - ArrayType* arrayType(); - - DataType dataType() const; - - StructMember* init(); - - NS::String* name() const; - - NS::UInteger offset() const; + static StructMember* alloc(); + StructMember* init() const; + + NS::UInteger argumentIndex() const; + MTL::ArrayType* arrayType(); + MTL::DataType dataType() const; + NS::String* name() const; + NS::UInteger offset() const; + MTL::PointerType* pointerType(); + MTL::StructType* structType(); + MTL::TensorReferenceType* tensorReferenceType(); + MTL::TextureReferenceType* textureReferenceType(); - PointerType* pointerType(); - - StructType* structType(); - - TensorReferenceType* tensorReferenceType(); - - TextureReferenceType* textureReferenceType(); }; -class StructType : public NS::Referencing + +class StructType : public NS::Referencing { public: static StructType* alloc(); + StructType* init() const; - StructType* init(); - - StructMember* memberByName(const NS::String* name); - + MTL::StructMember* memberByName(NS::String* name); NS::Array* members() const; + }; -class ArrayType : public NS::Referencing + +class ArrayType : public NS::Referencing { public: - static ArrayType* alloc(); - - NS::UInteger argumentIndexStride() const; - - NS::UInteger arrayLength() const; - - ArrayType* elementArrayType(); - - PointerType* elementPointerType(); - - StructType* elementStructType(); - - TensorReferenceType* elementTensorReferenceType(); - - TextureReferenceType* elementTextureReferenceType(); + static ArrayType* alloc(); + ArrayType* init() const; + + NS::UInteger argumentIndexStride() const; + NS::UInteger arrayLength() const; + MTL::ArrayType* elementArrayType(); + MTL::PointerType* elementPointerType(); + MTL::StructType* elementStructType(); + MTL::TensorReferenceType* elementTensorReferenceType(); + MTL::TextureReferenceType* elementTextureReferenceType(); + MTL::DataType elementType() const; + NS::UInteger stride() const; - DataType elementType() const; - - ArrayType* init(); - - NS::UInteger stride() const; }; -class PointerType : public NS::Referencing + +class PointerType : public NS::Referencing { public: - BindingAccess access() const; - - NS::UInteger alignment() const; - static PointerType* alloc(); + PointerType* init() const; - NS::UInteger dataSize() const; - - ArrayType* elementArrayType(); - - bool elementIsArgumentBuffer() const; + MTL::BindingAccess access() const; + NS::UInteger alignment() const; + NS::UInteger dataSize() const; + MTL::ArrayType* elementArrayType(); + bool elementIsArgumentBuffer() const; + MTL::StructType* elementStructType(); + MTL::DataType elementType() const; - StructType* elementStructType(); - - DataType elementType() const; - - PointerType* init(); }; -class TextureReferenceType : public NS::Referencing + +class TextureReferenceType : public NS::Referencing { public: - BindingAccess access() const; - static TextureReferenceType* alloc(); + TextureReferenceType* init() const; - TextureReferenceType* init(); + MTL::BindingAccess access() const; + bool isDepthTexture() const; + MTL::DataType textureDataType() const; + MTL::TextureType textureType() const; - bool isDepthTexture() const; - - DataType textureDataType() const; - - TextureType textureType() const; }; -class TensorReferenceType : public NS::Referencing + +class TensorReferenceType : public NS::Referencing { public: - BindingAccess access() const; - static TensorReferenceType* alloc(); + TensorReferenceType* init() const; - TensorExtents* dimensions() const; - - DataType indexType() const; + MTL::BindingAccess access() const; + MTL::TensorExtents* dimensions() const; + MTL::DataType indexType() const; + MTL::TensorDataType tensorDataType() const; - TensorReferenceType* init(); - - TensorDataType tensorDataType() const; }; + class Argument : public NS::Referencing { public: - BindingAccess access() const; - - [[deprecated("please use isActive instead")]] - bool active() const; - static Argument* alloc(); + Argument* init() const; + + MTL::BindingAccess access() const; + bool active() const; + NS::UInteger arrayLength() const; + NS::UInteger bufferAlignment() const; + NS::UInteger bufferDataSize() const; + MTL::DataType bufferDataType() const; + MTL::PointerType* bufferPointerType() const; + MTL::StructType* bufferStructType() const; + NS::UInteger index() const; + bool isActive(); + bool isDepthTexture() const; + NS::String* name() const; + MTL::DataType textureDataType() const; + MTL::TextureType textureType() const; + NS::UInteger threadgroupMemoryAlignment() const; + NS::UInteger threadgroupMemoryDataSize() const; + MTL::ArgumentType type() const; - NS::UInteger arrayLength() const; - - NS::UInteger bufferAlignment() const; - - NS::UInteger bufferDataSize() const; - - DataType bufferDataType() const; - - PointerType* bufferPointerType() const; - - StructType* bufferStructType() const; - - NS::UInteger index() const; - - Argument* init(); - - bool isActive() const; - - bool isDepthTexture() const; - - NS::String* name() const; - - DataType textureDataType() const; - - TextureType textureType() const; - - NS::UInteger threadgroupMemoryAlignment() const; - - NS::UInteger threadgroupMemoryDataSize() const; - - ArgumentType type() const; }; + class Binding : public NS::Referencing { public: - BindingAccess access() const; + MTL::BindingAccess access() const; + bool argument() const; + NS::UInteger index() const; + bool isArgument(); + bool isUsed(); + NS::String* name() const; + MTL::BindingType type() const; + bool used() const; - [[deprecated("please use isArgument instead")]] - bool argument() const; - - NS::UInteger index() const; - - bool isArgument() const; - - bool isUsed() const; - - NS::String* name() const; - - BindingType type() const; - - [[deprecated("please use isUsed instead")]] - bool used() const; }; -class BufferBinding : public NS::Referencing + +class BufferBinding : public NS::Referencing { public: - NS::UInteger bufferAlignment() const; + NS::UInteger bufferAlignment() const; + NS::UInteger bufferDataSize() const; + MTL::DataType bufferDataType() const; + MTL::PointerType* bufferPointerType() const; + MTL::StructType* bufferStructType() const; - NS::UInteger bufferDataSize() const; - - DataType bufferDataType() const; - - PointerType* bufferPointerType() const; - - StructType* bufferStructType() const; }; -class ThreadgroupBinding : public NS::Referencing + +class ThreadgroupBinding : public NS::Referencing { public: NS::UInteger threadgroupMemoryAlignment() const; - NS::UInteger threadgroupMemoryDataSize() const; + }; -class TextureBinding : public NS::Referencing + +class TextureBinding : public NS::Referencing { public: - NS::UInteger arrayLength() const; - - [[deprecated("please use isDepthTexture instead")]] - bool depthTexture() const; - bool isDepthTexture() const; - - DataType textureDataType() const; + NS::UInteger arrayLength() const; + bool depthTexture() const; + bool isDepthTexture(); + MTL::DataType textureDataType() const; + MTL::TextureType textureType() const; - TextureType textureType() const; }; -class ObjectPayloadBinding : public NS::Referencing + +class ObjectPayloadBinding : public NS::Referencing { public: NS::UInteger objectPayloadAlignment() const; - NS::UInteger objectPayloadDataSize() const; + }; -class TensorBinding : public NS::Referencing + +class TensorBinding : public NS::Referencing { public: - TensorExtents* dimensions() const; - - DataType indexType() const; + MTL::TensorExtents* dimensions() const; + MTL::DataType indexType() const; + MTL::TensorDataType tensorDataType() const; - TensorDataType tensorDataType() const; }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLType; +extern "C" void *OBJC_CLASS_$_MTLStructMember; +extern "C" void *OBJC_CLASS_$_MTLStructType; +extern "C" void *OBJC_CLASS_$_MTLArrayType; +extern "C" void *OBJC_CLASS_$_MTLPointerType; +extern "C" void *OBJC_CLASS_$_MTLTextureReferenceType; +extern "C" void *OBJC_CLASS_$_MTLTensorReferenceType; +extern "C" void *OBJC_CLASS_$_MTLArgument; +extern "C" void *OBJC_CLASS_$_MTLBinding; +extern "C" void *OBJC_CLASS_$_MTLBufferBinding; +extern "C" void *OBJC_CLASS_$_MTLThreadgroupBinding; +extern "C" void *OBJC_CLASS_$_MTLTextureBinding; +extern "C" void *OBJC_CLASS_$_MTLObjectPayloadBinding; +extern "C" void *OBJC_CLASS_$_MTLTensorBinding; + _MTL_INLINE MTL::Type* MTL::Type::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLType)); + return _MTL_msg_MTL__Typep_alloc((const void*)&OBJC_CLASS_$_MTLType, nullptr); } -_MTL_INLINE MTL::DataType MTL::Type::dataType() const +_MTL_INLINE MTL::Type* MTL::Type::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dataType)); + return _MTL_msg_MTL__Typep_init((const void*)this, nullptr); } -_MTL_INLINE MTL::Type* MTL::Type::init() +_MTL_INLINE MTL::DataType MTL::Type::dataType() const { - return NS::Object::init(); + return _MTL_msg_MTL__DataType_dataType((const void*)this, nullptr); } _MTL_INLINE MTL::StructMember* MTL::StructMember::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLStructMember)); + return _MTL_msg_MTL__StructMemberp_alloc((const void*)&OBJC_CLASS_$_MTLStructMember, nullptr); } -_MTL_INLINE NS::UInteger MTL::StructMember::argumentIndex() const +_MTL_INLINE MTL::StructMember* MTL::StructMember::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(argumentIndex)); + return _MTL_msg_MTL__StructMemberp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::ArrayType* MTL::StructMember::arrayType() +_MTL_INLINE NS::String* MTL::StructMember::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(arrayType)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE MTL::DataType MTL::StructMember::dataType() const +_MTL_INLINE NS::UInteger MTL::StructMember::offset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dataType)); + return _MTL_msg_NS__UInteger_offset((const void*)this, nullptr); } -_MTL_INLINE MTL::StructMember* MTL::StructMember::init() +_MTL_INLINE MTL::DataType MTL::StructMember::dataType() const { - return NS::Object::init(); + return _MTL_msg_MTL__DataType_dataType((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::StructMember::name() const +_MTL_INLINE NS::UInteger MTL::StructMember::argumentIndex() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_NS__UInteger_argumentIndex((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::StructMember::offset() const +_MTL_INLINE MTL::StructType* MTL::StructMember::structType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(offset)); + return _MTL_msg_MTL__StructTypep_structType((const void*)this, nullptr); } -_MTL_INLINE MTL::PointerType* MTL::StructMember::pointerType() +_MTL_INLINE MTL::ArrayType* MTL::StructMember::arrayType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(pointerType)); + return _MTL_msg_MTL__ArrayTypep_arrayType((const void*)this, nullptr); } -_MTL_INLINE MTL::StructType* MTL::StructMember::structType() +_MTL_INLINE MTL::TextureReferenceType* MTL::StructMember::textureReferenceType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(structType)); + return _MTL_msg_MTL__TextureReferenceTypep_textureReferenceType((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorReferenceType* MTL::StructMember::tensorReferenceType() +_MTL_INLINE MTL::PointerType* MTL::StructMember::pointerType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tensorReferenceType)); + return _MTL_msg_MTL__PointerTypep_pointerType((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureReferenceType* MTL::StructMember::textureReferenceType() +_MTL_INLINE MTL::TensorReferenceType* MTL::StructMember::tensorReferenceType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureReferenceType)); + return _MTL_msg_MTL__TensorReferenceTypep_tensorReferenceType((const void*)this, nullptr); } _MTL_INLINE MTL::StructType* MTL::StructType::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLStructType)); + return _MTL_msg_MTL__StructTypep_alloc((const void*)&OBJC_CLASS_$_MTLStructType, nullptr); } -_MTL_INLINE MTL::StructType* MTL::StructType::init() +_MTL_INLINE MTL::StructType* MTL::StructType::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__StructTypep_init((const void*)this, nullptr); } -_MTL_INLINE MTL::StructMember* MTL::StructType::memberByName(const NS::String* name) +_MTL_INLINE NS::Array* MTL::StructType::members() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(memberByName_), name); + return _MTL_msg_NS__Arrayp_members((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::StructType::members() const +_MTL_INLINE MTL::StructMember* MTL::StructType::memberByName(NS::String* name) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(members)); + return _MTL_msg_MTL__StructMemberp_memberByName__NS__Stringp((const void*)this, nullptr, name); } _MTL_INLINE MTL::ArrayType* MTL::ArrayType::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLArrayType)); + return _MTL_msg_MTL__ArrayTypep_alloc((const void*)&OBJC_CLASS_$_MTLArrayType, nullptr); } -_MTL_INLINE NS::UInteger MTL::ArrayType::argumentIndexStride() const +_MTL_INLINE MTL::ArrayType* MTL::ArrayType::init() const +{ + return _MTL_msg_MTL__ArrayTypep_init((const void*)this, nullptr); +} + +_MTL_INLINE MTL::DataType MTL::ArrayType::elementType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(argumentIndexStride)); + return _MTL_msg_MTL__DataType_elementType((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::ArrayType::arrayLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(arrayLength)); + return _MTL_msg_NS__UInteger_arrayLength((const void*)this, nullptr); } -_MTL_INLINE MTL::ArrayType* MTL::ArrayType::elementArrayType() +_MTL_INLINE NS::UInteger MTL::ArrayType::stride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementArrayType)); + return _MTL_msg_NS__UInteger_stride((const void*)this, nullptr); } -_MTL_INLINE MTL::PointerType* MTL::ArrayType::elementPointerType() +_MTL_INLINE NS::UInteger MTL::ArrayType::argumentIndexStride() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementPointerType)); + return _MTL_msg_NS__UInteger_argumentIndexStride((const void*)this, nullptr); } _MTL_INLINE MTL::StructType* MTL::ArrayType::elementStructType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementStructType)); + return _MTL_msg_MTL__StructTypep_elementStructType((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorReferenceType* MTL::ArrayType::elementTensorReferenceType() +_MTL_INLINE MTL::ArrayType* MTL::ArrayType::elementArrayType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementTensorReferenceType)); + return _MTL_msg_MTL__ArrayTypep_elementArrayType((const void*)this, nullptr); } _MTL_INLINE MTL::TextureReferenceType* MTL::ArrayType::elementTextureReferenceType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementTextureReferenceType)); + return _MTL_msg_MTL__TextureReferenceTypep_elementTextureReferenceType((const void*)this, nullptr); } -_MTL_INLINE MTL::DataType MTL::ArrayType::elementType() const +_MTL_INLINE MTL::PointerType* MTL::ArrayType::elementPointerType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementType)); + return _MTL_msg_MTL__PointerTypep_elementPointerType((const void*)this, nullptr); } -_MTL_INLINE MTL::ArrayType* MTL::ArrayType::init() +_MTL_INLINE MTL::TensorReferenceType* MTL::ArrayType::elementTensorReferenceType() { - return NS::Object::init(); + return _MTL_msg_MTL__TensorReferenceTypep_elementTensorReferenceType((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::ArrayType::stride() const +_MTL_INLINE MTL::PointerType* MTL::PointerType::alloc() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stride)); + return _MTL_msg_MTL__PointerTypep_alloc((const void*)&OBJC_CLASS_$_MTLPointerType, nullptr); } -_MTL_INLINE MTL::BindingAccess MTL::PointerType::access() const +_MTL_INLINE MTL::PointerType* MTL::PointerType::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return _MTL_msg_MTL__PointerTypep_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::PointerType::alignment() const +_MTL_INLINE MTL::DataType MTL::PointerType::elementType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(alignment)); + return _MTL_msg_MTL__DataType_elementType((const void*)this, nullptr); } -_MTL_INLINE MTL::PointerType* MTL::PointerType::alloc() +_MTL_INLINE MTL::BindingAccess MTL::PointerType::access() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLPointerType)); + return _MTL_msg_MTL__BindingAccess_access((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::PointerType::dataSize() const +_MTL_INLINE NS::UInteger MTL::PointerType::alignment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dataSize)); + return _MTL_msg_NS__UInteger_alignment((const void*)this, nullptr); } -_MTL_INLINE MTL::ArrayType* MTL::PointerType::elementArrayType() +_MTL_INLINE NS::UInteger MTL::PointerType::dataSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementArrayType)); + return _MTL_msg_NS__UInteger_dataSize((const void*)this, nullptr); } _MTL_INLINE bool MTL::PointerType::elementIsArgumentBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementIsArgumentBuffer)); + return _MTL_msg_bool_elementIsArgumentBuffer((const void*)this, nullptr); } _MTL_INLINE MTL::StructType* MTL::PointerType::elementStructType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementStructType)); + return _MTL_msg_MTL__StructTypep_elementStructType((const void*)this, nullptr); } -_MTL_INLINE MTL::DataType MTL::PointerType::elementType() const +_MTL_INLINE MTL::ArrayType* MTL::PointerType::elementArrayType() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementType)); + return _MTL_msg_MTL__ArrayTypep_elementArrayType((const void*)this, nullptr); } -_MTL_INLINE MTL::PointerType* MTL::PointerType::init() +_MTL_INLINE MTL::TextureReferenceType* MTL::TextureReferenceType::alloc() { - return NS::Object::init(); + return _MTL_msg_MTL__TextureReferenceTypep_alloc((const void*)&OBJC_CLASS_$_MTLTextureReferenceType, nullptr); } -_MTL_INLINE MTL::BindingAccess MTL::TextureReferenceType::access() const +_MTL_INLINE MTL::TextureReferenceType* MTL::TextureReferenceType::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return _MTL_msg_MTL__TextureReferenceTypep_init((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureReferenceType* MTL::TextureReferenceType::alloc() +_MTL_INLINE MTL::DataType MTL::TextureReferenceType::textureDataType() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLTextureReferenceType)); + return _MTL_msg_MTL__DataType_textureDataType((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureReferenceType* MTL::TextureReferenceType::init() +_MTL_INLINE MTL::TextureType MTL::TextureReferenceType::textureType() const { - return NS::Object::init(); + return _MTL_msg_MTL__TextureType_textureType((const void*)this, nullptr); } -_MTL_INLINE bool MTL::TextureReferenceType::isDepthTexture() const +_MTL_INLINE MTL::BindingAccess MTL::TextureReferenceType::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isDepthTexture)); + return _MTL_msg_MTL__BindingAccess_access((const void*)this, nullptr); } -_MTL_INLINE MTL::DataType MTL::TextureReferenceType::textureDataType() const +_MTL_INLINE bool MTL::TextureReferenceType::isDepthTexture() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureDataType)); + return _MTL_msg_bool_isDepthTexture((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureType MTL::TextureReferenceType::textureType() const +_MTL_INLINE MTL::TensorReferenceType* MTL::TensorReferenceType::alloc() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureType)); + return _MTL_msg_MTL__TensorReferenceTypep_alloc((const void*)&OBJC_CLASS_$_MTLTensorReferenceType, nullptr); } -_MTL_INLINE MTL::BindingAccess MTL::TensorReferenceType::access() const +_MTL_INLINE MTL::TensorReferenceType* MTL::TensorReferenceType::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return _MTL_msg_MTL__TensorReferenceTypep_init((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorReferenceType* MTL::TensorReferenceType::alloc() +_MTL_INLINE MTL::TensorDataType MTL::TensorReferenceType::tensorDataType() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLTensorReferenceType)); + return _MTL_msg_MTL__TensorDataType_tensorDataType((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorExtents* MTL::TensorReferenceType::dimensions() const +_MTL_INLINE MTL::DataType MTL::TensorReferenceType::indexType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dimensions)); + return _MTL_msg_MTL__DataType_indexType((const void*)this, nullptr); } -_MTL_INLINE MTL::DataType MTL::TensorReferenceType::indexType() const +_MTL_INLINE MTL::TensorExtents* MTL::TensorReferenceType::dimensions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + return _MTL_msg_MTL__TensorExtentsp_dimensions((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorReferenceType* MTL::TensorReferenceType::init() +_MTL_INLINE MTL::BindingAccess MTL::TensorReferenceType::access() const { - return NS::Object::init(); + return _MTL_msg_MTL__BindingAccess_access((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorDataType MTL::TensorReferenceType::tensorDataType() const +_MTL_INLINE MTL::Argument* MTL::Argument::alloc() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tensorDataType)); + return _MTL_msg_MTL__Argumentp_alloc((const void*)&OBJC_CLASS_$_MTLArgument, nullptr); } -_MTL_INLINE MTL::BindingAccess MTL::Argument::access() const +_MTL_INLINE MTL::Argument* MTL::Argument::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return _MTL_msg_MTL__Argumentp_init((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Argument::active() const +_MTL_INLINE NS::String* MTL::Argument::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isActive)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE MTL::Argument* MTL::Argument::alloc() +_MTL_INLINE MTL::ArgumentType MTL::Argument::type() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLArgument)); + return _MTL_msg_MTL__ArgumentType_type((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Argument::arrayLength() const +_MTL_INLINE MTL::BindingAccess MTL::Argument::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(arrayLength)); + return _MTL_msg_MTL__BindingAccess_access((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Argument::bufferAlignment() const +_MTL_INLINE NS::UInteger MTL::Argument::index() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferAlignment)); + return _MTL_msg_NS__UInteger_index((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Argument::bufferDataSize() const +_MTL_INLINE bool MTL::Argument::active() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferDataSize)); + return _MTL_msg_bool_active((const void*)this, nullptr); } -_MTL_INLINE MTL::DataType MTL::Argument::bufferDataType() const +_MTL_INLINE NS::UInteger MTL::Argument::bufferAlignment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferDataType)); + return _MTL_msg_NS__UInteger_bufferAlignment((const void*)this, nullptr); } -_MTL_INLINE MTL::PointerType* MTL::Argument::bufferPointerType() const +_MTL_INLINE NS::UInteger MTL::Argument::bufferDataSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferPointerType)); + return _MTL_msg_NS__UInteger_bufferDataSize((const void*)this, nullptr); } -_MTL_INLINE MTL::StructType* MTL::Argument::bufferStructType() const +_MTL_INLINE MTL::DataType MTL::Argument::bufferDataType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferStructType)); + return _MTL_msg_MTL__DataType_bufferDataType((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Argument::index() const +_MTL_INLINE MTL::StructType* MTL::Argument::bufferStructType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(index)); + return _MTL_msg_MTL__StructTypep_bufferStructType((const void*)this, nullptr); } -_MTL_INLINE MTL::Argument* MTL::Argument::init() +_MTL_INLINE MTL::PointerType* MTL::Argument::bufferPointerType() const { - return NS::Object::init(); + return _MTL_msg_MTL__PointerTypep_bufferPointerType((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Argument::isActive() const +_MTL_INLINE NS::UInteger MTL::Argument::threadgroupMemoryAlignment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isActive)); + return _MTL_msg_NS__UInteger_threadgroupMemoryAlignment((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Argument::isDepthTexture() const +_MTL_INLINE NS::UInteger MTL::Argument::threadgroupMemoryDataSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isDepthTexture)); + return _MTL_msg_NS__UInteger_threadgroupMemoryDataSize((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::Argument::name() const +_MTL_INLINE MTL::TextureType MTL::Argument::textureType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_MTL__TextureType_textureType((const void*)this, nullptr); } _MTL_INLINE MTL::DataType MTL::Argument::textureDataType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureDataType)); + return _MTL_msg_MTL__DataType_textureDataType((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureType MTL::Argument::textureType() const +_MTL_INLINE bool MTL::Argument::isDepthTexture() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureType)); + return _MTL_msg_bool_isDepthTexture((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Argument::threadgroupMemoryAlignment() const +_MTL_INLINE NS::UInteger MTL::Argument::arrayLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadgroupMemoryAlignment)); + return _MTL_msg_NS__UInteger_arrayLength((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Argument::threadgroupMemoryDataSize() const +_MTL_INLINE bool MTL::Argument::isActive() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadgroupMemoryDataSize)); + return _MTL_msg_bool_isActive((const void*)this, nullptr); } -_MTL_INLINE MTL::ArgumentType MTL::Argument::type() const +_MTL_INLINE NS::String* MTL::Binding::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE MTL::BindingAccess MTL::Binding::access() const +_MTL_INLINE MTL::BindingType MTL::Binding::type() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return _MTL_msg_MTL__BindingType_type((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Binding::argument() const +_MTL_INLINE MTL::BindingAccess MTL::Binding::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isArgument)); + return _MTL_msg_MTL__BindingAccess_access((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::Binding::index() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(index)); -} - -_MTL_INLINE bool MTL::Binding::isArgument() const -{ - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isArgument)); + return _MTL_msg_NS__UInteger_index((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Binding::isUsed() const +_MTL_INLINE bool MTL::Binding::used() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isUsed)); + return _MTL_msg_bool_used((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::Binding::name() const +_MTL_INLINE bool MTL::Binding::argument() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_bool_argument((const void*)this, nullptr); } -_MTL_INLINE MTL::BindingType MTL::Binding::type() const +_MTL_INLINE bool MTL::Binding::isUsed() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); + return _MTL_msg_bool_isUsed((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Binding::used() const +_MTL_INLINE bool MTL::Binding::isArgument() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isUsed)); + return _MTL_msg_bool_isArgument((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::BufferBinding::bufferAlignment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferAlignment)); + return _MTL_msg_NS__UInteger_bufferAlignment((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::BufferBinding::bufferDataSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferDataSize)); + return _MTL_msg_NS__UInteger_bufferDataSize((const void*)this, nullptr); } _MTL_INLINE MTL::DataType MTL::BufferBinding::bufferDataType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferDataType)); + return _MTL_msg_MTL__DataType_bufferDataType((const void*)this, nullptr); } -_MTL_INLINE MTL::PointerType* MTL::BufferBinding::bufferPointerType() const +_MTL_INLINE MTL::StructType* MTL::BufferBinding::bufferStructType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferPointerType)); + return _MTL_msg_MTL__StructTypep_bufferStructType((const void*)this, nullptr); } -_MTL_INLINE MTL::StructType* MTL::BufferBinding::bufferStructType() const +_MTL_INLINE MTL::PointerType* MTL::BufferBinding::bufferPointerType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferStructType)); + return _MTL_msg_MTL__PointerTypep_bufferPointerType((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::ThreadgroupBinding::threadgroupMemoryAlignment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadgroupMemoryAlignment)); + return _MTL_msg_NS__UInteger_threadgroupMemoryAlignment((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::ThreadgroupBinding::threadgroupMemoryDataSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadgroupMemoryDataSize)); + return _MTL_msg_NS__UInteger_threadgroupMemoryDataSize((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::TextureBinding::arrayLength() const +_MTL_INLINE MTL::TextureType MTL::TextureBinding::textureType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(arrayLength)); + return _MTL_msg_MTL__TextureType_textureType((const void*)this, nullptr); } -_MTL_INLINE bool MTL::TextureBinding::depthTexture() const +_MTL_INLINE MTL::DataType MTL::TextureBinding::textureDataType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isDepthTexture)); + return _MTL_msg_MTL__DataType_textureDataType((const void*)this, nullptr); } -_MTL_INLINE bool MTL::TextureBinding::isDepthTexture() const +_MTL_INLINE bool MTL::TextureBinding::depthTexture() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isDepthTexture)); + return _MTL_msg_bool_depthTexture((const void*)this, nullptr); } -_MTL_INLINE MTL::DataType MTL::TextureBinding::textureDataType() const +_MTL_INLINE NS::UInteger MTL::TextureBinding::arrayLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureDataType)); + return _MTL_msg_NS__UInteger_arrayLength((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureType MTL::TextureBinding::textureType() const +_MTL_INLINE bool MTL::TextureBinding::isDepthTexture() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureType)); + return _MTL_msg_bool_isDepthTexture((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::ObjectPayloadBinding::objectPayloadAlignment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectPayloadAlignment)); + return _MTL_msg_NS__UInteger_objectPayloadAlignment((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::ObjectPayloadBinding::objectPayloadDataSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectPayloadDataSize)); + return _MTL_msg_NS__UInteger_objectPayloadDataSize((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorExtents* MTL::TensorBinding::dimensions() const +_MTL_INLINE MTL::TensorDataType MTL::TensorBinding::tensorDataType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dimensions)); + return _MTL_msg_MTL__TensorDataType_tensorDataType((const void*)this, nullptr); } _MTL_INLINE MTL::DataType MTL::TensorBinding::indexType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + return _MTL_msg_MTL__DataType_indexType((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorDataType MTL::TensorBinding::tensorDataType() const +_MTL_INLINE MTL::TensorExtents* MTL::TensorBinding::dimensions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tensorDataType)); + return _MTL_msg_MTL__TensorExtentsp_dimensions((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLArgumentEncoder.hpp b/thirdparty/metal-cpp/Metal/MTLArgumentEncoder.hpp index 83dbbc201a84..253624d79f32 100644 --- a/thirdparty/metal-cpp/Metal/MTLArgumentEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTLArgumentEncoder.hpp @@ -1,235 +1,209 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLArgumentEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLDepthStencil.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class AccelerationStructure; + class Buffer; + class ComputePipelineState; + class DepthStencilState; + class Device; + class IndirectCommandBuffer; + class IntersectionFunctionTable; + class RenderPipelineState; + class SamplerState; + class Texture; + class VisibleFunctionTable; +} +namespace NS { + class String; +} namespace MTL { -class AccelerationStructure; -class ArgumentEncoder; -class Buffer; -class ComputePipelineState; -class Device; -class IndirectCommandBuffer; -class IntersectionFunctionTable; -class RenderPipelineState; -class SamplerState; -class Texture; -class VisibleFunctionTable; - -static const NS::UInteger AttributeStrideStatic = NS::UIntegerMax; class ArgumentEncoder : public NS::Referencing { public: - NS::UInteger alignment() const; - - void* constantData(NS::UInteger index); - - Device* device() const; - - NS::UInteger encodedLength() const; - - NS::String* label() const; - - ArgumentEncoder* newArgumentEncoder(NS::UInteger index); - - void setAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, NS::UInteger index); - - void setArgumentBuffer(const MTL::Buffer* argumentBuffer, NS::UInteger offset); - void setArgumentBuffer(const MTL::Buffer* argumentBuffer, NS::UInteger startOffset, NS::UInteger arrayElement); - - void setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); - void setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range); - - void setComputePipelineState(const MTL::ComputePipelineState* pipeline, NS::UInteger index); - void setComputePipelineStates(const MTL::ComputePipelineState* const pipelines[], NS::Range range); - - void setDepthStencilState(const MTL::DepthStencilState* depthStencilState, NS::UInteger index); - void setDepthStencilStates(const MTL::DepthStencilState* const depthStencilStates[], NS::Range range); - - void setIndirectCommandBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::UInteger index); - void setIndirectCommandBuffers(const MTL::IndirectCommandBuffer* const buffers[], NS::Range range); + NS::UInteger alignment() const; + void * constantData(NS::UInteger index); + MTL::Device* device() const; + NS::UInteger encodedLength() const; + NS::String* label() const; + MTL::ArgumentEncoder* newArgumentEncoder(NS::UInteger index); + void setAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, NS::UInteger index); + void setArgumentBuffer(MTL::Buffer* argumentBuffer, NS::UInteger offset); + void setArgumentBuffer(MTL::Buffer* argumentBuffer, NS::UInteger startOffset, NS::UInteger arrayElement); + void setBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range); + void setComputePipelineState(MTL::ComputePipelineState* pipeline, NS::UInteger index); + void setComputePipelineStates(const MTL::ComputePipelineState* const * pipelines, NS::Range range); + void setDepthStencilState(MTL::DepthStencilState* depthStencilState, NS::UInteger index); + void setDepthStencilStates(const MTL::DepthStencilState* const * depthStencilStates, NS::Range range); + void setIndirectCommandBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::UInteger index); + void setIndirectCommandBuffers(const MTL::IndirectCommandBuffer* const * buffers, NS::Range range); + void setIntersectionFunctionTable(MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger index); + void setIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const * intersectionFunctionTables, NS::Range range); + void setLabel(NS::String* label); + void setRenderPipelineState(MTL::RenderPipelineState* pipeline, NS::UInteger index); + void setRenderPipelineStates(const MTL::RenderPipelineState* const * pipelines, NS::Range range); + void setSamplerState(MTL::SamplerState* sampler, NS::UInteger index); + void setSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range); + void setTexture(MTL::Texture* texture, NS::UInteger index); + void setTextures(const MTL::Texture* const * textures, NS::Range range); + void setVisibleFunctionTable(MTL::VisibleFunctionTable* visibleFunctionTable, NS::UInteger index); + void setVisibleFunctionTables(const MTL::VisibleFunctionTable* const * visibleFunctionTables, NS::Range range); - void setIntersectionFunctionTable(const MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger index); - void setIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const intersectionFunctionTables[], NS::Range range); - - void setLabel(const NS::String* label); - - void setRenderPipelineState(const MTL::RenderPipelineState* pipeline, NS::UInteger index); - void setRenderPipelineStates(const MTL::RenderPipelineState* const pipelines[], NS::Range range); +}; - void setSamplerState(const MTL::SamplerState* sampler, NS::UInteger index); - void setSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range); +} // namespace MTL - void setTexture(const MTL::Texture* texture, NS::UInteger index); - void setTextures(const MTL::Texture* const textures[], NS::Range range); +// --- Class symbols + inline implementations --- - void setVisibleFunctionTable(const MTL::VisibleFunctionTable* visibleFunctionTable, NS::UInteger index); - void setVisibleFunctionTables(const MTL::VisibleFunctionTable* const visibleFunctionTables[], NS::Range range); -}; +extern "C" void *OBJC_CLASS_$_MTLArgumentEncoder; -} - -_MTL_INLINE NS::UInteger MTL::ArgumentEncoder::alignment() const +_MTL_INLINE MTL::Device* MTL::ArgumentEncoder::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(alignment)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE void* MTL::ArgumentEncoder::constantData(NS::UInteger index) +_MTL_INLINE NS::String* MTL::ArgumentEncoder::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(constantDataAtIndex_), index); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::Device* MTL::ArgumentEncoder::device() const +_MTL_INLINE void MTL::ArgumentEncoder::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } _MTL_INLINE NS::UInteger MTL::ArgumentEncoder::encodedLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(encodedLength)); + return _MTL_msg_NS__UInteger_encodedLength((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::ArgumentEncoder::label() const +_MTL_INLINE NS::UInteger MTL::ArgumentEncoder::alignment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__UInteger_alignment((const void*)this, nullptr); } -_MTL_INLINE MTL::ArgumentEncoder* MTL::ArgumentEncoder::newArgumentEncoder(NS::UInteger index) +_MTL_INLINE void MTL::ArgumentEncoder::setArgumentBuffer(MTL::Buffer* argumentBuffer, NS::UInteger offset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newArgumentEncoderForBufferAtIndex_), index); + _MTL_msg_v_setArgumentBuffer_offset__MTL__Bufferp_NS__UInteger((const void*)this, nullptr, argumentBuffer, offset); } -_MTL_INLINE void MTL::ArgumentEncoder::setAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, NS::UInteger index) +_MTL_INLINE void MTL::ArgumentEncoder::setArgumentBuffer(MTL::Buffer* argumentBuffer, NS::UInteger startOffset, NS::UInteger arrayElement) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAccelerationStructure_atIndex_), accelerationStructure, index); + _MTL_msg_v_setArgumentBuffer_startOffset_arrayElement__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, argumentBuffer, startOffset, arrayElement); } -_MTL_INLINE void MTL::ArgumentEncoder::setArgumentBuffer(const MTL::Buffer* argumentBuffer, NS::UInteger offset) +_MTL_INLINE void MTL::ArgumentEncoder::setBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setArgumentBuffer_offset_), argumentBuffer, offset); + _MTL_msg_v_setBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setArgumentBuffer(const MTL::Buffer* argumentBuffer, NS::UInteger startOffset, NS::UInteger arrayElement) +_MTL_INLINE void MTL::ArgumentEncoder::setBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setArgumentBuffer_startOffset_arrayElement_), argumentBuffer, startOffset, arrayElement); + _MTL_msg_v_setBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range((const void*)this, nullptr, buffers, offsets, range); } -_MTL_INLINE void MTL::ArgumentEncoder::setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::ArgumentEncoder::setTexture(MTL::Texture* texture, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_setTexture_atIndex__MTL__Texturep_NS__UInteger((const void*)this, nullptr, texture, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range) +_MTL_INLINE void MTL::ArgumentEncoder::setTextures(const MTL::Texture* const * textures, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffers_offsets_withRange_), buffers, offsets, range); + _MTL_msg_v_setTextures_withRange__constMTL__Texturepconstp_NS__Range((const void*)this, nullptr, textures, range); } -_MTL_INLINE void MTL::ArgumentEncoder::setComputePipelineState(const MTL::ComputePipelineState* pipeline, NS::UInteger index) +_MTL_INLINE void MTL::ArgumentEncoder::setSamplerState(MTL::SamplerState* sampler, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setComputePipelineState_atIndex_), pipeline, index); + _MTL_msg_v_setSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger((const void*)this, nullptr, sampler, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setComputePipelineStates(const MTL::ComputePipelineState* const pipelines[], NS::Range range) +_MTL_INLINE void MTL::ArgumentEncoder::setSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setComputePipelineStates_withRange_), pipelines, range); + _MTL_msg_v_setSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range((const void*)this, nullptr, samplers, range); } -_MTL_INLINE void MTL::ArgumentEncoder::setDepthStencilState(const MTL::DepthStencilState* depthStencilState, NS::UInteger index) +_MTL_INLINE void * MTL::ArgumentEncoder::constantData(NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStencilState_atIndex_), depthStencilState, index); + return _MTL_msg_voidp_constantDataAtIndex__NS__UInteger((const void*)this, nullptr, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setDepthStencilStates(const MTL::DepthStencilState* const depthStencilStates[], NS::Range range) +_MTL_INLINE void MTL::ArgumentEncoder::setRenderPipelineState(MTL::RenderPipelineState* pipeline, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStencilStates_withRange_), depthStencilStates, range); + _MTL_msg_v_setRenderPipelineState_atIndex__MTL__RenderPipelineStatep_NS__UInteger((const void*)this, nullptr, pipeline, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setIndirectCommandBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::UInteger index) +_MTL_INLINE void MTL::ArgumentEncoder::setRenderPipelineStates(const MTL::RenderPipelineState* const * pipelines, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndirectCommandBuffer_atIndex_), indirectCommandBuffer, index); + _MTL_msg_v_setRenderPipelineStates_withRange__constMTL__RenderPipelineStatepconstp_NS__Range((const void*)this, nullptr, pipelines, range); } -_MTL_INLINE void MTL::ArgumentEncoder::setIndirectCommandBuffers(const MTL::IndirectCommandBuffer* const buffers[], NS::Range range) +_MTL_INLINE void MTL::ArgumentEncoder::setComputePipelineState(MTL::ComputePipelineState* pipeline, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndirectCommandBuffers_withRange_), buffers, range); + _MTL_msg_v_setComputePipelineState_atIndex__MTL__ComputePipelineStatep_NS__UInteger((const void*)this, nullptr, pipeline, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setIntersectionFunctionTable(const MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger index) +_MTL_INLINE void MTL::ArgumentEncoder::setComputePipelineStates(const MTL::ComputePipelineState* const * pipelines, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIntersectionFunctionTable_atIndex_), intersectionFunctionTable, index); + _MTL_msg_v_setComputePipelineStates_withRange__constMTL__ComputePipelineStatepconstp_NS__Range((const void*)this, nullptr, pipelines, range); } -_MTL_INLINE void MTL::ArgumentEncoder::setIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const intersectionFunctionTables[], NS::Range range) +_MTL_INLINE void MTL::ArgumentEncoder::setIndirectCommandBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIntersectionFunctionTables_withRange_), intersectionFunctionTables, range); + _MTL_msg_v_setIndirectCommandBuffer_atIndex__MTL__IndirectCommandBufferp_NS__UInteger((const void*)this, nullptr, indirectCommandBuffer, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setLabel(const NS::String* label) +_MTL_INLINE void MTL::ArgumentEncoder::setIndirectCommandBuffers(const MTL::IndirectCommandBuffer* const * buffers, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setIndirectCommandBuffers_withRange__constMTL__IndirectCommandBufferpconstp_NS__Range((const void*)this, nullptr, buffers, range); } -_MTL_INLINE void MTL::ArgumentEncoder::setRenderPipelineState(const MTL::RenderPipelineState* pipeline, NS::UInteger index) +_MTL_INLINE void MTL::ArgumentEncoder::setAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderPipelineState_atIndex_), pipeline, index); + _MTL_msg_v_setAccelerationStructure_atIndex__MTL__AccelerationStructurep_NS__UInteger((const void*)this, nullptr, accelerationStructure, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setRenderPipelineStates(const MTL::RenderPipelineState* const pipelines[], NS::Range range) +_MTL_INLINE MTL::ArgumentEncoder* MTL::ArgumentEncoder::newArgumentEncoder(NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderPipelineStates_withRange_), pipelines, range); + return _MTL_msg_MTL__ArgumentEncoderp_newArgumentEncoderForBufferAtIndex__NS__UInteger((const void*)this, nullptr, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setSamplerState(const MTL::SamplerState* sampler, NS::UInteger index) +_MTL_INLINE void MTL::ArgumentEncoder::setVisibleFunctionTable(MTL::VisibleFunctionTable* visibleFunctionTable, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSamplerState_atIndex_), sampler, index); + _MTL_msg_v_setVisibleFunctionTable_atIndex__MTL__VisibleFunctionTablep_NS__UInteger((const void*)this, nullptr, visibleFunctionTable, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range) +_MTL_INLINE void MTL::ArgumentEncoder::setVisibleFunctionTables(const MTL::VisibleFunctionTable* const * visibleFunctionTables, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSamplerStates_withRange_), samplers, range); + _MTL_msg_v_setVisibleFunctionTables_withRange__constMTL__VisibleFunctionTablepconstp_NS__Range((const void*)this, nullptr, visibleFunctionTables, range); } -_MTL_INLINE void MTL::ArgumentEncoder::setTexture(const MTL::Texture* texture, NS::UInteger index) +_MTL_INLINE void MTL::ArgumentEncoder::setIntersectionFunctionTable(MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTexture_atIndex_), texture, index); + _MTL_msg_v_setIntersectionFunctionTable_atIndex__MTL__IntersectionFunctionTablep_NS__UInteger((const void*)this, nullptr, intersectionFunctionTable, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setTextures(const MTL::Texture* const textures[], NS::Range range) +_MTL_INLINE void MTL::ArgumentEncoder::setIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const * intersectionFunctionTables, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTextures_withRange_), textures, range); + _MTL_msg_v_setIntersectionFunctionTables_withRange__constMTL__IntersectionFunctionTablepconstp_NS__Range((const void*)this, nullptr, intersectionFunctionTables, range); } -_MTL_INLINE void MTL::ArgumentEncoder::setVisibleFunctionTable(const MTL::VisibleFunctionTable* visibleFunctionTable, NS::UInteger index) +_MTL_INLINE void MTL::ArgumentEncoder::setDepthStencilState(MTL::DepthStencilState* depthStencilState, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibleFunctionTable_atIndex_), visibleFunctionTable, index); + _MTL_msg_v_setDepthStencilState_atIndex__MTL__DepthStencilStatep_NS__UInteger((const void*)this, nullptr, depthStencilState, index); } -_MTL_INLINE void MTL::ArgumentEncoder::setVisibleFunctionTables(const MTL::VisibleFunctionTable* const visibleFunctionTables[], NS::Range range) +_MTL_INLINE void MTL::ArgumentEncoder::setDepthStencilStates(const MTL::DepthStencilState* const * depthStencilStates, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibleFunctionTables_withRange_), visibleFunctionTables, range); + _MTL_msg_v_setDepthStencilStates_withRange__constMTL__DepthStencilStatepconstp_NS__Range((const void*)this, nullptr, depthStencilStates, range); } diff --git a/thirdparty/metal-cpp/Metal/MTLBinaryArchive.hpp b/thirdparty/metal-cpp/Metal/MTLBinaryArchive.hpp index c3f1689582f7..60db27916cd1 100644 --- a/thirdparty/metal-cpp/Metal/MTLBinaryArchive.hpp +++ b/thirdparty/metal-cpp/Metal/MTLBinaryArchive.hpp @@ -1,41 +1,33 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLBinaryArchive.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class ComputePipelineDescriptor; + class Device; + class FunctionDescriptor; + class Library; + class MeshRenderPipelineDescriptor; + class RenderPipelineDescriptor; + class StitchedLibraryDescriptor; + class TileRenderPipelineDescriptor; +} +namespace NS { + class Error; + class String; + class URL; +} namespace MTL { -class BinaryArchiveDescriptor; -class ComputePipelineDescriptor; -class Device; -class FunctionDescriptor; -class Library; -class MeshRenderPipelineDescriptor; -class RenderPipelineDescriptor; -class StitchedLibraryDescriptor; -class TileRenderPipelineDescriptor; + +extern NS::ErrorDomain const BinaryArchiveDomain __asm__("_MTLBinaryArchiveDomain"); _MTL_ENUM(NS::UInteger, BinaryArchiveError) { BinaryArchiveErrorNone = 0, BinaryArchiveErrorInvalidFile = 1, @@ -44,109 +36,110 @@ _MTL_ENUM(NS::UInteger, BinaryArchiveError) { BinaryArchiveErrorInternalError = 4, }; -_MTL_CONST(NS::ErrorDomain, BinaryArchiveDomain); + +class BinaryArchiveDescriptor; +class BinaryArchive; + class BinaryArchiveDescriptor : public NS::Copying { public: static BinaryArchiveDescriptor* alloc(); + BinaryArchiveDescriptor* init() const; - BinaryArchiveDescriptor* init(); + void setUrl(NS::URL* url); + NS::URL* url() const; - void setUrl(const NS::URL* url); - NS::URL* url() const; }; + class BinaryArchive : public NS::Referencing { public: - bool addComputePipelineFunctions(const MTL::ComputePipelineDescriptor* descriptor, NS::Error** error); - - bool addFunction(const MTL::FunctionDescriptor* descriptor, const MTL::Library* library, NS::Error** error); - - bool addLibrary(const MTL::StitchedLibraryDescriptor* descriptor, NS::Error** error); - - bool addMeshRenderPipelineFunctions(const MTL::MeshRenderPipelineDescriptor* descriptor, NS::Error** error); + bool addComputePipelineFunctions(MTL::ComputePipelineDescriptor* descriptor, NS::Error** error); + bool addFunction(MTL::FunctionDescriptor* descriptor, MTL::Library* library, NS::Error** error); + bool addLibrary(MTL::StitchedLibraryDescriptor* descriptor, NS::Error** error); + bool addMeshRenderPipelineFunctions(MTL::MeshRenderPipelineDescriptor* descriptor, NS::Error** error); + bool addRenderPipelineFunctions(MTL::RenderPipelineDescriptor* descriptor, NS::Error** error); + bool addTileRenderPipelineFunctions(MTL::TileRenderPipelineDescriptor* descriptor, NS::Error** error); + MTL::Device* device() const; + NS::String* label() const; + bool serializeToURL(NS::URL* url, NS::Error** error); + void setLabel(NS::String* label); - bool addRenderPipelineFunctions(const MTL::RenderPipelineDescriptor* descriptor, NS::Error** error); - - bool addTileRenderPipelineFunctions(const MTL::TileRenderPipelineDescriptor* descriptor, NS::Error** error); - - Device* device() const; +}; - NS::String* label() const; +} // namespace MTL - bool serializeToURL(const NS::URL* url, NS::Error** error); +// --- Class symbols + inline implementations --- - void setLabel(const NS::String* label); -}; +extern "C" void *OBJC_CLASS_$_MTLBinaryArchiveDescriptor; +extern "C" void *OBJC_CLASS_$_MTLBinaryArchive; -} -_MTL_PRIVATE_DEF_CONST(NS::ErrorDomain, BinaryArchiveDomain); _MTL_INLINE MTL::BinaryArchiveDescriptor* MTL::BinaryArchiveDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLBinaryArchiveDescriptor)); + return _MTL_msg_MTL__BinaryArchiveDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLBinaryArchiveDescriptor, nullptr); } -_MTL_INLINE MTL::BinaryArchiveDescriptor* MTL::BinaryArchiveDescriptor::init() +_MTL_INLINE MTL::BinaryArchiveDescriptor* MTL::BinaryArchiveDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__BinaryArchiveDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE void MTL::BinaryArchiveDescriptor::setUrl(const NS::URL* url) +_MTL_INLINE NS::URL* MTL::BinaryArchiveDescriptor::url() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setUrl_), url); + return _MTL_msg_NS__URLp_url((const void*)this, nullptr); } -_MTL_INLINE NS::URL* MTL::BinaryArchiveDescriptor::url() const +_MTL_INLINE void MTL::BinaryArchiveDescriptor::setUrl(NS::URL* url) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(url)); + _MTL_msg_v_setUrl__NS__URLp((const void*)this, nullptr, url); } -_MTL_INLINE bool MTL::BinaryArchive::addComputePipelineFunctions(const MTL::ComputePipelineDescriptor* descriptor, NS::Error** error) +_MTL_INLINE NS::String* MTL::BinaryArchive::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(addComputePipelineFunctionsWithDescriptor_error_), descriptor, error); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE bool MTL::BinaryArchive::addFunction(const MTL::FunctionDescriptor* descriptor, const MTL::Library* library, NS::Error** error) +_MTL_INLINE void MTL::BinaryArchive::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(addFunctionWithDescriptor_library_error_), descriptor, library, error); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE bool MTL::BinaryArchive::addLibrary(const MTL::StitchedLibraryDescriptor* descriptor, NS::Error** error) +_MTL_INLINE MTL::Device* MTL::BinaryArchive::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(addLibraryWithDescriptor_error_), descriptor, error); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE bool MTL::BinaryArchive::addMeshRenderPipelineFunctions(const MTL::MeshRenderPipelineDescriptor* descriptor, NS::Error** error) +_MTL_INLINE bool MTL::BinaryArchive::addComputePipelineFunctions(MTL::ComputePipelineDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(addMeshRenderPipelineFunctionsWithDescriptor_error_), descriptor, error); + return _MTL_msg_bool_addComputePipelineFunctionsWithDescriptor_error__MTL__ComputePipelineDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE bool MTL::BinaryArchive::addRenderPipelineFunctions(const MTL::RenderPipelineDescriptor* descriptor, NS::Error** error) +_MTL_INLINE bool MTL::BinaryArchive::addRenderPipelineFunctions(MTL::RenderPipelineDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(addRenderPipelineFunctionsWithDescriptor_error_), descriptor, error); + return _MTL_msg_bool_addRenderPipelineFunctionsWithDescriptor_error__MTL__RenderPipelineDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE bool MTL::BinaryArchive::addTileRenderPipelineFunctions(const MTL::TileRenderPipelineDescriptor* descriptor, NS::Error** error) +_MTL_INLINE bool MTL::BinaryArchive::addTileRenderPipelineFunctions(MTL::TileRenderPipelineDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(addTileRenderPipelineFunctionsWithDescriptor_error_), descriptor, error); + return _MTL_msg_bool_addTileRenderPipelineFunctionsWithDescriptor_error__MTL__TileRenderPipelineDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL::Device* MTL::BinaryArchive::device() const +_MTL_INLINE bool MTL::BinaryArchive::addMeshRenderPipelineFunctions(MTL::MeshRenderPipelineDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_bool_addMeshRenderPipelineFunctionsWithDescriptor_error__MTL__MeshRenderPipelineDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE NS::String* MTL::BinaryArchive::label() const +_MTL_INLINE bool MTL::BinaryArchive::addLibrary(MTL::StitchedLibraryDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_bool_addLibraryWithDescriptor_error__MTL__StitchedLibraryDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE bool MTL::BinaryArchive::serializeToURL(const NS::URL* url, NS::Error** error) +_MTL_INLINE bool MTL::BinaryArchive::serializeToURL(NS::URL* url, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(serializeToURL_error_), url, error); + return _MTL_msg_bool_serializeToURL_error__NS__URLp_NS__Errorpp((const void*)this, nullptr, url, error); } -_MTL_INLINE void MTL::BinaryArchive::setLabel(const NS::String* label) +_MTL_INLINE bool MTL::BinaryArchive::addFunction(MTL::FunctionDescriptor* descriptor, MTL::Library* library, NS::Error** error) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_bool_addFunctionWithDescriptor_library_error__MTL__FunctionDescriptorp_MTL__Libraryp_NS__Errorpp((const void*)this, nullptr, descriptor, library, error); } diff --git a/thirdparty/metal-cpp/Metal/MTLBlitCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTLBlitCommandEncoder.hpp index 319f05ef5f78..63f3c03ca1b4 100644 --- a/thirdparty/metal-cpp/Metal/MTLBlitCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTLBlitCommandEncoder.hpp @@ -1,226 +1,188 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLBlitCommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLCommandEncoder.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLCommandEncoder.hpp" + +namespace MTL { + class Buffer; + class CounterSampleBuffer; + class Fence; + class IndirectCommandBuffer; + class Resource; + class Tensor; + class TensorExtents; + class Texture; +} namespace MTL { -class Buffer; -class CounterSampleBuffer; -class Fence; -class IndirectCommandBuffer; -class Resource; -class Tensor; -class TensorExtents; -class Texture; _MTL_OPTIONS(NS::UInteger, BlitOption) { BlitOptionNone = 0, - BlitOptionDepthFromDepthStencil = 1, + BlitOptionDepthFromDepthStencil = 1 << 0, BlitOptionStencilFromDepthStencil = 1 << 1, BlitOptionRowLinearPVRTC = 1 << 2, }; -class BlitCommandEncoder : public NS::Referencing + +class BlitCommandEncoder : public NS::Referencing { public: - void copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin); - void copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin, MTL::BlitOption options); - void copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger size); - - void copyFromTensor(const MTL::Tensor* sourceTensor, const MTL::TensorExtents* sourceOrigin, const MTL::TensorExtents* sourceDimensions, const MTL::Tensor* destinationTensor, const MTL::TensorExtents* destinationOrigin, const MTL::TensorExtents* destinationDimensions); - - void copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin); - void copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage); - void copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage, MTL::BlitOption options); - void copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, NS::UInteger sliceCount, NS::UInteger levelCount); - void copyFromTexture(const MTL::Texture* sourceTexture, const MTL::Texture* destinationTexture); - - void copyIndirectCommandBuffer(const MTL::IndirectCommandBuffer* source, NS::Range sourceRange, const MTL::IndirectCommandBuffer* destination, NS::UInteger destinationIndex); - - void fillBuffer(const MTL::Buffer* buffer, NS::Range range, uint8_t value); - - void generateMipmaps(const MTL::Texture* texture); - - void getTextureAccessCounters(const MTL::Texture* texture, MTL::Region region, NS::UInteger mipLevel, NS::UInteger slice, bool resetCounters, const MTL::Buffer* countersBuffer, NS::UInteger countersBufferOffset); - - void optimizeContentsForCPUAccess(const MTL::Texture* texture); - void optimizeContentsForCPUAccess(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level); - - void optimizeContentsForGPUAccess(const MTL::Texture* texture); - void optimizeContentsForGPUAccess(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level); + void copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin); + void copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin, MTL::BlitOption options); + void copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger size); + void copyFromTensor(MTL::Tensor* sourceTensor, MTL::TensorExtents* sourceOrigin, MTL::TensorExtents* sourceDimensions, MTL::Tensor* destinationTensor, MTL::TensorExtents* destinationOrigin, MTL::TensorExtents* destinationDimensions); + void copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin); + void copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage); + void copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage, MTL::BlitOption options); + void copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, NS::UInteger sliceCount, NS::UInteger levelCount); + void copyFromTexture(MTL::Texture* sourceTexture, MTL::Texture* destinationTexture); + void copyIndirectCommandBuffer(MTL::IndirectCommandBuffer* source, NS::Range sourceRange, MTL::IndirectCommandBuffer* destination, NS::UInteger destinationIndex); + void fillBuffer(MTL::Buffer* buffer, NS::Range range, uint8_t value); + void generateMipmaps(MTL::Texture* texture); + void getTextureAccessCounters(MTL::Texture* texture, MTL::Region region, NS::UInteger mipLevel, NS::UInteger slice, bool resetCounters, MTL::Buffer* countersBuffer, NS::UInteger countersBufferOffset); + void optimizeContents(MTL::Texture* texture); + void optimizeContents(MTL::Texture* texture, NS::UInteger slice, NS::UInteger level); + void optimizeIndirectCommandBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range range); + void resetCommandsInBuffer(MTL::IndirectCommandBuffer* buffer, NS::Range range); + void resetTextureAccessCounters(MTL::Texture* texture, MTL::Region region, NS::UInteger mipLevel, NS::UInteger slice); + void resolveCounters(MTL::CounterSampleBuffer* sampleBuffer, NS::Range range, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset); + void sampleCountersInBuffer(MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier); + void synchronize(MTL::Resource* resource); + void synchronize(MTL::Texture* texture, NS::UInteger slice, NS::UInteger level); + void updateFence(MTL::Fence* fence); + void waitForFence(MTL::Fence* fence); - void optimizeIndirectCommandBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range range); - - void resetCommandsInBuffer(const MTL::IndirectCommandBuffer* buffer, NS::Range range); - - void resetTextureAccessCounters(const MTL::Texture* texture, MTL::Region region, NS::UInteger mipLevel, NS::UInteger slice); - - void resolveCounters(const MTL::CounterSampleBuffer* sampleBuffer, NS::Range range, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset); - - void sampleCountersInBuffer(const MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier); - - void synchronizeResource(const MTL::Resource* resource); - - void synchronizeTexture(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level); - - void updateFence(const MTL::Fence* fence); - - void waitForFence(const MTL::Fence* fence); }; -} -_MTL_INLINE void MTL::BlitCommandEncoder::copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin) -{ - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_), sourceBuffer, sourceOffset, sourceBytesPerRow, sourceBytesPerImage, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin); -} +} // namespace MTL -_MTL_INLINE void MTL::BlitCommandEncoder::copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin, MTL::BlitOption options) -{ - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_options_), sourceBuffer, sourceOffset, sourceBytesPerRow, sourceBytesPerImage, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin, options); -} +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLBlitCommandEncoder; -_MTL_INLINE void MTL::BlitCommandEncoder::copyFromBuffer(const MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger size) +_MTL_INLINE void MTL::BlitCommandEncoder::synchronize(MTL::Resource* resource) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromBuffer_sourceOffset_toBuffer_destinationOffset_size_), sourceBuffer, sourceOffset, destinationBuffer, destinationOffset, size); + _MTL_msg_v_synchronizeResource__MTL__Resourcep((const void*)this, nullptr, resource); } -_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTensor(const MTL::Tensor* sourceTensor, const MTL::TensorExtents* sourceOrigin, const MTL::TensorExtents* sourceDimensions, const MTL::Tensor* destinationTensor, const MTL::TensorExtents* destinationOrigin, const MTL::TensorExtents* destinationDimensions) +_MTL_INLINE void MTL::BlitCommandEncoder::synchronize(MTL::Texture* texture, NS::UInteger slice, NS::UInteger level) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTensor_sourceOrigin_sourceDimensions_toTensor_destinationOrigin_destinationDimensions_), sourceTensor, sourceOrigin, sourceDimensions, destinationTensor, destinationOrigin, destinationDimensions); + _MTL_msg_v_synchronizeTexture_slice_level__MTL__Texturep_NS__UInteger_NS__UInteger((const void*)this, nullptr, texture, slice, level); } -_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin) +_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_), sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin); + _MTL_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin((const void*)this, nullptr, sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin); } -_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage) +_MTL_INLINE void MTL::BlitCommandEncoder::copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage_), sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationBuffer, destinationOffset, destinationBytesPerRow, destinationBytesPerImage); + _MTL_msg_v_copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin((const void*)this, nullptr, sourceBuffer, sourceOffset, sourceBytesPerRow, sourceBytesPerImage, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin); } -_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage, MTL::BlitOption options) +_MTL_INLINE void MTL::BlitCommandEncoder::copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin, MTL::BlitOption options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage_options_), sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationBuffer, destinationOffset, destinationBytesPerRow, destinationBytesPerImage, options); + _MTL_msg_v_copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_options__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__BlitOption((const void*)this, nullptr, sourceBuffer, sourceOffset, sourceBytesPerRow, sourceBytesPerImage, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin, options); } -_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, NS::UInteger sliceCount, NS::UInteger levelCount) +_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTexture_sourceSlice_sourceLevel_toTexture_destinationSlice_destinationLevel_sliceCount_levelCount_), sourceTexture, sourceSlice, sourceLevel, destinationTexture, destinationSlice, destinationLevel, sliceCount, levelCount); + _MTL_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationBuffer, destinationOffset, destinationBytesPerRow, destinationBytesPerImage); } -_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTexture(const MTL::Texture* sourceTexture, const MTL::Texture* destinationTexture) +_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger destinationBytesPerRow, NS::UInteger destinationBytesPerImage, MTL::BlitOption options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyFromTexture_toTexture_), sourceTexture, destinationTexture); + _MTL_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage_options__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__BlitOption((const void*)this, nullptr, sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationBuffer, destinationOffset, destinationBytesPerRow, destinationBytesPerImage, options); } -_MTL_INLINE void MTL::BlitCommandEncoder::copyIndirectCommandBuffer(const MTL::IndirectCommandBuffer* source, NS::Range sourceRange, const MTL::IndirectCommandBuffer* destination, NS::UInteger destinationIndex) +_MTL_INLINE void MTL::BlitCommandEncoder::generateMipmaps(MTL::Texture* texture) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyIndirectCommandBuffer_sourceRange_destination_destinationIndex_), source, sourceRange, destination, destinationIndex); + _MTL_msg_v_generateMipmapsForTexture__MTL__Texturep((const void*)this, nullptr, texture); } -_MTL_INLINE void MTL::BlitCommandEncoder::fillBuffer(const MTL::Buffer* buffer, NS::Range range, uint8_t value) +_MTL_INLINE void MTL::BlitCommandEncoder::fillBuffer(MTL::Buffer* buffer, NS::Range range, uint8_t value) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(fillBuffer_range_value_), buffer, range, value); + _MTL_msg_v_fillBuffer_range_value__MTL__Bufferp_NS__Range_uint8_t((const void*)this, nullptr, buffer, range, value); } -_MTL_INLINE void MTL::BlitCommandEncoder::generateMipmaps(const MTL::Texture* texture) +_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, NS::UInteger sliceCount, NS::UInteger levelCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(generateMipmapsForTexture_), texture); + _MTL_msg_v_copyFromTexture_sourceSlice_sourceLevel_toTexture_destinationSlice_destinationLevel_sliceCount_levelCount__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Texturep_NS__UInteger_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, sourceTexture, sourceSlice, sourceLevel, destinationTexture, destinationSlice, destinationLevel, sliceCount, levelCount); } -_MTL_INLINE void MTL::BlitCommandEncoder::getTextureAccessCounters(const MTL::Texture* texture, MTL::Region region, NS::UInteger mipLevel, NS::UInteger slice, bool resetCounters, const MTL::Buffer* countersBuffer, NS::UInteger countersBufferOffset) +_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTexture(MTL::Texture* sourceTexture, MTL::Texture* destinationTexture) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(getTextureAccessCounters_region_mipLevel_slice_resetCounters_countersBuffer_countersBufferOffset_), texture, region, mipLevel, slice, resetCounters, countersBuffer, countersBufferOffset); + _MTL_msg_v_copyFromTexture_toTexture__MTL__Texturep_MTL__Texturep((const void*)this, nullptr, sourceTexture, destinationTexture); } -_MTL_INLINE void MTL::BlitCommandEncoder::optimizeContentsForCPUAccess(const MTL::Texture* texture) +_MTL_INLINE void MTL::BlitCommandEncoder::copyFromBuffer(MTL::Buffer* sourceBuffer, NS::UInteger sourceOffset, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset, NS::UInteger size) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizeContentsForCPUAccess_), texture); + _MTL_msg_v_copyFromBuffer_sourceOffset_toBuffer_destinationOffset_size__MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, sourceBuffer, sourceOffset, destinationBuffer, destinationOffset, size); } -_MTL_INLINE void MTL::BlitCommandEncoder::optimizeContentsForCPUAccess(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level) +_MTL_INLINE void MTL::BlitCommandEncoder::updateFence(MTL::Fence* fence) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizeContentsForCPUAccess_slice_level_), texture, slice, level); + _MTL_msg_v_updateFence__MTL__Fencep((const void*)this, nullptr, fence); } -_MTL_INLINE void MTL::BlitCommandEncoder::optimizeContentsForGPUAccess(const MTL::Texture* texture) +_MTL_INLINE void MTL::BlitCommandEncoder::waitForFence(MTL::Fence* fence) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizeContentsForGPUAccess_), texture); + _MTL_msg_v_waitForFence__MTL__Fencep((const void*)this, nullptr, fence); } -_MTL_INLINE void MTL::BlitCommandEncoder::optimizeContentsForGPUAccess(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level) +_MTL_INLINE void MTL::BlitCommandEncoder::getTextureAccessCounters(MTL::Texture* texture, MTL::Region region, NS::UInteger mipLevel, NS::UInteger slice, bool resetCounters, MTL::Buffer* countersBuffer, NS::UInteger countersBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizeContentsForGPUAccess_slice_level_), texture, slice, level); + _MTL_msg_v_getTextureAccessCounters_region_mipLevel_slice_resetCounters_countersBuffer_countersBufferOffset__MTL__Texturep_MTL__Region_NS__UInteger_NS__UInteger_bool_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, texture, region, mipLevel, slice, resetCounters, countersBuffer, countersBufferOffset); } -_MTL_INLINE void MTL::BlitCommandEncoder::optimizeIndirectCommandBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range range) +_MTL_INLINE void MTL::BlitCommandEncoder::resetTextureAccessCounters(MTL::Texture* texture, MTL::Region region, NS::UInteger mipLevel, NS::UInteger slice) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizeIndirectCommandBuffer_withRange_), indirectCommandBuffer, range); + _MTL_msg_v_resetTextureAccessCounters_region_mipLevel_slice__MTL__Texturep_MTL__Region_NS__UInteger_NS__UInteger((const void*)this, nullptr, texture, region, mipLevel, slice); } -_MTL_INLINE void MTL::BlitCommandEncoder::resetCommandsInBuffer(const MTL::IndirectCommandBuffer* buffer, NS::Range range) +_MTL_INLINE void MTL::BlitCommandEncoder::optimizeContents(MTL::Texture* texture) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(resetCommandsInBuffer_withRange_), buffer, range); + _MTL_msg_v_optimizeContentsForGPUAccess__MTL__Texturep((const void*)this, nullptr, texture); } -_MTL_INLINE void MTL::BlitCommandEncoder::resetTextureAccessCounters(const MTL::Texture* texture, MTL::Region region, NS::UInteger mipLevel, NS::UInteger slice) +_MTL_INLINE void MTL::BlitCommandEncoder::optimizeContents(MTL::Texture* texture, NS::UInteger slice, NS::UInteger level) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(resetTextureAccessCounters_region_mipLevel_slice_), texture, region, mipLevel, slice); + _MTL_msg_v_optimizeContentsForGPUAccess_slice_level__MTL__Texturep_NS__UInteger_NS__UInteger((const void*)this, nullptr, texture, slice, level); } -_MTL_INLINE void MTL::BlitCommandEncoder::resolveCounters(const MTL::CounterSampleBuffer* sampleBuffer, NS::Range range, const MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset) +_MTL_INLINE void MTL::BlitCommandEncoder::resetCommandsInBuffer(MTL::IndirectCommandBuffer* buffer, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(resolveCounters_inRange_destinationBuffer_destinationOffset_), sampleBuffer, range, destinationBuffer, destinationOffset); + _MTL_msg_v_resetCommandsInBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range((const void*)this, nullptr, buffer, range); } -_MTL_INLINE void MTL::BlitCommandEncoder::sampleCountersInBuffer(const MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier) +_MTL_INLINE void MTL::BlitCommandEncoder::copyIndirectCommandBuffer(MTL::IndirectCommandBuffer* source, NS::Range sourceRange, MTL::IndirectCommandBuffer* destination, NS::UInteger destinationIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleCountersInBuffer_atSampleIndex_withBarrier_), sampleBuffer, sampleIndex, barrier); + _MTL_msg_v_copyIndirectCommandBuffer_sourceRange_destination_destinationIndex__MTL__IndirectCommandBufferp_NS__Range_MTL__IndirectCommandBufferp_NS__UInteger((const void*)this, nullptr, source, sourceRange, destination, destinationIndex); } -_MTL_INLINE void MTL::BlitCommandEncoder::synchronizeResource(const MTL::Resource* resource) +_MTL_INLINE void MTL::BlitCommandEncoder::optimizeIndirectCommandBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(synchronizeResource_), resource); + _MTL_msg_v_optimizeIndirectCommandBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range((const void*)this, nullptr, indirectCommandBuffer, range); } -_MTL_INLINE void MTL::BlitCommandEncoder::synchronizeTexture(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level) +_MTL_INLINE void MTL::BlitCommandEncoder::sampleCountersInBuffer(MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(synchronizeTexture_slice_level_), texture, slice, level); + _MTL_msg_v_sampleCountersInBuffer_atSampleIndex_withBarrier__MTL__CounterSampleBufferp_NS__UInteger_bool((const void*)this, nullptr, sampleBuffer, sampleIndex, barrier); } -_MTL_INLINE void MTL::BlitCommandEncoder::updateFence(const MTL::Fence* fence) +_MTL_INLINE void MTL::BlitCommandEncoder::resolveCounters(MTL::CounterSampleBuffer* sampleBuffer, NS::Range range, MTL::Buffer* destinationBuffer, NS::UInteger destinationOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateFence_), fence); + _MTL_msg_v_resolveCounters_inRange_destinationBuffer_destinationOffset__MTL__CounterSampleBufferp_NS__Range_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, sampleBuffer, range, destinationBuffer, destinationOffset); } -_MTL_INLINE void MTL::BlitCommandEncoder::waitForFence(const MTL::Fence* fence) +_MTL_INLINE void MTL::BlitCommandEncoder::copyFromTensor(MTL::Tensor* sourceTensor, MTL::TensorExtents* sourceOrigin, MTL::TensorExtents* sourceDimensions, MTL::Tensor* destinationTensor, MTL::TensorExtents* destinationOrigin, MTL::TensorExtents* destinationDimensions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitForFence_), fence); + _MTL_msg_v_copyFromTensor_sourceOrigin_sourceDimensions_toTensor_destinationOrigin_destinationDimensions__MTL__Tensorp_MTL__TensorExtentsp_MTL__TensorExtentsp_MTL__Tensorp_MTL__TensorExtentsp_MTL__TensorExtentsp((const void*)this, nullptr, sourceTensor, sourceOrigin, sourceDimensions, destinationTensor, destinationOrigin, destinationDimensions); } diff --git a/thirdparty/metal-cpp/Metal/MTLBlitPass.hpp b/thirdparty/metal-cpp/Metal/MTLBlitPass.hpp index 6b15e0b5d802..ab65e89099da 100644 --- a/thirdparty/metal-cpp/Metal/MTLBlitPass.hpp +++ b/thirdparty/metal-cpp/Metal/MTLBlitPass.hpp @@ -1,154 +1,146 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLBlitPass.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class CounterSampleBuffer; +} namespace MTL { -class BlitPassDescriptor; + class BlitPassSampleBufferAttachmentDescriptor; class BlitPassSampleBufferAttachmentDescriptorArray; -class CounterSampleBuffer; +class BlitPassDescriptor; class BlitPassSampleBufferAttachmentDescriptor : public NS::Copying { public: static BlitPassSampleBufferAttachmentDescriptor* alloc(); + BlitPassSampleBufferAttachmentDescriptor* init() const; - NS::UInteger endOfEncoderSampleIndex() const; - - BlitPassSampleBufferAttachmentDescriptor* init(); + NS::UInteger endOfEncoderSampleIndex() const; + MTL::CounterSampleBuffer* sampleBuffer() const; + void setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex); + void setSampleBuffer(MTL::CounterSampleBuffer* sampleBuffer); + void setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex); + NS::UInteger startOfEncoderSampleIndex() const; - CounterSampleBuffer* sampleBuffer() const; - - void setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex); - - void setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer); - - void setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex); - NS::UInteger startOfEncoderSampleIndex() const; }; + class BlitPassSampleBufferAttachmentDescriptorArray : public NS::Referencing { public: static BlitPassSampleBufferAttachmentDescriptorArray* alloc(); + BlitPassSampleBufferAttachmentDescriptorArray* init() const; - BlitPassSampleBufferAttachmentDescriptorArray* init(); + MTL::BlitPassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); + void setObject(MTL::BlitPassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); - BlitPassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); - void setObject(const MTL::BlitPassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); }; + class BlitPassDescriptor : public NS::Copying { public: - static BlitPassDescriptor* alloc(); + static BlitPassDescriptor* alloc(); + BlitPassDescriptor* init() const; - static BlitPassDescriptor* blitPassDescriptor(); + static MTL::BlitPassDescriptor* blitPassDescriptor(); - BlitPassDescriptor* init(); + MTL::BlitPassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; - BlitPassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLBlitPassSampleBufferAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLBlitPassSampleBufferAttachmentDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLBlitPassDescriptor; + _MTL_INLINE MTL::BlitPassSampleBufferAttachmentDescriptor* MTL::BlitPassSampleBufferAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLBlitPassSampleBufferAttachmentDescriptor)); + return _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLBlitPassSampleBufferAttachmentDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::BlitPassSampleBufferAttachmentDescriptor::endOfEncoderSampleIndex() const +_MTL_INLINE MTL::BlitPassSampleBufferAttachmentDescriptor* MTL::BlitPassSampleBufferAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(endOfEncoderSampleIndex)); + return _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::BlitPassSampleBufferAttachmentDescriptor* MTL::BlitPassSampleBufferAttachmentDescriptor::init() +_MTL_INLINE MTL::CounterSampleBuffer* MTL::BlitPassSampleBufferAttachmentDescriptor::sampleBuffer() const { - return NS::Object::init(); + return _MTL_msg_MTL__CounterSampleBufferp_sampleBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::CounterSampleBuffer* MTL::BlitPassSampleBufferAttachmentDescriptor::sampleBuffer() const +_MTL_INLINE void MTL::BlitPassSampleBufferAttachmentDescriptor::setSampleBuffer(MTL::CounterSampleBuffer* sampleBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleBuffer)); + _MTL_msg_v_setSampleBuffer__MTL__CounterSampleBufferp((const void*)this, nullptr, sampleBuffer); } -_MTL_INLINE void MTL::BlitPassSampleBufferAttachmentDescriptor::setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex) +_MTL_INLINE NS::UInteger MTL::BlitPassSampleBufferAttachmentDescriptor::startOfEncoderSampleIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setEndOfEncoderSampleIndex_), endOfEncoderSampleIndex); + return _MTL_msg_NS__UInteger_startOfEncoderSampleIndex((const void*)this, nullptr); } -_MTL_INLINE void MTL::BlitPassSampleBufferAttachmentDescriptor::setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer) +_MTL_INLINE void MTL::BlitPassSampleBufferAttachmentDescriptor::setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSampleBuffer_), sampleBuffer); + _MTL_msg_v_setStartOfEncoderSampleIndex__NS__UInteger((const void*)this, nullptr, startOfEncoderSampleIndex); } -_MTL_INLINE void MTL::BlitPassSampleBufferAttachmentDescriptor::setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex) +_MTL_INLINE NS::UInteger MTL::BlitPassSampleBufferAttachmentDescriptor::endOfEncoderSampleIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStartOfEncoderSampleIndex_), startOfEncoderSampleIndex); + return _MTL_msg_NS__UInteger_endOfEncoderSampleIndex((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::BlitPassSampleBufferAttachmentDescriptor::startOfEncoderSampleIndex() const +_MTL_INLINE void MTL::BlitPassSampleBufferAttachmentDescriptor::setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(startOfEncoderSampleIndex)); + _MTL_msg_v_setEndOfEncoderSampleIndex__NS__UInteger((const void*)this, nullptr, endOfEncoderSampleIndex); } _MTL_INLINE MTL::BlitPassSampleBufferAttachmentDescriptorArray* MTL::BlitPassSampleBufferAttachmentDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLBlitPassSampleBufferAttachmentDescriptorArray)); + return _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLBlitPassSampleBufferAttachmentDescriptorArray, nullptr); } -_MTL_INLINE MTL::BlitPassSampleBufferAttachmentDescriptorArray* MTL::BlitPassSampleBufferAttachmentDescriptorArray::init() +_MTL_INLINE MTL::BlitPassSampleBufferAttachmentDescriptorArray* MTL::BlitPassSampleBufferAttachmentDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::BlitPassSampleBufferAttachmentDescriptor* MTL::BlitPassSampleBufferAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex); + return _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, attachmentIndex); } -_MTL_INLINE void MTL::BlitPassSampleBufferAttachmentDescriptorArray::setObject(const MTL::BlitPassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) +_MTL_INLINE void MTL::BlitPassSampleBufferAttachmentDescriptorArray::setObject(MTL::BlitPassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__BlitPassSampleBufferAttachmentDescriptorp_NS__UInteger((const void*)this, nullptr, attachment, attachmentIndex); } _MTL_INLINE MTL::BlitPassDescriptor* MTL::BlitPassDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLBlitPassDescriptor)); + return _MTL_msg_MTL__BlitPassDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLBlitPassDescriptor, nullptr); } -_MTL_INLINE MTL::BlitPassDescriptor* MTL::BlitPassDescriptor::blitPassDescriptor() +_MTL_INLINE MTL::BlitPassDescriptor* MTL::BlitPassDescriptor::init() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLBlitPassDescriptor), _MTL_PRIVATE_SEL(blitPassDescriptor)); + return _MTL_msg_MTL__BlitPassDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::BlitPassDescriptor* MTL::BlitPassDescriptor::init() +_MTL_INLINE MTL::BlitPassDescriptor* MTL::BlitPassDescriptor::blitPassDescriptor() { - return NS::Object::init(); + return _MTL_msg_MTL__BlitPassDescriptorp_blitPassDescriptor((const void*)&OBJC_CLASS_$_MTLBlitPassDescriptor, nullptr); } _MTL_INLINE MTL::BlitPassSampleBufferAttachmentDescriptorArray* MTL::BlitPassDescriptor::sampleBufferAttachments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleBufferAttachments)); + return _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorArrayp_sampleBufferAttachments((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLBlocks.hpp b/thirdparty/metal-cpp/Metal/MTLBlocks.hpp new file mode 100644 index 000000000000..f8e2fc58cb07 --- /dev/null +++ b/thirdparty/metal-cpp/Metal/MTLBlocks.hpp @@ -0,0 +1,71 @@ +#pragma once + +#include "MTLDefines.hpp" +#include "../Foundation/NSObjCRuntime.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +#include + +namespace MTL { + +class CommandBuffer; +class ComputePipelineState; +class Device; +class Drawable; +class DynamicLibrary; +class Function; +class IOCommandBuffer; +class Library; +class RenderPipelineState; +class SharedEvent; +enum LogLevel : NS::Integer; + +} namespace NS { +class Error; +class String; +} namespace MTL { + +using CommandBufferHandler = void (^)(MTL::CommandBuffer*); +using CommandBufferHandlerFunction = std::function; + +using DeviceNotificationHandler = void (^)(MTL::Device*, NS::String*); +using DeviceNotificationHandlerFunction = std::function; + +using NewBufferBlock = void (^)(void *, NS::UInteger); +using NewBufferFunction = std::function; + +using DrawablePresentedHandler = void (^)(MTL::Drawable*); +using DrawablePresentedHandlerFunction = std::function; + +using SharedEventNotificationBlock = void (^)(MTL::SharedEvent*, uint64_t); +using SharedEventNotificationFunction = std::function; + +using IOCommandBufferHandler = void (^)(MTL::IOCommandBuffer*); +using IOCommandBufferHandlerFunction = std::function; + +using NewLibraryCompletionHandler = void (^)(MTL::Library*, NS::Error*); +using NewLibraryCompletionHandlerFunction = std::function; + +using NewRenderPipelineStateCompletionHandler = void (^)(MTL::RenderPipelineState*, NS::Error*); +using NewRenderPipelineStateCompletionHandlerFunction = std::function; + +using NewRenderPipelineStateWithReflectionCompletionHandler = void (^)(MTL::RenderPipelineState*, void*, NS::Error*); +using NewRenderPipelineStateWithReflectionCompletionHandlerFunction = std::function; + +using NewComputePipelineStateCompletionHandler = void (^)(MTL::ComputePipelineState*, NS::Error*); +using NewComputePipelineStateCompletionHandlerFunction = std::function; + +using NewComputePipelineStateWithReflectionCompletionHandler = void (^)(MTL::ComputePipelineState*, void*, NS::Error*); +using NewComputePipelineStateWithReflectionCompletionHandlerFunction = std::function; + +using NewDynamicLibraryCompletionHandler = void (^)(MTL::DynamicLibrary*, NS::Error*); +using NewDynamicLibraryCompletionHandlerFunction = std::function; + +using NewFunctionBlock = void (^)(MTL::Function*, NS::Error*); +using NewFunctionFunction = std::function; + +using LogHandlerBlock = void (^)(NS::String*, NS::String*, MTL::LogLevel, NS::String*); +using LogHandlerFunction = std::function; + +} // MTL diff --git a/thirdparty/metal-cpp/Metal/MTLBridge.hpp b/thirdparty/metal-cpp/Metal/MTLBridge.hpp new file mode 100644 index 000000000000..cdef4cd70aa4 --- /dev/null +++ b/thirdparty/metal-cpp/Metal/MTLBridge.hpp @@ -0,0 +1,1890 @@ +#pragma once + +// Consolidated extern "C" trampoline decls for this framework. +// One entry per (return, args, selector) — identical C++ signatures +// across multiple classes collapse to a single linker alias of +// `_objc_msgSend$`. Per-class headers include this file +// instead of declaring their own externs. + +#include "MTLDefines.hpp" +#include +#include "../Foundation/NSTypes.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include + +namespace MTL { + class AccelerationStructure; + class AccelerationStructureBoundingBoxGeometryDescriptor; + class AccelerationStructureCommandEncoder; + class AccelerationStructureCurveGeometryDescriptor; + class AccelerationStructureDescriptor; + class AccelerationStructureGeometryDescriptor; + class AccelerationStructureMotionBoundingBoxGeometryDescriptor; + class AccelerationStructureMotionCurveGeometryDescriptor; + class AccelerationStructureMotionTriangleGeometryDescriptor; + class AccelerationStructurePassDescriptor; + class AccelerationStructurePassSampleBufferAttachmentDescriptor; + class AccelerationStructurePassSampleBufferAttachmentDescriptorArray; + class AccelerationStructureTriangleGeometryDescriptor; + class Allocation; + class Architecture; + class Argument; + class ArgumentDescriptor; + class ArgumentEncoder; + class ArrayType; + class Attribute; + class AttributeDescriptor; + class AttributeDescriptorArray; + class BinaryArchive; + class BinaryArchiveDescriptor; + class BlitCommandEncoder; + class BlitPassDescriptor; + class BlitPassSampleBufferAttachmentDescriptor; + class BlitPassSampleBufferAttachmentDescriptorArray; + class Buffer; + class BufferBinding; + class BufferLayoutDescriptor; + class BufferLayoutDescriptorArray; + class CaptureDescriptor; + class CaptureManager; + class CaptureScope; + class CommandBuffer; + class CommandBufferDescriptor; + class CommandQueue; + class CommandQueueDescriptor; + class CompileOptions; + class ComputeCommandEncoder; + class ComputePassDescriptor; + class ComputePassSampleBufferAttachmentDescriptor; + class ComputePassSampleBufferAttachmentDescriptorArray; + class ComputePipelineDescriptor; + class ComputePipelineReflection; + class ComputePipelineState; + class CounterSampleBuffer; + class CounterSampleBufferDescriptor; + class CounterSet; + class DepthStencilDescriptor; + class DepthStencilState; + class Device; + class Drawable; + class DynamicLibrary; + class Event; + class Fence; + class Function; + class FunctionConstant; + class FunctionConstantValues; + class FunctionDescriptor; + class FunctionHandle; + class FunctionLogDebugLocation; + class FunctionReflection; + class FunctionStitchingAttributeAlwaysInline; + class FunctionStitchingFunctionNode; + class FunctionStitchingGraph; + class FunctionStitchingInputNode; + class Heap; + class HeapDescriptor; + class IOCommandBuffer; + class IOCommandQueue; + class IOCommandQueueDescriptor; + class IOFileHandle; + class IOScratchBuffer; + class IOScratchBufferAllocator; + class IndirectCommandBuffer; + class IndirectCommandBufferDescriptor; + class IndirectComputeCommand; + class IndirectInstanceAccelerationStructureDescriptor; + class IndirectRenderCommand; + class InstanceAccelerationStructureDescriptor; + class IntersectionFunctionDescriptor; + class IntersectionFunctionTable; + class IntersectionFunctionTableDescriptor; + class Library; + class LinkedFunctions; + class LogContainer; + class LogState; + class LogStateDescriptor; + class LogicalToPhysicalColorAttachmentMap; + class MeshRenderPipelineDescriptor; + class MotionKeyframeData; + class ParallelRenderCommandEncoder; + class PipelineBufferDescriptor; + class PipelineBufferDescriptorArray; + class PointerType; + class PrimitiveAccelerationStructureDescriptor; + class RasterizationRateLayerArray; + class RasterizationRateLayerDescriptor; + class RasterizationRateMap; + class RasterizationRateMapDescriptor; + class RasterizationRateSampleArray; + class RenderCommandEncoder; + class RenderPassAttachmentDescriptor; + class RenderPassColorAttachmentDescriptor; + class RenderPassColorAttachmentDescriptorArray; + class RenderPassDepthAttachmentDescriptor; + class RenderPassDescriptor; + class RenderPassSampleBufferAttachmentDescriptor; + class RenderPassSampleBufferAttachmentDescriptorArray; + class RenderPassStencilAttachmentDescriptor; + class RenderPipelineColorAttachmentDescriptor; + class RenderPipelineColorAttachmentDescriptorArray; + class RenderPipelineDescriptor; + class RenderPipelineFunctionsDescriptor; + class RenderPipelineReflection; + class RenderPipelineState; + class ResidencySet; + class ResidencySetDescriptor; + class Resource; + class ResourceStateCommandEncoder; + class ResourceStatePassDescriptor; + class ResourceStatePassSampleBufferAttachmentDescriptor; + class ResourceStatePassSampleBufferAttachmentDescriptorArray; + class ResourceViewPool; + class ResourceViewPoolDescriptor; + class SamplerDescriptor; + class SamplerState; + class SharedEvent; + class SharedEventHandle; + class SharedEventListener; + class SharedTextureHandle; + class StageInputOutputDescriptor; + class StencilDescriptor; + class StitchedLibraryDescriptor; + class StructMember; + class StructType; + class Tensor; + class TensorDescriptor; + class TensorExtents; + class TensorReferenceType; + class Texture; + class TextureDescriptor; + class TextureReferenceType; + class TextureViewDescriptor; + class TextureViewPool; + class TileRenderPipelineColorAttachmentDescriptor; + class TileRenderPipelineColorAttachmentDescriptorArray; + class TileRenderPipelineDescriptor; + class Type; + class VertexAttribute; + class VertexAttributeDescriptor; + class VertexAttributeDescriptorArray; + class VertexBufferLayoutDescriptor; + class VertexBufferLayoutDescriptorArray; + class VertexDescriptor; + class VisibleFunctionTable; + class VisibleFunctionTableDescriptor; + enum AccelerationStructureInstanceDescriptorType : NS::UInteger; + using AccelerationStructureRefitOptions = NS::UInteger; + using AccelerationStructureUsage = NS::UInteger; + enum ArgumentBuffersTier : NS::UInteger; + enum ArgumentType : NS::UInteger; + enum AttributeFormat : NS::UInteger; + using BarrierScope = NS::UInteger; + enum BindingAccess : NS::UInteger; + enum BindingType : NS::Integer; + enum BlendFactor : NS::UInteger; + enum BlendOperation : NS::UInteger; + using BlitOption = NS::UInteger; + enum BufferSparseTier : NS::Integer; + enum CPUCacheMode : NS::UInteger; + enum CaptureDestination : NS::Integer; + using ColorWriteMask = NS::UInteger; + using CommandBufferErrorOption = NS::UInteger; + enum CommandBufferStatus : NS::UInteger; + enum CommandEncoderErrorState : NS::Integer; + enum CompareFunction : NS::UInteger; + enum CompileSymbolVisibility : NS::Integer; + enum CounterSamplingPoint : NS::UInteger; + enum CullMode : NS::UInteger; + enum CurveBasis : NS::Integer; + enum CurveEndCaps : NS::Integer; + enum CurveType : NS::Integer; + enum DataType : NS::UInteger; + enum DepthClipMode : NS::UInteger; + enum DeviceLocation : NS::UInteger; + enum DispatchType : NS::UInteger; + enum FeatureSet : NS::UInteger; + enum FunctionLogType : NS::UInteger; + using FunctionOptions = NS::UInteger; + enum FunctionType : NS::UInteger; + enum GPUFamily : NS::Integer; + enum HazardTrackingMode : NS::UInteger; + enum HeapType : NS::Integer; + enum IOCommandQueueType : NS::Integer; + enum IOCompressionMethod : NS::Integer; + enum IOPriority : NS::Integer; + enum IOStatus : NS::Integer; + enum IndexType : NS::UInteger; + using IndirectCommandType = NS::UInteger; + using IntersectionFunctionSignature = NS::UInteger; + enum LanguageVersion : NS::UInteger; + enum LibraryOptimizationLevel : NS::Integer; + enum LibraryType : NS::Integer; + enum LoadAction : NS::UInteger; + enum LogLevel : NS::Integer; + enum MathFloatingPointFunctions : NS::Integer; + enum MathMode : NS::Integer; + enum MatrixLayout : NS::Integer; + enum MotionBorderMode : uint32_t; + enum MultisampleDepthResolveFilter : NS::UInteger; + enum MultisampleStencilResolveFilter : NS::UInteger; + enum Mutability : NS::UInteger; + enum PatchType : NS::UInteger; + using PipelineOption = NS::UInteger; + enum PixelFormat : NS::UInteger; + enum PrimitiveTopologyClass : NS::UInteger; + enum PrimitiveType : NS::UInteger; + enum PurgeableState : NS::UInteger; + enum ReadWriteTextureTier : NS::UInteger; + using RenderStages = NS::UInteger; + using ResourceOptions = NS::UInteger; + using ResourceUsage = NS::UInteger; + enum SamplerAddressMode : NS::UInteger; + enum SamplerBorderColor : NS::UInteger; + enum SamplerMinMagFilter : NS::UInteger; + enum SamplerMipFilter : NS::UInteger; + enum SamplerReductionMode : NS::UInteger; + enum ShaderValidation : NS::Integer; + enum SparsePageSize : NS::Integer; + enum SparseTextureMappingMode : NS::UInteger; + enum SparseTextureRegionAlignmentMode : NS::UInteger; + using Stages = NS::UInteger; + enum StencilOperation : NS::UInteger; + enum StepFunction : NS::UInteger; + using StitchedLibraryOptions = NS::UInteger; + enum StorageMode : NS::UInteger; + enum StoreAction : NS::UInteger; + using StoreActionOptions = NS::UInteger; + enum TensorDataType : NS::Integer; + using TensorUsage = NS::UInteger; + enum TessellationControlPointIndexType : NS::UInteger; + enum TessellationFactorFormat : NS::UInteger; + enum TessellationFactorStepFunction : NS::UInteger; + enum TessellationPartitionMode : NS::UInteger; + enum TextureCompressionType : NS::Integer; + enum TextureSparseTier : NS::Integer; + enum TextureType : NS::UInteger; + using TextureUsage = NS::UInteger; + enum TransformType : NS::Integer; + enum TriangleFillMode : NS::UInteger; + enum VertexFormat : NS::UInteger; + enum VertexStepFunction : NS::UInteger; + enum VisibilityResultMode : NS::UInteger; + enum VisibilityResultType : NS::Integer; + enum Winding : NS::UInteger; +} +namespace MTL4 { + class Archive; + class ArgumentTable; + class ArgumentTableDescriptor; + class BinaryFunction; + class CommandAllocator; + class CommandAllocatorDescriptor; + class CommandBuffer; + class CommandQueue; + class CommandQueueDescriptor; + class Compiler; + class CompilerDescriptor; + class CounterHeap; + class CounterHeapDescriptor; + class PipelineDataSetSerializer; + class PipelineDataSetSerializerDescriptor; + class PipelineDescriptor; + class RenderPipelineBinaryFunctionsDescriptor; + enum CounterHeapType : NS::Integer; +} +namespace NS { + class Array; + class Bundle; + class Data; + class Dictionary; + class Error; + class Number; + class Object; + class String; + class URL; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +#pragma clang diagnostic ignored "-Wunguarded-availability-new" + +extern "C" { +CFTimeInterval _MTL_msg_CFTimeInterval_GPUEndTime(const void*, SEL) __asm__("_objc_msgSend$" "GPUEndTime"); +CFTimeInterval _MTL_msg_CFTimeInterval_GPUStartTime(const void*, SEL) __asm__("_objc_msgSend$" "GPUStartTime"); +NS::URL* _MTL_msg_NS__URLp_URL(const void*, SEL) __asm__("_objc_msgSend$" "URL"); +MTL::AccelerationStructureCommandEncoder* _MTL_msg_MTL__AccelerationStructureCommandEncoderp_accelerationStructureCommandEncoder(const void*, SEL) __asm__("_objc_msgSend$" "accelerationStructureCommandEncoder"); +MTL::AccelerationStructureCommandEncoder* _MTL_msg_MTL__AccelerationStructureCommandEncoderp_accelerationStructureCommandEncoderWithDescriptor__MTL__AccelerationStructurePassDescriptorp(const void*, SEL, MTL::AccelerationStructurePassDescriptor*) __asm__("_objc_msgSend$" "accelerationStructureCommandEncoderWithDescriptor:"); +MTL::AccelerationStructurePassDescriptor* _MTL_msg_MTL__AccelerationStructurePassDescriptorp_accelerationStructurePassDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "accelerationStructurePassDescriptor"); +MTL::AccelerationStructureSizes _MTL_msg_MTL__AccelerationStructureSizes_accelerationStructureSizesWithDescriptor__MTL__AccelerationStructureDescriptorp(const void*, SEL, MTL::AccelerationStructureDescriptor*) __asm__("_objc_msgSend$" "accelerationStructureSizesWithDescriptor:"); +MTL::BindingAccess _MTL_msg_MTL__BindingAccess_access(const void*, SEL) __asm__("_objc_msgSend$" "access"); +bool _MTL_msg_bool_active(const void*, SEL) __asm__("_objc_msgSend$" "active"); +void _MTL_msg_v_addAllocation__MTL__Allocationp(const void*, SEL, MTL::Allocation*) __asm__("_objc_msgSend$" "addAllocation:"); +void _MTL_msg_v_addAllocations_count__constMTL__Allocationpconstp_NS__UInteger(const void*, SEL, const MTL::Allocation* const *, NS::UInteger) __asm__("_objc_msgSend$" "addAllocations:count:"); +void _MTL_msg_v_addBarrier(const void*, SEL) __asm__("_objc_msgSend$" "addBarrier"); +void _MTL_msg_v_addCompletedHandler__MTL__CommandBufferHandler(const void*, SEL, MTL::CommandBufferHandler) __asm__("_objc_msgSend$" "addCompletedHandler:"); +void _MTL_msg_v_addCompletedHandler__MTL__IOCommandBufferHandler(const void*, SEL, MTL::IOCommandBufferHandler) __asm__("_objc_msgSend$" "addCompletedHandler:"); +bool _MTL_msg_bool_addComputePipelineFunctionsWithDescriptor_error__MTL__ComputePipelineDescriptorp_NS__Errorpp(const void*, SEL, MTL::ComputePipelineDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "addComputePipelineFunctionsWithDescriptor:error:"); +void _MTL_msg_v_addDebugMarker_range__NS__Stringp_NS__Range(const void*, SEL, NS::String*, NS::Range) __asm__("_objc_msgSend$" "addDebugMarker:range:"); +bool _MTL_msg_bool_addFunctionWithDescriptor_library_error__MTL__FunctionDescriptorp_MTL__Libraryp_NS__Errorpp(const void*, SEL, MTL::FunctionDescriptor*, MTL::Library*, NS::Error**) __asm__("_objc_msgSend$" "addFunctionWithDescriptor:library:error:"); +bool _MTL_msg_bool_addLibraryWithDescriptor_error__MTL__StitchedLibraryDescriptorp_NS__Errorpp(const void*, SEL, MTL::StitchedLibraryDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "addLibraryWithDescriptor:error:"); +void _MTL_msg_v_addLogHandler__MTL__LogHandlerBlock(const void*, SEL, MTL::LogHandlerBlock) __asm__("_objc_msgSend$" "addLogHandler:"); +bool _MTL_msg_bool_addMeshRenderPipelineFunctionsWithDescriptor_error__MTL__MeshRenderPipelineDescriptorp_NS__Errorpp(const void*, SEL, MTL::MeshRenderPipelineDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "addMeshRenderPipelineFunctionsWithDescriptor:error:"); +void _MTL_msg_v_addPresentedHandler__MTL__DrawablePresentedHandler(const void*, SEL, MTL::DrawablePresentedHandler) __asm__("_objc_msgSend$" "addPresentedHandler:"); +bool _MTL_msg_bool_addRenderPipelineFunctionsWithDescriptor_error__MTL__RenderPipelineDescriptorp_NS__Errorpp(const void*, SEL, MTL::RenderPipelineDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "addRenderPipelineFunctionsWithDescriptor:error:"); +void _MTL_msg_v_addResidencySet__MTL__ResidencySetp(const void*, SEL, MTL::ResidencySet*) __asm__("_objc_msgSend$" "addResidencySet:"); +void _MTL_msg_v_addResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger(const void*, SEL, const MTL::ResidencySet* const *, NS::UInteger) __asm__("_objc_msgSend$" "addResidencySets:count:"); +void _MTL_msg_v_addScheduledHandler__MTL__CommandBufferHandler(const void*, SEL, MTL::CommandBufferHandler) __asm__("_objc_msgSend$" "addScheduledHandler:"); +bool _MTL_msg_bool_addTileRenderPipelineFunctionsWithDescriptor_error__MTL__TileRenderPipelineDescriptorp_NS__Errorpp(const void*, SEL, MTL::TileRenderPipelineDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "addTileRenderPipelineFunctionsWithDescriptor:error:"); +NS::UInteger _MTL_msg_NS__UInteger_alignment(const void*, SEL) __asm__("_objc_msgSend$" "alignment"); +NS::Array* _MTL_msg_NS__Arrayp_allAllocations(const void*, SEL) __asm__("_objc_msgSend$" "allAllocations"); +MTL::AccelerationStructureBoundingBoxGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureBoundingBoxGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AccelerationStructureCurveGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureCurveGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AccelerationStructureDescriptor* _MTL_msg_MTL__AccelerationStructureDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AccelerationStructureGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureMotionBoundingBoxGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AccelerationStructureMotionCurveGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureMotionCurveGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AccelerationStructureMotionTriangleGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureMotionTriangleGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AccelerationStructurePassDescriptor* _MTL_msg_MTL__AccelerationStructurePassDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AccelerationStructureTriangleGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureTriangleGeometryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::Architecture* _MTL_msg_MTL__Architecturep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ArgumentDescriptor* _MTL_msg_MTL__ArgumentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::Argument* _MTL_msg_MTL__Argumentp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ArrayType* _MTL_msg_MTL__ArrayTypep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AttributeDescriptorArray* _MTL_msg_MTL__AttributeDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::AttributeDescriptor* _MTL_msg_MTL__AttributeDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::Attribute* _MTL_msg_MTL__Attributep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::BinaryArchiveDescriptor* _MTL_msg_MTL__BinaryArchiveDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::BlitPassDescriptor* _MTL_msg_MTL__BlitPassDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::BlitPassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::BlitPassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::BufferLayoutDescriptorArray* _MTL_msg_MTL__BufferLayoutDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::BufferLayoutDescriptor* _MTL_msg_MTL__BufferLayoutDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::CaptureDescriptor* _MTL_msg_MTL__CaptureDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::CaptureManager* _MTL_msg_MTL__CaptureManagerp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::CommandBufferDescriptor* _MTL_msg_MTL__CommandBufferDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::CommandQueueDescriptor* _MTL_msg_MTL__CommandQueueDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::CompileOptions* _MTL_msg_MTL__CompileOptionsp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ComputePassDescriptor* _MTL_msg_MTL__ComputePassDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ComputePassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ComputePassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ComputePipelineDescriptor* _MTL_msg_MTL__ComputePipelineDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ComputePipelineReflection* _MTL_msg_MTL__ComputePipelineReflectionp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::CounterSampleBufferDescriptor* _MTL_msg_MTL__CounterSampleBufferDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::DepthStencilDescriptor* _MTL_msg_MTL__DepthStencilDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::FunctionConstantValues* _MTL_msg_MTL__FunctionConstantValuesp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::FunctionConstant* _MTL_msg_MTL__FunctionConstantp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::FunctionDescriptor* _MTL_msg_MTL__FunctionDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::FunctionReflection* _MTL_msg_MTL__FunctionReflectionp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::FunctionStitchingAttributeAlwaysInline* _MTL_msg_MTL__FunctionStitchingAttributeAlwaysInlinep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::FunctionStitchingFunctionNode* _MTL_msg_MTL__FunctionStitchingFunctionNodep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::FunctionStitchingGraph* _MTL_msg_MTL__FunctionStitchingGraphp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::FunctionStitchingInputNode* _MTL_msg_MTL__FunctionStitchingInputNodep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::HeapDescriptor* _MTL_msg_MTL__HeapDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::IOCommandQueueDescriptor* _MTL_msg_MTL__IOCommandQueueDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::IndirectCommandBufferDescriptor* _MTL_msg_MTL__IndirectCommandBufferDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::IndirectInstanceAccelerationStructureDescriptor* _MTL_msg_MTL__IndirectInstanceAccelerationStructureDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::InstanceAccelerationStructureDescriptor* _MTL_msg_MTL__InstanceAccelerationStructureDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::IntersectionFunctionDescriptor* _MTL_msg_MTL__IntersectionFunctionDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::IntersectionFunctionTableDescriptor* _MTL_msg_MTL__IntersectionFunctionTableDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::LinkedFunctions* _MTL_msg_MTL__LinkedFunctionsp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::LogStateDescriptor* _MTL_msg_MTL__LogStateDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::LogicalToPhysicalColorAttachmentMap* _MTL_msg_MTL__LogicalToPhysicalColorAttachmentMapp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::MeshRenderPipelineDescriptor* _MTL_msg_MTL__MeshRenderPipelineDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::MotionKeyframeData* _MTL_msg_MTL__MotionKeyframeDatap_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::PipelineBufferDescriptorArray* _MTL_msg_MTL__PipelineBufferDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::PipelineBufferDescriptor* _MTL_msg_MTL__PipelineBufferDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::PointerType* _MTL_msg_MTL__PointerTypep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::PrimitiveAccelerationStructureDescriptor* _MTL_msg_MTL__PrimitiveAccelerationStructureDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RasterizationRateLayerArray* _MTL_msg_MTL__RasterizationRateLayerArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RasterizationRateLayerDescriptor* _MTL_msg_MTL__RasterizationRateLayerDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RasterizationRateMapDescriptor* _MTL_msg_MTL__RasterizationRateMapDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RasterizationRateSampleArray* _MTL_msg_MTL__RasterizationRateSampleArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPassAttachmentDescriptor* _MTL_msg_MTL__RenderPassAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPassColorAttachmentDescriptorArray* _MTL_msg_MTL__RenderPassColorAttachmentDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPassColorAttachmentDescriptor* _MTL_msg_MTL__RenderPassColorAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPassDepthAttachmentDescriptor* _MTL_msg_MTL__RenderPassDepthAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPassDescriptor* _MTL_msg_MTL__RenderPassDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPassStencilAttachmentDescriptor* _MTL_msg_MTL__RenderPassStencilAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPipelineColorAttachmentDescriptorArray* _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPipelineColorAttachmentDescriptor* _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPipelineDescriptor* _MTL_msg_MTL__RenderPipelineDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPipelineFunctionsDescriptor* _MTL_msg_MTL__RenderPipelineFunctionsDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::RenderPipelineReflection* _MTL_msg_MTL__RenderPipelineReflectionp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ResidencySetDescriptor* _MTL_msg_MTL__ResidencySetDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ResourceStatePassDescriptor* _MTL_msg_MTL__ResourceStatePassDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ResourceStatePassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::ResourceViewPoolDescriptor* _MTL_msg_MTL__ResourceViewPoolDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::SamplerDescriptor* _MTL_msg_MTL__SamplerDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::SharedEventHandle* _MTL_msg_MTL__SharedEventHandlep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::SharedEventListener* _MTL_msg_MTL__SharedEventListenerp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::SharedTextureHandle* _MTL_msg_MTL__SharedTextureHandlep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::StageInputOutputDescriptor* _MTL_msg_MTL__StageInputOutputDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::StencilDescriptor* _MTL_msg_MTL__StencilDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::StitchedLibraryDescriptor* _MTL_msg_MTL__StitchedLibraryDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::StructMember* _MTL_msg_MTL__StructMemberp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::StructType* _MTL_msg_MTL__StructTypep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::TensorDescriptor* _MTL_msg_MTL__TensorDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::TensorExtents* _MTL_msg_MTL__TensorExtentsp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::TensorReferenceType* _MTL_msg_MTL__TensorReferenceTypep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::TextureDescriptor* _MTL_msg_MTL__TextureDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::TextureReferenceType* _MTL_msg_MTL__TextureReferenceTypep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::TextureViewDescriptor* _MTL_msg_MTL__TextureViewDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::TileRenderPipelineColorAttachmentDescriptorArray* _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::TileRenderPipelineColorAttachmentDescriptor* _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::TileRenderPipelineDescriptor* _MTL_msg_MTL__TileRenderPipelineDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::Type* _MTL_msg_MTL__Typep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::VertexAttributeDescriptorArray* _MTL_msg_MTL__VertexAttributeDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::VertexAttributeDescriptor* _MTL_msg_MTL__VertexAttributeDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::VertexAttribute* _MTL_msg_MTL__VertexAttributep_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::VertexBufferLayoutDescriptorArray* _MTL_msg_MTL__VertexBufferLayoutDescriptorArrayp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::VertexBufferLayoutDescriptor* _MTL_msg_MTL__VertexBufferLayoutDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::VertexDescriptor* _MTL_msg_MTL__VertexDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTL::VisibleFunctionTableDescriptor* _MTL_msg_MTL__VisibleFunctionTableDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +NS::UInteger _MTL_msg_NS__UInteger_allocatedSize(const void*, SEL) __asm__("_objc_msgSend$" "allocatedSize"); +uint64_t _MTL_msg_uint64_t_allocatedSize(const void*, SEL) __asm__("_objc_msgSend$" "allocatedSize"); +NS::UInteger _MTL_msg_NS__UInteger_allocationCount(const void*, SEL) __asm__("_objc_msgSend$" "allocationCount"); +bool _MTL_msg_bool_allowDuplicateIntersectionFunctionInvocation(const void*, SEL) __asm__("_objc_msgSend$" "allowDuplicateIntersectionFunctionInvocation"); +bool _MTL_msg_bool_allowGPUOptimizedContents(const void*, SEL) __asm__("_objc_msgSend$" "allowGPUOptimizedContents"); +bool _MTL_msg_bool_allowReferencingUndefinedSymbols(const void*, SEL) __asm__("_objc_msgSend$" "allowReferencingUndefinedSymbols"); +MTL::BlendOperation _MTL_msg_MTL__BlendOperation_alphaBlendOperation(const void*, SEL) __asm__("_objc_msgSend$" "alphaBlendOperation"); +bool _MTL_msg_bool_alphaToCoverageEnabled(const void*, SEL) __asm__("_objc_msgSend$" "alphaToCoverageEnabled"); +bool _MTL_msg_bool_alphaToOneEnabled(const void*, SEL) __asm__("_objc_msgSend$" "alphaToOneEnabled"); +MTL::Architecture* _MTL_msg_MTL__Architecturep_architecture(const void*, SEL) __asm__("_objc_msgSend$" "architecture"); +bool _MTL_msg_bool_areBarycentricCoordsSupported(const void*, SEL) __asm__("_objc_msgSend$" "areBarycentricCoordsSupported"); +bool _MTL_msg_bool_areProgrammableSamplePositionsSupported(const void*, SEL) __asm__("_objc_msgSend$" "areProgrammableSamplePositionsSupported"); +bool _MTL_msg_bool_areRasterOrderGroupsSupported(const void*, SEL) __asm__("_objc_msgSend$" "areRasterOrderGroupsSupported"); +bool _MTL_msg_bool_argument(const void*, SEL) __asm__("_objc_msgSend$" "argument"); +MTL::ArgumentBuffersTier _MTL_msg_MTL__ArgumentBuffersTier_argumentBuffersSupport(const void*, SEL) __asm__("_objc_msgSend$" "argumentBuffersSupport"); +MTL::ArgumentDescriptor* _MTL_msg_MTL__ArgumentDescriptorp_argumentDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "argumentDescriptor"); +NS::UInteger _MTL_msg_NS__UInteger_argumentIndex(const void*, SEL) __asm__("_objc_msgSend$" "argumentIndex"); +NS::UInteger _MTL_msg_NS__UInteger_argumentIndexStride(const void*, SEL) __asm__("_objc_msgSend$" "argumentIndexStride"); +NS::Array* _MTL_msg_NS__Arrayp_arguments(const void*, SEL) __asm__("_objc_msgSend$" "arguments"); +NS::UInteger _MTL_msg_NS__UInteger_arrayLength(const void*, SEL) __asm__("_objc_msgSend$" "arrayLength"); +MTL::ArrayType* _MTL_msg_MTL__ArrayTypep_arrayType(const void*, SEL) __asm__("_objc_msgSend$" "arrayType"); +NS::UInteger _MTL_msg_NS__UInteger_attributeIndex(const void*, SEL) __asm__("_objc_msgSend$" "attributeIndex"); +MTL::DataType _MTL_msg_MTL__DataType_attributeType(const void*, SEL) __asm__("_objc_msgSend$" "attributeType"); +MTL::AttributeDescriptorArray* _MTL_msg_MTL__AttributeDescriptorArrayp_attributes(const void*, SEL) __asm__("_objc_msgSend$" "attributes"); +MTL::VertexAttributeDescriptorArray* _MTL_msg_MTL__VertexAttributeDescriptorArrayp_attributes(const void*, SEL) __asm__("_objc_msgSend$" "attributes"); +NS::Array* _MTL_msg_NS__Arrayp_attributes(const void*, SEL) __asm__("_objc_msgSend$" "attributes"); +MTL::StencilDescriptor* _MTL_msg_MTL__StencilDescriptorp_backFaceStencil(const void*, SEL) __asm__("_objc_msgSend$" "backFaceStencil"); +void _MTL_msg_v_barrierAfterQueueStages_beforeStages__MTL__Stages_MTL__Stages(const void*, SEL, MTL::Stages, MTL::Stages) __asm__("_objc_msgSend$" "barrierAfterQueueStages:beforeStages:"); +MTL::ResourceID _MTL_msg_MTL__ResourceID_baseResourceID(const void*, SEL) __asm__("_objc_msgSend$" "baseResourceID"); +void _MTL_msg_v_beginScope(const void*, SEL) __asm__("_objc_msgSend$" "beginScope"); +NS::Array* _MTL_msg_NS__Arrayp_binaryArchives(const void*, SEL) __asm__("_objc_msgSend$" "binaryArchives"); +NS::Array* _MTL_msg_NS__Arrayp_binaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "binaryFunctions"); +NS::Array* _MTL_msg_NS__Arrayp_bindings(const void*, SEL) __asm__("_objc_msgSend$" "bindings"); +bool _MTL_msg_bool_blendingEnabled(const void*, SEL) __asm__("_objc_msgSend$" "blendingEnabled"); +MTL::BlitCommandEncoder* _MTL_msg_MTL__BlitCommandEncoderp_blitCommandEncoder(const void*, SEL) __asm__("_objc_msgSend$" "blitCommandEncoder"); +MTL::BlitCommandEncoder* _MTL_msg_MTL__BlitCommandEncoderp_blitCommandEncoderWithDescriptor__MTL__BlitPassDescriptorp(const void*, SEL, MTL::BlitPassDescriptor*) __asm__("_objc_msgSend$" "blitCommandEncoderWithDescriptor:"); +MTL::BlitPassDescriptor* _MTL_msg_MTL__BlitPassDescriptorp_blitPassDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "blitPassDescriptor"); +MTL::SamplerBorderColor _MTL_msg_MTL__SamplerBorderColor_borderColor(const void*, SEL) __asm__("_objc_msgSend$" "borderColor"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_boundingBoxBuffer(const void*, SEL) __asm__("_objc_msgSend$" "boundingBoxBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_boundingBoxBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "boundingBoxBufferOffset"); +NS::Array* _MTL_msg_NS__Arrayp_boundingBoxBuffers(const void*, SEL) __asm__("_objc_msgSend$" "boundingBoxBuffers"); +NS::UInteger _MTL_msg_NS__UInteger_boundingBoxCount(const void*, SEL) __asm__("_objc_msgSend$" "boundingBoxCount"); +NS::UInteger _MTL_msg_NS__UInteger_boundingBoxStride(const void*, SEL) __asm__("_objc_msgSend$" "boundingBoxStride"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_buffer(const void*, SEL) __asm__("_objc_msgSend$" "buffer"); +NS::UInteger _MTL_msg_NS__UInteger_bufferAlignment(const void*, SEL) __asm__("_objc_msgSend$" "bufferAlignment"); +NS::UInteger _MTL_msg_NS__UInteger_bufferBytesPerRow(const void*, SEL) __asm__("_objc_msgSend$" "bufferBytesPerRow"); +NS::UInteger _MTL_msg_NS__UInteger_bufferDataSize(const void*, SEL) __asm__("_objc_msgSend$" "bufferDataSize"); +MTL::DataType _MTL_msg_MTL__DataType_bufferDataType(const void*, SEL) __asm__("_objc_msgSend$" "bufferDataType"); +NS::UInteger _MTL_msg_NS__UInteger_bufferIndex(const void*, SEL) __asm__("_objc_msgSend$" "bufferIndex"); +NS::UInteger _MTL_msg_NS__UInteger_bufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "bufferOffset"); +MTL::PointerType* _MTL_msg_MTL__PointerTypep_bufferPointerType(const void*, SEL) __asm__("_objc_msgSend$" "bufferPointerType"); +NS::Integer _MTL_msg_NS__Integer_bufferSize(const void*, SEL) __asm__("_objc_msgSend$" "bufferSize"); +MTL::StructType* _MTL_msg_MTL__StructTypep_bufferStructType(const void*, SEL) __asm__("_objc_msgSend$" "bufferStructType"); +MTL::PipelineBufferDescriptorArray* _MTL_msg_MTL__PipelineBufferDescriptorArrayp_buffers(const void*, SEL) __asm__("_objc_msgSend$" "buffers"); +void _MTL_msg_v_buildAccelerationStructure_descriptor_scratchBuffer_scratchBufferOffset__MTL__AccelerationStructurep_MTL__AccelerationStructureDescriptorp_MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::AccelerationStructure*, MTL::AccelerationStructureDescriptor*, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "buildAccelerationStructure:descriptor:scratchBuffer:scratchBufferOffset:"); +NS::Object* _MTL_msg_NS__Objectp_captureObject(const void*, SEL) __asm__("_objc_msgSend$" "captureObject"); +void _MTL_msg_v_clearBarrier(const void*, SEL) __asm__("_objc_msgSend$" "clearBarrier"); +MTL::ClearColor _MTL_msg_MTL__ClearColor_clearColor(const void*, SEL) __asm__("_objc_msgSend$" "clearColor"); +double _MTL_msg_double_clearDepth(const void*, SEL) __asm__("_objc_msgSend$" "clearDepth"); +uint32_t _MTL_msg_uint32_t_clearStencil(const void*, SEL) __asm__("_objc_msgSend$" "clearStencil"); +MTL::RenderPassColorAttachmentDescriptorArray* _MTL_msg_MTL__RenderPassColorAttachmentDescriptorArrayp_colorAttachments(const void*, SEL) __asm__("_objc_msgSend$" "colorAttachments"); +MTL::RenderPipelineColorAttachmentDescriptorArray* _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorArrayp_colorAttachments(const void*, SEL) __asm__("_objc_msgSend$" "colorAttachments"); +MTL::TileRenderPipelineColorAttachmentDescriptorArray* _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorArrayp_colorAttachments(const void*, SEL) __asm__("_objc_msgSend$" "colorAttachments"); +NS::UInteger _MTL_msg_NS__UInteger_column(const void*, SEL) __asm__("_objc_msgSend$" "column"); +MTL::CommandBuffer* _MTL_msg_MTL__CommandBufferp_commandBuffer(const void*, SEL) __asm__("_objc_msgSend$" "commandBuffer"); +MTL::IOCommandBuffer* _MTL_msg_MTL__IOCommandBufferp_commandBuffer(const void*, SEL) __asm__("_objc_msgSend$" "commandBuffer"); +MTL::CommandBuffer* _MTL_msg_MTL__CommandBufferp_commandBufferWithDescriptor__MTL__CommandBufferDescriptorp(const void*, SEL, MTL::CommandBufferDescriptor*) __asm__("_objc_msgSend$" "commandBufferWithDescriptor:"); +MTL::CommandBuffer* _MTL_msg_MTL__CommandBufferp_commandBufferWithUnretainedReferences(const void*, SEL) __asm__("_objc_msgSend$" "commandBufferWithUnretainedReferences"); +MTL::IOCommandBuffer* _MTL_msg_MTL__IOCommandBufferp_commandBufferWithUnretainedReferences(const void*, SEL) __asm__("_objc_msgSend$" "commandBufferWithUnretainedReferences"); +MTL::CommandQueue* _MTL_msg_MTL__CommandQueuep_commandQueue(const void*, SEL) __asm__("_objc_msgSend$" "commandQueue"); +MTL::IndirectCommandType _MTL_msg_MTL__IndirectCommandType_commandTypes(const void*, SEL) __asm__("_objc_msgSend$" "commandTypes"); +void _MTL_msg_v_commit(const void*, SEL) __asm__("_objc_msgSend$" "commit"); +MTL::CompareFunction _MTL_msg_MTL__CompareFunction_compareFunction(const void*, SEL) __asm__("_objc_msgSend$" "compareFunction"); +MTL::CompileSymbolVisibility _MTL_msg_MTL__CompileSymbolVisibility_compileSymbolVisibility(const void*, SEL) __asm__("_objc_msgSend$" "compileSymbolVisibility"); +MTL::TextureCompressionType _MTL_msg_MTL__TextureCompressionType_compressionType(const void*, SEL) __asm__("_objc_msgSend$" "compressionType"); +MTL::ComputeCommandEncoder* _MTL_msg_MTL__ComputeCommandEncoderp_computeCommandEncoder(const void*, SEL) __asm__("_objc_msgSend$" "computeCommandEncoder"); +MTL::ComputeCommandEncoder* _MTL_msg_MTL__ComputeCommandEncoderp_computeCommandEncoderWithDescriptor__MTL__ComputePassDescriptorp(const void*, SEL, MTL::ComputePassDescriptor*) __asm__("_objc_msgSend$" "computeCommandEncoderWithDescriptor:"); +MTL::ComputeCommandEncoder* _MTL_msg_MTL__ComputeCommandEncoderp_computeCommandEncoderWithDispatchType__MTL__DispatchType(const void*, SEL, MTL::DispatchType) __asm__("_objc_msgSend$" "computeCommandEncoderWithDispatchType:"); +MTL::Function* _MTL_msg_MTL__Functionp_computeFunction(const void*, SEL) __asm__("_objc_msgSend$" "computeFunction"); +MTL::ComputePassDescriptor* _MTL_msg_MTL__ComputePassDescriptorp_computePassDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "computePassDescriptor"); +void _MTL_msg_v_concurrentDispatchThreadgroups_threadsPerThreadgroup__MTL__Size_MTL__Size(const void*, SEL, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "concurrentDispatchThreadgroups:threadsPerThreadgroup:"); +void _MTL_msg_v_concurrentDispatchThreads_threadsPerThreadgroup__MTL__Size_MTL__Size(const void*, SEL, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "concurrentDispatchThreads:threadsPerThreadgroup:"); +NS::UInteger _MTL_msg_NS__UInteger_constantBlockAlignment(const void*, SEL) __asm__("_objc_msgSend$" "constantBlockAlignment"); +void * _MTL_msg_voidp_constantDataAtIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "constantDataAtIndex:"); +MTL::FunctionConstantValues* _MTL_msg_MTL__FunctionConstantValuesp_constantValues(const void*, SEL) __asm__("_objc_msgSend$" "constantValues"); +bool _MTL_msg_bool_containsAllocation__MTL__Allocationp(const void*, SEL, MTL::Allocation*) __asm__("_objc_msgSend$" "containsAllocation:"); +void * _MTL_msg_voidp_contents(const void*, SEL) __asm__("_objc_msgSend$" "contents"); +NS::Array* _MTL_msg_NS__Arrayp_controlDependencies(const void*, SEL) __asm__("_objc_msgSend$" "controlDependencies"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_controlPointBuffer(const void*, SEL) __asm__("_objc_msgSend$" "controlPointBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_controlPointBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "controlPointBufferOffset"); +NS::Array* _MTL_msg_NS__Arrayp_controlPointBuffers(const void*, SEL) __asm__("_objc_msgSend$" "controlPointBuffers"); +NS::UInteger _MTL_msg_NS__UInteger_controlPointCount(const void*, SEL) __asm__("_objc_msgSend$" "controlPointCount"); +MTL::AttributeFormat _MTL_msg_MTL__AttributeFormat_controlPointFormat(const void*, SEL) __asm__("_objc_msgSend$" "controlPointFormat"); +NS::UInteger _MTL_msg_NS__UInteger_controlPointStride(const void*, SEL) __asm__("_objc_msgSend$" "controlPointStride"); +void _MTL_msg_v_convertSparsePixelRegions_toTileRegions_withTileSize_alignmentMode_numRegions__constMTL__Regionp_MTL__Regionp_MTL__Size_MTL__SparseTextureRegionAlignmentMode_NS__UInteger(const void*, SEL, const MTL::Region *, MTL::Region*, MTL::Size, MTL::SparseTextureRegionAlignmentMode, NS::UInteger) __asm__("_objc_msgSend$" "convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions:"); +void _MTL_msg_v_convertSparseTileRegions_toPixelRegions_withTileSize_numRegions__constMTL__Regionp_MTL__Regionp_MTL__Size_NS__UInteger(const void*, SEL, const MTL::Region *, MTL::Region*, MTL::Size, NS::UInteger) __asm__("_objc_msgSend$" "convertSparseTileRegions:toPixelRegions:withTileSize:numRegions:"); +void _MTL_msg_v_copyAccelerationStructure_toAccelerationStructure__MTL__AccelerationStructurep_MTL__AccelerationStructurep(const void*, SEL, MTL::AccelerationStructure*, MTL::AccelerationStructure*) __asm__("_objc_msgSend$" "copyAccelerationStructure:toAccelerationStructure:"); +void _MTL_msg_v_copyAndCompactAccelerationStructure_toAccelerationStructure__MTL__AccelerationStructurep_MTL__AccelerationStructurep(const void*, SEL, MTL::AccelerationStructure*, MTL::AccelerationStructure*) __asm__("_objc_msgSend$" "copyAndCompactAccelerationStructure:toAccelerationStructure:"); +void _MTL_msg_v_copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger, MTL::Size, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin) __asm__("_objc_msgSend$" "copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:"); +void _MTL_msg_v_copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_options__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__BlitOption(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger, MTL::Size, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin, MTL::BlitOption) __asm__("_objc_msgSend$" "copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:"); +void _MTL_msg_v_copyFromBuffer_sourceOffset_toBuffer_destinationOffset_size__MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "copyFromBuffer:sourceOffset:toBuffer:destinationOffset:size:"); +void _MTL_msg_v_copyFromTensor_sourceOrigin_sourceDimensions_toTensor_destinationOrigin_destinationDimensions__MTL__Tensorp_MTL__TensorExtentsp_MTL__TensorExtentsp_MTL__Tensorp_MTL__TensorExtentsp_MTL__TensorExtentsp(const void*, SEL, MTL::Tensor*, MTL::TensorExtents*, MTL::TensorExtents*, MTL::Tensor*, MTL::TensorExtents*, MTL::TensorExtents*) __asm__("_objc_msgSend$" "copyFromTensor:sourceOrigin:sourceDimensions:toTensor:destinationOrigin:destinationDimensions:"); +void _MTL_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin, MTL::Size, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage:"); +void _MTL_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage_options__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__BlitOption(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin, MTL::Size, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger, MTL::BlitOption) __asm__("_objc_msgSend$" "copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage:options:"); +void _MTL_msg_v_copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin, MTL::Size, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin) __asm__("_objc_msgSend$" "copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:"); +void _MTL_msg_v_copyFromTexture_sourceSlice_sourceLevel_toTexture_destinationSlice_destinationLevel_sliceCount_levelCount__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Texturep_NS__UInteger_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Texture*, NS::UInteger, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount:"); +void _MTL_msg_v_copyFromTexture_toTexture__MTL__Texturep_MTL__Texturep(const void*, SEL, MTL::Texture*, MTL::Texture*) __asm__("_objc_msgSend$" "copyFromTexture:toTexture:"); +void _MTL_msg_v_copyIndirectCommandBuffer_sourceRange_destination_destinationIndex__MTL__IndirectCommandBufferp_NS__Range_MTL__IndirectCommandBufferp_NS__UInteger(const void*, SEL, MTL::IndirectCommandBuffer*, NS::Range, MTL::IndirectCommandBuffer*, NS::UInteger) __asm__("_objc_msgSend$" "copyIndirectCommandBuffer:sourceRange:destination:destinationIndex:"); +void _MTL_msg_v_copyParameterDataToBuffer_offset__MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "copyParameterDataToBuffer:offset:"); +MTL::ResourceID _MTL_msg_MTL__ResourceID_copyResourceViewsFromPool_sourceRange_destinationIndex__MTL__ResourceViewPoolp_NS__Range_NS__UInteger(const void*, SEL, MTL::ResourceViewPool*, NS::Range, NS::UInteger) __asm__("_objc_msgSend$" "copyResourceViewsFromPool:sourceRange:destinationIndex:"); +void _MTL_msg_v_copyStatusToBuffer_offset__MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "copyStatusToBuffer:offset:"); +MTL::CounterSet* _MTL_msg_MTL__CounterSetp_counterSet(const void*, SEL) __asm__("_objc_msgSend$" "counterSet"); +NS::Array* _MTL_msg_NS__Arrayp_counterSets(const void*, SEL) __asm__("_objc_msgSend$" "counterSets"); +NS::Array* _MTL_msg_NS__Arrayp_counters(const void*, SEL) __asm__("_objc_msgSend$" "counters"); +MTL::CPUCacheMode _MTL_msg_MTL__CPUCacheMode_cpuCacheMode(const void*, SEL) __asm__("_objc_msgSend$" "cpuCacheMode"); +NS::UInteger _MTL_msg_NS__UInteger_currentAllocatedSize(const void*, SEL) __asm__("_objc_msgSend$" "currentAllocatedSize"); +MTL::CurveBasis _MTL_msg_MTL__CurveBasis_curveBasis(const void*, SEL) __asm__("_objc_msgSend$" "curveBasis"); +MTL::CurveEndCaps _MTL_msg_MTL__CurveEndCaps_curveEndCaps(const void*, SEL) __asm__("_objc_msgSend$" "curveEndCaps"); +MTL::CurveType _MTL_msg_MTL__CurveType_curveType(const void*, SEL) __asm__("_objc_msgSend$" "curveType"); +MTL::MotionKeyframeData* _MTL_msg_MTL__MotionKeyframeDatap_data(const void*, SEL) __asm__("_objc_msgSend$" "data"); +NS::UInteger _MTL_msg_NS__UInteger_dataSize(const void*, SEL) __asm__("_objc_msgSend$" "dataSize"); +MTL::DataType _MTL_msg_MTL__DataType_dataType(const void*, SEL) __asm__("_objc_msgSend$" "dataType"); +MTL::TensorDataType _MTL_msg_MTL__TensorDataType_dataType(const void*, SEL) __asm__("_objc_msgSend$" "dataType"); +MTL::FunctionLogDebugLocation* _MTL_msg_MTL__FunctionLogDebugLocationp_debugLocation(const void*, SEL) __asm__("_objc_msgSend$" "debugLocation"); +NS::Array* _MTL_msg_NS__Arrayp_debugSignposts(const void*, SEL) __asm__("_objc_msgSend$" "debugSignposts"); +MTL::CaptureScope* _MTL_msg_MTL__CaptureScopep_defaultCaptureScope(const void*, SEL) __asm__("_objc_msgSend$" "defaultCaptureScope"); +NS::UInteger _MTL_msg_NS__UInteger_defaultRasterSampleCount(const void*, SEL) __asm__("_objc_msgSend$" "defaultRasterSampleCount"); +NS::UInteger _MTL_msg_NS__UInteger_depth(const void*, SEL) __asm__("_objc_msgSend$" "depth"); +bool _MTL_msg_bool_depth24Stencil8PixelFormatSupported(const void*, SEL) __asm__("_objc_msgSend$" "depth24Stencil8PixelFormatSupported"); +MTL::RenderPassDepthAttachmentDescriptor* _MTL_msg_MTL__RenderPassDepthAttachmentDescriptorp_depthAttachment(const void*, SEL) __asm__("_objc_msgSend$" "depthAttachment"); +MTL::PixelFormat _MTL_msg_MTL__PixelFormat_depthAttachmentPixelFormat(const void*, SEL) __asm__("_objc_msgSend$" "depthAttachmentPixelFormat"); +MTL::CompareFunction _MTL_msg_MTL__CompareFunction_depthCompareFunction(const void*, SEL) __asm__("_objc_msgSend$" "depthCompareFunction"); +MTL::StencilOperation _MTL_msg_MTL__StencilOperation_depthFailureOperation(const void*, SEL) __asm__("_objc_msgSend$" "depthFailureOperation"); +NS::UInteger _MTL_msg_NS__UInteger_depthPlane(const void*, SEL) __asm__("_objc_msgSend$" "depthPlane"); +MTL::MultisampleDepthResolveFilter _MTL_msg_MTL__MultisampleDepthResolveFilter_depthResolveFilter(const void*, SEL) __asm__("_objc_msgSend$" "depthResolveFilter"); +MTL::StencilOperation _MTL_msg_MTL__StencilOperation_depthStencilPassOperation(const void*, SEL) __asm__("_objc_msgSend$" "depthStencilPassOperation"); +bool _MTL_msg_bool_depthTexture(const void*, SEL) __asm__("_objc_msgSend$" "depthTexture"); +bool _MTL_msg_bool_depthWriteEnabled(const void*, SEL) __asm__("_objc_msgSend$" "depthWriteEnabled"); +MTL::AccelerationStructureBoundingBoxGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureBoundingBoxGeometryDescriptorp_descriptor(const void*, SEL) __asm__("_objc_msgSend$" "descriptor"); +MTL::AccelerationStructureCurveGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureCurveGeometryDescriptorp_descriptor(const void*, SEL) __asm__("_objc_msgSend$" "descriptor"); +MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureMotionBoundingBoxGeometryDescriptorp_descriptor(const void*, SEL) __asm__("_objc_msgSend$" "descriptor"); +MTL::AccelerationStructureMotionCurveGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureMotionCurveGeometryDescriptorp_descriptor(const void*, SEL) __asm__("_objc_msgSend$" "descriptor"); +MTL::AccelerationStructureMotionTriangleGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureMotionTriangleGeometryDescriptorp_descriptor(const void*, SEL) __asm__("_objc_msgSend$" "descriptor"); +MTL::AccelerationStructureTriangleGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureTriangleGeometryDescriptorp_descriptor(const void*, SEL) __asm__("_objc_msgSend$" "descriptor"); +MTL::IndirectInstanceAccelerationStructureDescriptor* _MTL_msg_MTL__IndirectInstanceAccelerationStructureDescriptorp_descriptor(const void*, SEL) __asm__("_objc_msgSend$" "descriptor"); +MTL::InstanceAccelerationStructureDescriptor* _MTL_msg_MTL__InstanceAccelerationStructureDescriptorp_descriptor(const void*, SEL) __asm__("_objc_msgSend$" "descriptor"); +MTL::PrimitiveAccelerationStructureDescriptor* _MTL_msg_MTL__PrimitiveAccelerationStructureDescriptorp_descriptor(const void*, SEL) __asm__("_objc_msgSend$" "descriptor"); +MTL::CaptureDestination _MTL_msg_MTL__CaptureDestination_destination(const void*, SEL) __asm__("_objc_msgSend$" "destination"); +MTL::BlendFactor _MTL_msg_MTL__BlendFactor_destinationAlphaBlendFactor(const void*, SEL) __asm__("_objc_msgSend$" "destinationAlphaBlendFactor"); +MTL::BlendFactor _MTL_msg_MTL__BlendFactor_destinationRGBBlendFactor(const void*, SEL) __asm__("_objc_msgSend$" "destinationRGBBlendFactor"); +MTL::Device* _MTL_msg_MTL__Devicep_device(const void*, SEL) __asm__("_objc_msgSend$" "device"); +void _MTL_msg_v_didModifyRange__NS__Range(const void*, SEL, NS::Range) __asm__("_objc_msgSend$" "didModifyRange:"); +MTL::TensorExtents* _MTL_msg_MTL__TensorExtentsp_dimensions(const void*, SEL) __asm__("_objc_msgSend$" "dimensions"); +dispatch_queue_t _MTL_msg_dispatch_queue_t_dispatchQueue(const void*, SEL) __asm__("_objc_msgSend$" "dispatchQueue"); +void _MTL_msg_v_dispatchThreadgroups_threadsPerThreadgroup__MTL__Size_MTL__Size(const void*, SEL, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "dispatchThreadgroups:threadsPerThreadgroup:"); +void _MTL_msg_v_dispatchThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerThreadgroup__MTL__Bufferp_NS__UInteger_MTL__Size(const void*, SEL, MTL::Buffer*, NS::UInteger, MTL::Size) __asm__("_objc_msgSend$" "dispatchThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerThreadgroup:"); +void _MTL_msg_v_dispatchThreads_threadsPerThreadgroup__MTL__Size_MTL__Size(const void*, SEL, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "dispatchThreads:threadsPerThreadgroup:"); +void _MTL_msg_v_dispatchThreadsPerTile__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "dispatchThreadsPerTile:"); +MTL::DispatchType _MTL_msg_MTL__DispatchType_dispatchType(const void*, SEL) __asm__("_objc_msgSend$" "dispatchType"); +void _MTL_msg_v_drawIndexedPatches_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_indirectBuffer_indirectBufferOffset__NS__UInteger_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger(const void*, SEL, NS::UInteger, MTL::Buffer*, NS::UInteger, MTL::Buffer*, NS::UInteger, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "drawIndexedPatches:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:indirectBuffer:indirectBufferOffset:"); +void _MTL_msg_v_drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance__NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger, NS::UInteger, MTL::Buffer*, NS::UInteger, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawIndexedPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:instanceCount:baseInstance:"); +void _MTL_msg_v_drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance_tessellationFactorBuffer_tessellationFactorBufferOffset_tessellationFactorBufferInstanceStride__NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger, NS::UInteger, MTL::Buffer*, NS::UInteger, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawIndexedPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:instanceCount:baseInstance:tessellationFactorBuffer:tessellationFactorBufferOffset:tessellationFactorBufferInstanceStride:"); +void _MTL_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, MTL::IndexType, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:"); +void _MTL_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, MTL::IndexType, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:"); +void _MTL_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__Integer_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, MTL::IndexType, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::Integer, NS::UInteger) __asm__("_objc_msgSend$" "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:baseVertex:baseInstance:"); +void _MTL_msg_v_drawIndexedPrimitives_indexType_indexBuffer_indexBufferOffset_indirectBuffer_indirectBufferOffset__MTL__PrimitiveType_MTL__IndexType_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::PrimitiveType, MTL::IndexType, MTL::Buffer*, NS::UInteger, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "drawIndexedPrimitives:indexType:indexBuffer:indexBufferOffset:indirectBuffer:indirectBufferOffset:"); +void _MTL_msg_v_drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Size_MTL__Size_MTL__Size(const void*, SEL, MTL::Size, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:"); +void _MTL_msg_v_drawMeshThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Bufferp_NS__UInteger_MTL__Size_MTL__Size(const void*, SEL, MTL::Buffer*, NS::UInteger, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "drawMeshThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:"); +void _MTL_msg_v_drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Size_MTL__Size_MTL__Size(const void*, SEL, MTL::Size, MTL::Size, MTL::Size) __asm__("_objc_msgSend$" "drawMeshThreads:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:"); +void _MTL_msg_v_drawPatches_patchIndexBuffer_patchIndexBufferOffset_indirectBuffer_indirectBufferOffset__NS__UInteger_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger(const void*, SEL, NS::UInteger, MTL::Buffer*, NS::UInteger, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "drawPatches:patchIndexBuffer:patchIndexBufferOffset:indirectBuffer:indirectBufferOffset:"); +void _MTL_msg_v_drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance__NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger, NS::UInteger, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance:"); +void _MTL_msg_v_drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance_tessellationFactorBuffer_tessellationFactorBufferOffset_tessellationFactorBufferInstanceStride__NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger, NS::UInteger, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance:tessellationFactorBuffer:tessellationFactorBufferOffset:tessellationFactorBufferInstanceStride:"); +void _MTL_msg_v_drawPrimitives_indirectBuffer_indirectBufferOffset__MTL__PrimitiveType_MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::PrimitiveType, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "drawPrimitives:indirectBuffer:indirectBufferOffset:"); +void _MTL_msg_v_drawPrimitives_vertexStart_vertexCount__MTL__PrimitiveType_NS__UInteger_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawPrimitives:vertexStart:vertexCount:"); +void _MTL_msg_v_drawPrimitives_vertexStart_vertexCount_instanceCount__MTL__PrimitiveType_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawPrimitives:vertexStart:vertexCount:instanceCount:"); +void _MTL_msg_v_drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance__MTL__PrimitiveType_NS__UInteger_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::PrimitiveType, NS::UInteger, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "drawPrimitives:vertexStart:vertexCount:instanceCount:baseInstance:"); +NS::UInteger _MTL_msg_NS__UInteger_drawableID(const void*, SEL) __asm__("_objc_msgSend$" "drawableID"); +MTL::ArrayType* _MTL_msg_MTL__ArrayTypep_elementArrayType(const void*, SEL) __asm__("_objc_msgSend$" "elementArrayType"); +bool _MTL_msg_bool_elementIsArgumentBuffer(const void*, SEL) __asm__("_objc_msgSend$" "elementIsArgumentBuffer"); +MTL::PointerType* _MTL_msg_MTL__PointerTypep_elementPointerType(const void*, SEL) __asm__("_objc_msgSend$" "elementPointerType"); +MTL::StructType* _MTL_msg_MTL__StructTypep_elementStructType(const void*, SEL) __asm__("_objc_msgSend$" "elementStructType"); +MTL::TensorReferenceType* _MTL_msg_MTL__TensorReferenceTypep_elementTensorReferenceType(const void*, SEL) __asm__("_objc_msgSend$" "elementTensorReferenceType"); +MTL::TextureReferenceType* _MTL_msg_MTL__TextureReferenceTypep_elementTextureReferenceType(const void*, SEL) __asm__("_objc_msgSend$" "elementTextureReferenceType"); +MTL::DataType _MTL_msg_MTL__DataType_elementType(const void*, SEL) __asm__("_objc_msgSend$" "elementType"); +bool _MTL_msg_bool_enableLogging(const void*, SEL) __asm__("_objc_msgSend$" "enableLogging"); +void _MTL_msg_v_encodeSignalEvent_value__MTL__Eventp_uint64_t(const void*, SEL, MTL::Event*, uint64_t) __asm__("_objc_msgSend$" "encodeSignalEvent:value:"); +void _MTL_msg_v_encodeWaitForEvent_value__MTL__Eventp_uint64_t(const void*, SEL, MTL::Event*, uint64_t) __asm__("_objc_msgSend$" "encodeWaitForEvent:value:"); +NS::UInteger _MTL_msg_NS__UInteger_encodedLength(const void*, SEL) __asm__("_objc_msgSend$" "encodedLength"); +NS::String* _MTL_msg_NS__Stringp_encoderLabel(const void*, SEL) __asm__("_objc_msgSend$" "encoderLabel"); +void _MTL_msg_v_endEncoding(const void*, SEL) __asm__("_objc_msgSend$" "endEncoding"); +NS::UInteger _MTL_msg_NS__UInteger_endOfEncoderSampleIndex(const void*, SEL) __asm__("_objc_msgSend$" "endOfEncoderSampleIndex"); +NS::UInteger _MTL_msg_NS__UInteger_endOfFragmentSampleIndex(const void*, SEL) __asm__("_objc_msgSend$" "endOfFragmentSampleIndex"); +NS::UInteger _MTL_msg_NS__UInteger_endOfVertexSampleIndex(const void*, SEL) __asm__("_objc_msgSend$" "endOfVertexSampleIndex"); +void _MTL_msg_v_endResidency(const void*, SEL) __asm__("_objc_msgSend$" "endResidency"); +void _MTL_msg_v_endScope(const void*, SEL) __asm__("_objc_msgSend$" "endScope"); +void _MTL_msg_v_enqueue(const void*, SEL) __asm__("_objc_msgSend$" "enqueue"); +void _MTL_msg_v_enqueueBarrier(const void*, SEL) __asm__("_objc_msgSend$" "enqueueBarrier"); +NS::Error* _MTL_msg_NS__Errorp_error(const void*, SEL) __asm__("_objc_msgSend$" "error"); +MTL::CommandBufferErrorOption _MTL_msg_MTL__CommandBufferErrorOption_errorOptions(const void*, SEL) __asm__("_objc_msgSend$" "errorOptions"); +MTL::CommandEncoderErrorState _MTL_msg_MTL__CommandEncoderErrorState_errorState(const void*, SEL) __asm__("_objc_msgSend$" "errorState"); +void _MTL_msg_v_executeCommandsInBuffer_indirectBuffer_indirectBufferOffset__MTL__IndirectCommandBufferp_MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::IndirectCommandBuffer*, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "executeCommandsInBuffer:indirectBuffer:indirectBufferOffset:"); +void _MTL_msg_v_executeCommandsInBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range(const void*, SEL, MTL::IndirectCommandBuffer*, NS::Range) __asm__("_objc_msgSend$" "executeCommandsInBuffer:withRange:"); +NS::Integer _MTL_msg_NS__Integer_extentAtDimensionIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "extentAtDimensionIndex:"); +bool _MTL_msg_bool_fastMathEnabled(const void*, SEL) __asm__("_objc_msgSend$" "fastMathEnabled"); +void _MTL_msg_v_fillBuffer_range_value__MTL__Bufferp_NS__Range_uint8_t(const void*, SEL, MTL::Buffer*, NS::Range, uint8_t) __asm__("_objc_msgSend$" "fillBuffer:range:value:"); +NS::UInteger _MTL_msg_NS__UInteger_firstMipmapInTail(const void*, SEL) __asm__("_objc_msgSend$" "firstMipmapInTail"); +MTL::AttributeFormat _MTL_msg_MTL__AttributeFormat_format(const void*, SEL) __asm__("_objc_msgSend$" "format"); +MTL::VertexFormat _MTL_msg_MTL__VertexFormat_format(const void*, SEL) __asm__("_objc_msgSend$" "format"); +NS::Array* _MTL_msg_NS__Arrayp_fragmentAdditionalBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "fragmentAdditionalBinaryFunctions"); +NS::Array* _MTL_msg_NS__Arrayp_fragmentArguments(const void*, SEL) __asm__("_objc_msgSend$" "fragmentArguments"); +NS::Array* _MTL_msg_NS__Arrayp_fragmentBindings(const void*, SEL) __asm__("_objc_msgSend$" "fragmentBindings"); +MTL::PipelineBufferDescriptorArray* _MTL_msg_MTL__PipelineBufferDescriptorArrayp_fragmentBuffers(const void*, SEL) __asm__("_objc_msgSend$" "fragmentBuffers"); +MTL::Function* _MTL_msg_MTL__Functionp_fragmentFunction(const void*, SEL) __asm__("_objc_msgSend$" "fragmentFunction"); +MTL::LinkedFunctions* _MTL_msg_MTL__LinkedFunctionsp_fragmentLinkedFunctions(const void*, SEL) __asm__("_objc_msgSend$" "fragmentLinkedFunctions"); +NS::Array* _MTL_msg_NS__Arrayp_fragmentPreloadedLibraries(const void*, SEL) __asm__("_objc_msgSend$" "fragmentPreloadedLibraries"); +bool _MTL_msg_bool_framebufferOnly(const void*, SEL) __asm__("_objc_msgSend$" "framebufferOnly"); +MTL::StencilDescriptor* _MTL_msg_MTL__StencilDescriptorp_frontFaceStencil(const void*, SEL) __asm__("_objc_msgSend$" "frontFaceStencil"); +MTL::Function* _MTL_msg_MTL__Functionp_function(const void*, SEL) __asm__("_objc_msgSend$" "function"); +NS::Dictionary* _MTL_msg_NS__Dictionaryp_functionConstantsDictionary(const void*, SEL) __asm__("_objc_msgSend$" "functionConstantsDictionary"); +NS::UInteger _MTL_msg_NS__UInteger_functionCount(const void*, SEL) __asm__("_objc_msgSend$" "functionCount"); +MTL::FunctionDescriptor* _MTL_msg_MTL__FunctionDescriptorp_functionDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "functionDescriptor"); +NS::Array* _MTL_msg_NS__Arrayp_functionGraphs(const void*, SEL) __asm__("_objc_msgSend$" "functionGraphs"); +MTL::FunctionHandle* _MTL_msg_MTL__FunctionHandlep_functionHandleWithBinaryFunction__MTL4__BinaryFunctionp(const void*, SEL, MTL4::BinaryFunction*) __asm__("_objc_msgSend$" "functionHandleWithBinaryFunction:"); +MTL::FunctionHandle* _MTL_msg_MTL__FunctionHandlep_functionHandleWithBinaryFunction_stage__MTL4__BinaryFunctionp_MTL__RenderStages(const void*, SEL, MTL4::BinaryFunction*, MTL::RenderStages) __asm__("_objc_msgSend$" "functionHandleWithBinaryFunction:stage:"); +MTL::FunctionHandle* _MTL_msg_MTL__FunctionHandlep_functionHandleWithFunction__MTL__Functionp(const void*, SEL, MTL::Function*) __asm__("_objc_msgSend$" "functionHandleWithFunction:"); +MTL::FunctionHandle* _MTL_msg_MTL__FunctionHandlep_functionHandleWithFunction_stage__MTL__Functionp_MTL__RenderStages(const void*, SEL, MTL::Function*, MTL::RenderStages) __asm__("_objc_msgSend$" "functionHandleWithFunction:stage:"); +MTL::FunctionHandle* _MTL_msg_MTL__FunctionHandlep_functionHandleWithName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "functionHandleWithName:"); +MTL::FunctionHandle* _MTL_msg_MTL__FunctionHandlep_functionHandleWithName_stage__NS__Stringp_MTL__RenderStages(const void*, SEL, NS::String*, MTL::RenderStages) __asm__("_objc_msgSend$" "functionHandleWithName:stage:"); +NS::String* _MTL_msg_NS__Stringp_functionName(const void*, SEL) __asm__("_objc_msgSend$" "functionName"); +NS::Array* _MTL_msg_NS__Arrayp_functionNames(const void*, SEL) __asm__("_objc_msgSend$" "functionNames"); +MTL::FunctionType _MTL_msg_MTL__FunctionType_functionType(const void*, SEL) __asm__("_objc_msgSend$" "functionType"); +NS::Array* _MTL_msg_NS__Arrayp_functions(const void*, SEL) __asm__("_objc_msgSend$" "functions"); +void _MTL_msg_v_generateMipmapsForTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "generateMipmapsForTexture:"); +NS::Array* _MTL_msg_NS__Arrayp_geometryDescriptors(const void*, SEL) __asm__("_objc_msgSend$" "geometryDescriptors"); +void _MTL_msg_v_getBytes_bytesPerRow_bytesPerImage_fromRegion_mipmapLevel_slice__voidp_NS__UInteger_NS__UInteger_MTL__Region_NS__UInteger_NS__UInteger(const void*, SEL, void *, NS::UInteger, NS::UInteger, MTL::Region, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "getBytes:bytesPerRow:bytesPerImage:fromRegion:mipmapLevel:slice:"); +void _MTL_msg_v_getBytes_bytesPerRow_fromRegion_mipmapLevel__voidp_NS__UInteger_MTL__Region_NS__UInteger(const void*, SEL, void *, NS::UInteger, MTL::Region, NS::UInteger) __asm__("_objc_msgSend$" "getBytes:bytesPerRow:fromRegion:mipmapLevel:"); +void _MTL_msg_v_getBytes_strides_fromSliceOrigin_sliceDimensions__voidp_MTL__TensorExtentsp_MTL__TensorExtentsp_MTL__TensorExtentsp(const void*, SEL, void *, MTL::TensorExtents*, MTL::TensorExtents*, MTL::TensorExtents*) __asm__("_objc_msgSend$" "getBytes:strides:fromSliceOrigin:sliceDimensions:"); +void _MTL_msg_v_getDefaultSamplePositions_count__MTL__SamplePositionp_NS__UInteger(const void*, SEL, MTL::SamplePosition*, NS::UInteger) __asm__("_objc_msgSend$" "getDefaultSamplePositions:count:"); +NS::UInteger _MTL_msg_NS__UInteger_getPhysicalIndexForLogicalIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "getPhysicalIndexForLogicalIndex:"); +NS::UInteger _MTL_msg_NS__UInteger_getSamplePositions_count__MTL__SamplePositionp_NS__UInteger(const void*, SEL, MTL::SamplePosition*, NS::UInteger) __asm__("_objc_msgSend$" "getSamplePositions:count:"); +void _MTL_msg_v_getTextureAccessCounters_region_mipLevel_slice_resetCounters_countersBuffer_countersBufferOffset__MTL__Texturep_MTL__Region_NS__UInteger_NS__UInteger_bool_MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::Texture*, MTL::Region, NS::UInteger, NS::UInteger, bool, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "getTextureAccessCounters:region:mipLevel:slice:resetCounters:countersBuffer:countersBufferOffset:"); +MTL::GPUAddress _MTL_msg_MTL__GPUAddress_gpuAddress(const void*, SEL) __asm__("_objc_msgSend$" "gpuAddress"); +MTL::ResourceID _MTL_msg_MTL__ResourceID_gpuResourceID(const void*, SEL) __asm__("_objc_msgSend$" "gpuResourceID"); +NS::Dictionary* _MTL_msg_NS__Dictionaryp_groups(const void*, SEL) __asm__("_objc_msgSend$" "groups"); +bool _MTL_msg_bool_hasUnifiedMemory(const void*, SEL) __asm__("_objc_msgSend$" "hasUnifiedMemory"); +MTL::HazardTrackingMode _MTL_msg_MTL__HazardTrackingMode_hazardTrackingMode(const void*, SEL) __asm__("_objc_msgSend$" "hazardTrackingMode"); +bool _MTL_msg_bool_headless(const void*, SEL) __asm__("_objc_msgSend$" "headless"); +MTL::Heap* _MTL_msg_MTL__Heapp_heap(const void*, SEL) __asm__("_objc_msgSend$" "heap"); +MTL::SizeAndAlign _MTL_msg_MTL__SizeAndAlign_heapAccelerationStructureSizeAndAlignWithDescriptor__MTL__AccelerationStructureDescriptorp(const void*, SEL, MTL::AccelerationStructureDescriptor*) __asm__("_objc_msgSend$" "heapAccelerationStructureSizeAndAlignWithDescriptor:"); +MTL::SizeAndAlign _MTL_msg_MTL__SizeAndAlign_heapAccelerationStructureSizeAndAlignWithSize__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "heapAccelerationStructureSizeAndAlignWithSize:"); +MTL::SizeAndAlign _MTL_msg_MTL__SizeAndAlign_heapBufferSizeAndAlignWithLength_options__NS__UInteger_MTL__ResourceOptions(const void*, SEL, NS::UInteger, MTL::ResourceOptions) __asm__("_objc_msgSend$" "heapBufferSizeAndAlignWithLength:options:"); +NS::UInteger _MTL_msg_NS__UInteger_heapOffset(const void*, SEL) __asm__("_objc_msgSend$" "heapOffset"); +MTL::SizeAndAlign _MTL_msg_MTL__SizeAndAlign_heapTextureSizeAndAlignWithDescriptor__MTL__TextureDescriptorp(const void*, SEL, MTL::TextureDescriptor*) __asm__("_objc_msgSend$" "heapTextureSizeAndAlignWithDescriptor:"); +NS::UInteger _MTL_msg_NS__UInteger_height(const void*, SEL) __asm__("_objc_msgSend$" "height"); +MTL::RasterizationRateSampleArray* _MTL_msg_MTL__RasterizationRateSampleArrayp_horizontal(const void*, SEL) __asm__("_objc_msgSend$" "horizontal"); +float * _MTL_msg_floatp_horizontalSampleStorage(const void*, SEL) __asm__("_objc_msgSend$" "horizontalSampleStorage"); +NS::UInteger _MTL_msg_NS__UInteger_imageblockMemoryLengthForDimensions__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "imageblockMemoryLengthForDimensions:"); +NS::UInteger _MTL_msg_NS__UInteger_imageblockSampleLength(const void*, SEL) __asm__("_objc_msgSend$" "imageblockSampleLength"); +NS::UInteger _MTL_msg_NS__UInteger_index(const void*, SEL) __asm__("_objc_msgSend$" "index"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_indexBuffer(const void*, SEL) __asm__("_objc_msgSend$" "indexBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_indexBufferIndex(const void*, SEL) __asm__("_objc_msgSend$" "indexBufferIndex"); +NS::UInteger _MTL_msg_NS__UInteger_indexBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "indexBufferOffset"); +MTL::DataType _MTL_msg_MTL__DataType_indexType(const void*, SEL) __asm__("_objc_msgSend$" "indexType"); +MTL::IndexType _MTL_msg_MTL__IndexType_indexType(const void*, SEL) __asm__("_objc_msgSend$" "indexType"); +MTL::IndirectComputeCommand* _MTL_msg_MTL__IndirectComputeCommandp_indirectComputeCommandAtIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "indirectComputeCommandAtIndex:"); +MTL::IndirectRenderCommand* _MTL_msg_MTL__IndirectRenderCommandp_indirectRenderCommandAtIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "indirectRenderCommandAtIndex:"); +bool _MTL_msg_bool_inheritBuffers(const void*, SEL) __asm__("_objc_msgSend$" "inheritBuffers"); +bool _MTL_msg_bool_inheritCullMode(const void*, SEL) __asm__("_objc_msgSend$" "inheritCullMode"); +bool _MTL_msg_bool_inheritDepthBias(const void*, SEL) __asm__("_objc_msgSend$" "inheritDepthBias"); +bool _MTL_msg_bool_inheritDepthClipMode(const void*, SEL) __asm__("_objc_msgSend$" "inheritDepthClipMode"); +bool _MTL_msg_bool_inheritDepthStencilState(const void*, SEL) __asm__("_objc_msgSend$" "inheritDepthStencilState"); +bool _MTL_msg_bool_inheritFrontFacingWinding(const void*, SEL) __asm__("_objc_msgSend$" "inheritFrontFacingWinding"); +bool _MTL_msg_bool_inheritPipelineState(const void*, SEL) __asm__("_objc_msgSend$" "inheritPipelineState"); +bool _MTL_msg_bool_inheritTriangleFillMode(const void*, SEL) __asm__("_objc_msgSend$" "inheritTriangleFillMode"); +MTL::AccelerationStructureBoundingBoxGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureBoundingBoxGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AccelerationStructureCurveGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureCurveGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AccelerationStructureDescriptor* _MTL_msg_MTL__AccelerationStructureDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AccelerationStructureGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureMotionBoundingBoxGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AccelerationStructureMotionCurveGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureMotionCurveGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AccelerationStructureMotionTriangleGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureMotionTriangleGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AccelerationStructurePassDescriptor* _MTL_msg_MTL__AccelerationStructurePassDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AccelerationStructureTriangleGeometryDescriptor* _MTL_msg_MTL__AccelerationStructureTriangleGeometryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::Architecture* _MTL_msg_MTL__Architecturep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ArgumentDescriptor* _MTL_msg_MTL__ArgumentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::Argument* _MTL_msg_MTL__Argumentp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ArrayType* _MTL_msg_MTL__ArrayTypep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AttributeDescriptorArray* _MTL_msg_MTL__AttributeDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::AttributeDescriptor* _MTL_msg_MTL__AttributeDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::Attribute* _MTL_msg_MTL__Attributep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::BinaryArchiveDescriptor* _MTL_msg_MTL__BinaryArchiveDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::BlitPassDescriptor* _MTL_msg_MTL__BlitPassDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::BlitPassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::BlitPassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::BufferLayoutDescriptorArray* _MTL_msg_MTL__BufferLayoutDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::BufferLayoutDescriptor* _MTL_msg_MTL__BufferLayoutDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::CaptureDescriptor* _MTL_msg_MTL__CaptureDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::CaptureManager* _MTL_msg_MTL__CaptureManagerp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::CommandBufferDescriptor* _MTL_msg_MTL__CommandBufferDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::CommandQueueDescriptor* _MTL_msg_MTL__CommandQueueDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::CompileOptions* _MTL_msg_MTL__CompileOptionsp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ComputePassDescriptor* _MTL_msg_MTL__ComputePassDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ComputePassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ComputePassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ComputePipelineDescriptor* _MTL_msg_MTL__ComputePipelineDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ComputePipelineReflection* _MTL_msg_MTL__ComputePipelineReflectionp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::CounterSampleBufferDescriptor* _MTL_msg_MTL__CounterSampleBufferDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::DepthStencilDescriptor* _MTL_msg_MTL__DepthStencilDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::FunctionConstantValues* _MTL_msg_MTL__FunctionConstantValuesp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::FunctionConstant* _MTL_msg_MTL__FunctionConstantp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::FunctionDescriptor* _MTL_msg_MTL__FunctionDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::FunctionReflection* _MTL_msg_MTL__FunctionReflectionp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::FunctionStitchingAttributeAlwaysInline* _MTL_msg_MTL__FunctionStitchingAttributeAlwaysInlinep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::FunctionStitchingFunctionNode* _MTL_msg_MTL__FunctionStitchingFunctionNodep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::FunctionStitchingGraph* _MTL_msg_MTL__FunctionStitchingGraphp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::FunctionStitchingInputNode* _MTL_msg_MTL__FunctionStitchingInputNodep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::HeapDescriptor* _MTL_msg_MTL__HeapDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::IOCommandQueueDescriptor* _MTL_msg_MTL__IOCommandQueueDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::IndirectCommandBufferDescriptor* _MTL_msg_MTL__IndirectCommandBufferDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::IndirectInstanceAccelerationStructureDescriptor* _MTL_msg_MTL__IndirectInstanceAccelerationStructureDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::InstanceAccelerationStructureDescriptor* _MTL_msg_MTL__InstanceAccelerationStructureDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::IntersectionFunctionDescriptor* _MTL_msg_MTL__IntersectionFunctionDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::IntersectionFunctionTableDescriptor* _MTL_msg_MTL__IntersectionFunctionTableDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::LinkedFunctions* _MTL_msg_MTL__LinkedFunctionsp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::LogStateDescriptor* _MTL_msg_MTL__LogStateDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::LogicalToPhysicalColorAttachmentMap* _MTL_msg_MTL__LogicalToPhysicalColorAttachmentMapp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::MeshRenderPipelineDescriptor* _MTL_msg_MTL__MeshRenderPipelineDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::MotionKeyframeData* _MTL_msg_MTL__MotionKeyframeDatap_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::PipelineBufferDescriptorArray* _MTL_msg_MTL__PipelineBufferDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::PipelineBufferDescriptor* _MTL_msg_MTL__PipelineBufferDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::PointerType* _MTL_msg_MTL__PointerTypep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::PrimitiveAccelerationStructureDescriptor* _MTL_msg_MTL__PrimitiveAccelerationStructureDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RasterizationRateLayerArray* _MTL_msg_MTL__RasterizationRateLayerArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RasterizationRateLayerDescriptor* _MTL_msg_MTL__RasterizationRateLayerDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RasterizationRateMapDescriptor* _MTL_msg_MTL__RasterizationRateMapDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RasterizationRateSampleArray* _MTL_msg_MTL__RasterizationRateSampleArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPassAttachmentDescriptor* _MTL_msg_MTL__RenderPassAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPassColorAttachmentDescriptorArray* _MTL_msg_MTL__RenderPassColorAttachmentDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPassColorAttachmentDescriptor* _MTL_msg_MTL__RenderPassColorAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPassDepthAttachmentDescriptor* _MTL_msg_MTL__RenderPassDepthAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPassDescriptor* _MTL_msg_MTL__RenderPassDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPassStencilAttachmentDescriptor* _MTL_msg_MTL__RenderPassStencilAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPipelineColorAttachmentDescriptorArray* _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPipelineColorAttachmentDescriptor* _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPipelineDescriptor* _MTL_msg_MTL__RenderPipelineDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPipelineFunctionsDescriptor* _MTL_msg_MTL__RenderPipelineFunctionsDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::RenderPipelineReflection* _MTL_msg_MTL__RenderPipelineReflectionp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ResidencySetDescriptor* _MTL_msg_MTL__ResidencySetDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ResourceStatePassDescriptor* _MTL_msg_MTL__ResourceStatePassDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ResourceStatePassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::ResourceViewPoolDescriptor* _MTL_msg_MTL__ResourceViewPoolDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::SamplerDescriptor* _MTL_msg_MTL__SamplerDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::SharedEventHandle* _MTL_msg_MTL__SharedEventHandlep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::SharedEventListener* _MTL_msg_MTL__SharedEventListenerp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::SharedTextureHandle* _MTL_msg_MTL__SharedTextureHandlep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::StageInputOutputDescriptor* _MTL_msg_MTL__StageInputOutputDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::StencilDescriptor* _MTL_msg_MTL__StencilDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::StitchedLibraryDescriptor* _MTL_msg_MTL__StitchedLibraryDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::StructMember* _MTL_msg_MTL__StructMemberp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::StructType* _MTL_msg_MTL__StructTypep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::TensorDescriptor* _MTL_msg_MTL__TensorDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::TensorExtents* _MTL_msg_MTL__TensorExtentsp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::TensorReferenceType* _MTL_msg_MTL__TensorReferenceTypep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::TextureDescriptor* _MTL_msg_MTL__TextureDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::TextureReferenceType* _MTL_msg_MTL__TextureReferenceTypep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::TextureViewDescriptor* _MTL_msg_MTL__TextureViewDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::TileRenderPipelineColorAttachmentDescriptorArray* _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::TileRenderPipelineColorAttachmentDescriptor* _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::TileRenderPipelineDescriptor* _MTL_msg_MTL__TileRenderPipelineDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::Type* _MTL_msg_MTL__Typep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::VertexAttributeDescriptorArray* _MTL_msg_MTL__VertexAttributeDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::VertexAttributeDescriptor* _MTL_msg_MTL__VertexAttributeDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::VertexAttribute* _MTL_msg_MTL__VertexAttributep_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::VertexBufferLayoutDescriptorArray* _MTL_msg_MTL__VertexBufferLayoutDescriptorArrayp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::VertexBufferLayoutDescriptor* _MTL_msg_MTL__VertexBufferLayoutDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::VertexDescriptor* _MTL_msg_MTL__VertexDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::VisibleFunctionTableDescriptor* _MTL_msg_MTL__VisibleFunctionTableDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTL::FunctionStitchingInputNode* _MTL_msg_MTL__FunctionStitchingInputNodep_initWithArgumentIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "initWithArgumentIndex:"); +MTL::SharedEventListener* _MTL_msg_MTL__SharedEventListenerp_initWithDispatchQueue__dispatch_queue_t(const void*, SEL, dispatch_queue_t) __asm__("_objc_msgSend$" "initWithDispatchQueue:"); +MTL::FunctionStitchingGraph* _MTL_msg_MTL__FunctionStitchingGraphp_initWithFunctionName_nodes_outputNode_attributes__NS__Stringp_NS__Arrayp_MTL__FunctionStitchingFunctionNodep_NS__Arrayp(const void*, SEL, NS::String*, NS::Array*, MTL::FunctionStitchingFunctionNode*, NS::Array*) __asm__("_objc_msgSend$" "initWithFunctionName:nodes:outputNode:attributes:"); +MTL::FunctionStitchingFunctionNode* _MTL_msg_MTL__FunctionStitchingFunctionNodep_initWithName_arguments_controlDependencies__NS__Stringp_NS__Arrayp_NS__Arrayp(const void*, SEL, NS::String*, NS::Array*, NS::Array*) __asm__("_objc_msgSend$" "initWithName:arguments:controlDependencies:"); +MTL::TensorExtents* _MTL_msg_MTL__TensorExtentsp_initWithRank_values__NS__UInteger_constNS__Integerp(const void*, SEL, NS::UInteger, const NS::Integer *) __asm__("_objc_msgSend$" "initWithRank:values:"); +MTL::RasterizationRateLayerDescriptor* _MTL_msg_MTL__RasterizationRateLayerDescriptorp_initWithSampleCount__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "initWithSampleCount:"); +MTL::RasterizationRateLayerDescriptor* _MTL_msg_MTL__RasterizationRateLayerDescriptorp_initWithSampleCount_horizontal_vertical__MTL__Size_constfloatp_constfloatp(const void*, SEL, MTL::Size, const float *, const float *) __asm__("_objc_msgSend$" "initWithSampleCount:horizontal:vertical:"); +NS::UInteger _MTL_msg_NS__UInteger_initialCapacity(const void*, SEL) __asm__("_objc_msgSend$" "initialCapacity"); +MTL::PrimitiveTopologyClass _MTL_msg_MTL__PrimitiveTopologyClass_inputPrimitiveTopology(const void*, SEL) __asm__("_objc_msgSend$" "inputPrimitiveTopology"); +void _MTL_msg_v_insertDebugCaptureBoundary(const void*, SEL) __asm__("_objc_msgSend$" "insertDebugCaptureBoundary"); +void _MTL_msg_v_insertDebugSignpost__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "insertDebugSignpost:"); +NS::Array* _MTL_msg_NS__Arrayp_insertLibraries(const void*, SEL) __asm__("_objc_msgSend$" "insertLibraries"); +NS::String* _MTL_msg_NS__Stringp_installName(const void*, SEL) __asm__("_objc_msgSend$" "installName"); +NS::UInteger _MTL_msg_NS__UInteger_instanceCount(const void*, SEL) __asm__("_objc_msgSend$" "instanceCount"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_instanceCountBuffer(const void*, SEL) __asm__("_objc_msgSend$" "instanceCountBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_instanceCountBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "instanceCountBufferOffset"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_instanceDescriptorBuffer(const void*, SEL) __asm__("_objc_msgSend$" "instanceDescriptorBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_instanceDescriptorBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "instanceDescriptorBufferOffset"); +NS::UInteger _MTL_msg_NS__UInteger_instanceDescriptorStride(const void*, SEL) __asm__("_objc_msgSend$" "instanceDescriptorStride"); +MTL::AccelerationStructureInstanceDescriptorType _MTL_msg_MTL__AccelerationStructureInstanceDescriptorType_instanceDescriptorType(const void*, SEL) __asm__("_objc_msgSend$" "instanceDescriptorType"); +MTL::MatrixLayout _MTL_msg_MTL__MatrixLayout_instanceTransformationMatrixLayout(const void*, SEL) __asm__("_objc_msgSend$" "instanceTransformationMatrixLayout"); +NS::Array* _MTL_msg_NS__Arrayp_instancedAccelerationStructures(const void*, SEL) __asm__("_objc_msgSend$" "instancedAccelerationStructures"); +MTL::IntersectionFunctionTableDescriptor* _MTL_msg_MTL__IntersectionFunctionTableDescriptorp_intersectionFunctionTableDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "intersectionFunctionTableDescriptor"); +NS::UInteger _MTL_msg_NS__UInteger_intersectionFunctionTableOffset(const void*, SEL) __asm__("_objc_msgSend$" "intersectionFunctionTableOffset"); +IOSurfaceRef _MTL_msg_IOSurfaceRef_iosurface(const void*, SEL) __asm__("_objc_msgSend$" "iosurface"); +NS::UInteger _MTL_msg_NS__UInteger_iosurfacePlane(const void*, SEL) __asm__("_objc_msgSend$" "iosurfacePlane"); +bool _MTL_msg_bool_isActive(const void*, SEL) __asm__("_objc_msgSend$" "isActive"); +bool _MTL_msg_bool_isAliasable(const void*, SEL) __asm__("_objc_msgSend$" "isAliasable"); +bool _MTL_msg_bool_isAlphaToCoverageEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isAlphaToCoverageEnabled"); +bool _MTL_msg_bool_isAlphaToOneEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isAlphaToOneEnabled"); +bool _MTL_msg_bool_isArgument(const void*, SEL) __asm__("_objc_msgSend$" "isArgument"); +bool _MTL_msg_bool_isBlendingEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isBlendingEnabled"); +bool _MTL_msg_bool_isCapturing(const void*, SEL) __asm__("_objc_msgSend$" "isCapturing"); +bool _MTL_msg_bool_isDepth24Stencil8PixelFormatSupported(const void*, SEL) __asm__("_objc_msgSend$" "isDepth24Stencil8PixelFormatSupported"); +bool _MTL_msg_bool_isDepthTexture(const void*, SEL) __asm__("_objc_msgSend$" "isDepthTexture"); +bool _MTL_msg_bool_isDepthWriteEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isDepthWriteEnabled"); +bool _MTL_msg_bool_isFramebufferOnly(const void*, SEL) __asm__("_objc_msgSend$" "isFramebufferOnly"); +bool _MTL_msg_bool_isHeadless(const void*, SEL) __asm__("_objc_msgSend$" "isHeadless"); +bool _MTL_msg_bool_isLowPower(const void*, SEL) __asm__("_objc_msgSend$" "isLowPower"); +bool _MTL_msg_bool_isPatchControlPointData(const void*, SEL) __asm__("_objc_msgSend$" "isPatchControlPointData"); +bool _MTL_msg_bool_isPatchData(const void*, SEL) __asm__("_objc_msgSend$" "isPatchData"); +bool _MTL_msg_bool_isRasterizationEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isRasterizationEnabled"); +bool _MTL_msg_bool_isRemovable(const void*, SEL) __asm__("_objc_msgSend$" "isRemovable"); +bool _MTL_msg_bool_isShareable(const void*, SEL) __asm__("_objc_msgSend$" "isShareable"); +bool _MTL_msg_bool_isSparse(const void*, SEL) __asm__("_objc_msgSend$" "isSparse"); +bool _MTL_msg_bool_isTessellationFactorScaleEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isTessellationFactorScaleEnabled"); +bool _MTL_msg_bool_isUsed(const void*, SEL) __asm__("_objc_msgSend$" "isUsed"); +CFTimeInterval _MTL_msg_CFTimeInterval_kernelEndTime(const void*, SEL) __asm__("_objc_msgSend$" "kernelEndTime"); +CFTimeInterval _MTL_msg_CFTimeInterval_kernelStartTime(const void*, SEL) __asm__("_objc_msgSend$" "kernelStartTime"); +NS::String* _MTL_msg_NS__Stringp_label(const void*, SEL) __asm__("_objc_msgSend$" "label"); +MTL::LanguageVersion _MTL_msg_MTL__LanguageVersion_languageVersion(const void*, SEL) __asm__("_objc_msgSend$" "languageVersion"); +MTL::RasterizationRateLayerDescriptor* _MTL_msg_MTL__RasterizationRateLayerDescriptorp_layerAtIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "layerAtIndex:"); +NS::UInteger _MTL_msg_NS__UInteger_layerCount(const void*, SEL) __asm__("_objc_msgSend$" "layerCount"); +MTL::RasterizationRateLayerArray* _MTL_msg_MTL__RasterizationRateLayerArrayp_layers(const void*, SEL) __asm__("_objc_msgSend$" "layers"); +MTL::BufferLayoutDescriptorArray* _MTL_msg_MTL__BufferLayoutDescriptorArrayp_layouts(const void*, SEL) __asm__("_objc_msgSend$" "layouts"); +MTL::VertexBufferLayoutDescriptorArray* _MTL_msg_MTL__VertexBufferLayoutDescriptorArrayp_layouts(const void*, SEL) __asm__("_objc_msgSend$" "layouts"); +NS::UInteger _MTL_msg_NS__UInteger_length(const void*, SEL) __asm__("_objc_msgSend$" "length"); +MTL::LogLevel _MTL_msg_MTL__LogLevel_level(const void*, SEL) __asm__("_objc_msgSend$" "level"); +NS::UInteger _MTL_msg_NS__UInteger_level(const void*, SEL) __asm__("_objc_msgSend$" "level"); +NS::Range _MTL_msg_NS__Range_levelRange(const void*, SEL) __asm__("_objc_msgSend$" "levelRange"); +NS::Array* _MTL_msg_NS__Arrayp_libraries(const void*, SEL) __asm__("_objc_msgSend$" "libraries"); +MTL::LibraryType _MTL_msg_MTL__LibraryType_libraryType(const void*, SEL) __asm__("_objc_msgSend$" "libraryType"); +NS::UInteger _MTL_msg_NS__UInteger_line(const void*, SEL) __asm__("_objc_msgSend$" "line"); +MTL::LinkedFunctions* _MTL_msg_MTL__LinkedFunctionsp_linkedFunctions(const void*, SEL) __asm__("_objc_msgSend$" "linkedFunctions"); +MTL::LoadAction _MTL_msg_MTL__LoadAction_loadAction(const void*, SEL) __asm__("_objc_msgSend$" "loadAction"); +void _MTL_msg_v_loadBuffer_offset_size_sourceHandle_sourceHandleOffset__MTL__Bufferp_NS__UInteger_NS__UInteger_MTL__IOFileHandlep_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger, MTL::IOFileHandle*, NS::UInteger) __asm__("_objc_msgSend$" "loadBuffer:offset:size:sourceHandle:sourceHandleOffset:"); +void _MTL_msg_v_loadBytes_size_sourceHandle_sourceHandleOffset__voidp_NS__UInteger_MTL__IOFileHandlep_NS__UInteger(const void*, SEL, void *, NS::UInteger, MTL::IOFileHandle*, NS::UInteger) __asm__("_objc_msgSend$" "loadBytes:size:sourceHandle:sourceHandleOffset:"); +void _MTL_msg_v_loadTexture_slice_level_size_sourceBytesPerRow_sourceBytesPerImage_destinationOrigin_sourceHandle_sourceHandleOffset__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Size_NS__UInteger_NS__UInteger_MTL__Origin_MTL__IOFileHandlep_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Size, NS::UInteger, NS::UInteger, MTL::Origin, MTL::IOFileHandle*, NS::UInteger) __asm__("_objc_msgSend$" "loadTexture:slice:level:size:sourceBytesPerRow:sourceBytesPerImage:destinationOrigin:sourceHandle:sourceHandleOffset:"); +MTL::DeviceLocation _MTL_msg_MTL__DeviceLocation_location(const void*, SEL) __asm__("_objc_msgSend$" "location"); +NS::UInteger _MTL_msg_NS__UInteger_locationNumber(const void*, SEL) __asm__("_objc_msgSend$" "locationNumber"); +bool _MTL_msg_bool_lodAverage(const void*, SEL) __asm__("_objc_msgSend$" "lodAverage"); +float _MTL_msg_float_lodBias(const void*, SEL) __asm__("_objc_msgSend$" "lodBias"); +float _MTL_msg_float_lodMaxClamp(const void*, SEL) __asm__("_objc_msgSend$" "lodMaxClamp"); +float _MTL_msg_float_lodMinClamp(const void*, SEL) __asm__("_objc_msgSend$" "lodMinClamp"); +MTL::LogState* _MTL_msg_MTL__LogStatep_logState(const void*, SEL) __asm__("_objc_msgSend$" "logState"); +MTL::LogContainer* _MTL_msg_MTL__LogContainerp_logs(const void*, SEL) __asm__("_objc_msgSend$" "logs"); +bool _MTL_msg_bool_lowPower(const void*, SEL) __asm__("_objc_msgSend$" "lowPower"); +MTL::SamplerMinMagFilter _MTL_msg_MTL__SamplerMinMagFilter_magFilter(const void*, SEL) __asm__("_objc_msgSend$" "magFilter"); +void _MTL_msg_v_makeAliasable(const void*, SEL) __asm__("_objc_msgSend$" "makeAliasable"); +MTL::SamplePosition _MTL_msg_MTL__SamplePosition_mapPhysicalToScreenCoordinates_forLayer__MTL__SamplePosition_NS__UInteger(const void*, SEL, MTL::SamplePosition, NS::UInteger) __asm__("_objc_msgSend$" "mapPhysicalToScreenCoordinates:forLayer:"); +MTL::SamplePosition _MTL_msg_MTL__SamplePosition_mapScreenToPhysicalCoordinates_forLayer__MTL__SamplePosition_NS__UInteger(const void*, SEL, MTL::SamplePosition, NS::UInteger) __asm__("_objc_msgSend$" "mapScreenToPhysicalCoordinates:forLayer:"); +MTL::MathFloatingPointFunctions _MTL_msg_MTL__MathFloatingPointFunctions_mathFloatingPointFunctions(const void*, SEL) __asm__("_objc_msgSend$" "mathFloatingPointFunctions"); +MTL::MathMode _MTL_msg_MTL__MathMode_mathMode(const void*, SEL) __asm__("_objc_msgSend$" "mathMode"); +NS::UInteger _MTL_msg_NS__UInteger_maxAnisotropy(const void*, SEL) __asm__("_objc_msgSend$" "maxAnisotropy"); +NS::UInteger _MTL_msg_NS__UInteger_maxArgumentBufferSamplerCount(const void*, SEL) __asm__("_objc_msgSend$" "maxArgumentBufferSamplerCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxAvailableSizeWithAlignment__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "maxAvailableSizeWithAlignment:"); +NS::UInteger _MTL_msg_NS__UInteger_maxBufferLength(const void*, SEL) __asm__("_objc_msgSend$" "maxBufferLength"); +NS::UInteger _MTL_msg_NS__UInteger_maxCallStackDepth(const void*, SEL) __asm__("_objc_msgSend$" "maxCallStackDepth"); +NS::UInteger _MTL_msg_NS__UInteger_maxCommandBufferCount(const void*, SEL) __asm__("_objc_msgSend$" "maxCommandBufferCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxCommandsInFlight(const void*, SEL) __asm__("_objc_msgSend$" "maxCommandsInFlight"); +MTL::SparsePageSize _MTL_msg_MTL__SparsePageSize_maxCompatiblePlacementSparsePageSize(const void*, SEL) __asm__("_objc_msgSend$" "maxCompatiblePlacementSparsePageSize"); +NS::UInteger _MTL_msg_NS__UInteger_maxFragmentBufferBindCount(const void*, SEL) __asm__("_objc_msgSend$" "maxFragmentBufferBindCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxFragmentCallStackDepth(const void*, SEL) __asm__("_objc_msgSend$" "maxFragmentCallStackDepth"); +NS::UInteger _MTL_msg_NS__UInteger_maxInstanceCount(const void*, SEL) __asm__("_objc_msgSend$" "maxInstanceCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxKernelBufferBindCount(const void*, SEL) __asm__("_objc_msgSend$" "maxKernelBufferBindCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxKernelThreadgroupMemoryBindCount(const void*, SEL) __asm__("_objc_msgSend$" "maxKernelThreadgroupMemoryBindCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxMeshBufferBindCount(const void*, SEL) __asm__("_objc_msgSend$" "maxMeshBufferBindCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxMotionTransformCount(const void*, SEL) __asm__("_objc_msgSend$" "maxMotionTransformCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxObjectBufferBindCount(const void*, SEL) __asm__("_objc_msgSend$" "maxObjectBufferBindCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxObjectThreadgroupMemoryBindCount(const void*, SEL) __asm__("_objc_msgSend$" "maxObjectThreadgroupMemoryBindCount"); +MTL::Size _MTL_msg_MTL__Size_maxSampleCount(const void*, SEL) __asm__("_objc_msgSend$" "maxSampleCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxTessellationFactor(const void*, SEL) __asm__("_objc_msgSend$" "maxTessellationFactor"); +NS::UInteger _MTL_msg_NS__UInteger_maxThreadgroupMemoryLength(const void*, SEL) __asm__("_objc_msgSend$" "maxThreadgroupMemoryLength"); +MTL::Size _MTL_msg_MTL__Size_maxThreadsPerThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "maxThreadsPerThreadgroup"); +NS::UInteger _MTL_msg_NS__UInteger_maxTotalThreadgroupsPerMeshGrid(const void*, SEL) __asm__("_objc_msgSend$" "maxTotalThreadgroupsPerMeshGrid"); +NS::UInteger _MTL_msg_NS__UInteger_maxTotalThreadsPerMeshThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "maxTotalThreadsPerMeshThreadgroup"); +NS::UInteger _MTL_msg_NS__UInteger_maxTotalThreadsPerObjectThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "maxTotalThreadsPerObjectThreadgroup"); +NS::UInteger _MTL_msg_NS__UInteger_maxTotalThreadsPerThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "maxTotalThreadsPerThreadgroup"); +uint64_t _MTL_msg_uint64_t_maxTransferRate(const void*, SEL) __asm__("_objc_msgSend$" "maxTransferRate"); +NS::UInteger _MTL_msg_NS__UInteger_maxVertexAmplificationCount(const void*, SEL) __asm__("_objc_msgSend$" "maxVertexAmplificationCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxVertexBufferBindCount(const void*, SEL) __asm__("_objc_msgSend$" "maxVertexBufferBindCount"); +NS::UInteger _MTL_msg_NS__UInteger_maxVertexCallStackDepth(const void*, SEL) __asm__("_objc_msgSend$" "maxVertexCallStackDepth"); +NS::UInteger _MTL_msg_NS__UInteger_maximumConcurrentCompilationTaskCount(const void*, SEL) __asm__("_objc_msgSend$" "maximumConcurrentCompilationTaskCount"); +MTL::StructMember* _MTL_msg_MTL__StructMemberp_memberByName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "memberByName:"); +NS::Array* _MTL_msg_NS__Arrayp_members(const void*, SEL) __asm__("_objc_msgSend$" "members"); +void _MTL_msg_v_memoryBarrierWithResources_count__constMTL__Resourcepconstp_NS__UInteger(const void*, SEL, const MTL::Resource* const *, NS::UInteger) __asm__("_objc_msgSend$" "memoryBarrierWithResources:count:"); +void _MTL_msg_v_memoryBarrierWithResources_count_afterStages_beforeStages__constMTL__Resourcepconstp_NS__UInteger_MTL__RenderStages_MTL__RenderStages(const void*, SEL, const MTL::Resource* const *, NS::UInteger, MTL::RenderStages, MTL::RenderStages) __asm__("_objc_msgSend$" "memoryBarrierWithResources:count:afterStages:beforeStages:"); +void _MTL_msg_v_memoryBarrierWithScope__MTL__BarrierScope(const void*, SEL, MTL::BarrierScope) __asm__("_objc_msgSend$" "memoryBarrierWithScope:"); +void _MTL_msg_v_memoryBarrierWithScope_afterStages_beforeStages__MTL__BarrierScope_MTL__RenderStages_MTL__RenderStages(const void*, SEL, MTL::BarrierScope, MTL::RenderStages, MTL::RenderStages) __asm__("_objc_msgSend$" "memoryBarrierWithScope:afterStages:beforeStages:"); +NS::Array* _MTL_msg_NS__Arrayp_meshBindings(const void*, SEL) __asm__("_objc_msgSend$" "meshBindings"); +MTL::PipelineBufferDescriptorArray* _MTL_msg_MTL__PipelineBufferDescriptorArrayp_meshBuffers(const void*, SEL) __asm__("_objc_msgSend$" "meshBuffers"); +MTL::Function* _MTL_msg_MTL__Functionp_meshFunction(const void*, SEL) __asm__("_objc_msgSend$" "meshFunction"); +MTL::LinkedFunctions* _MTL_msg_MTL__LinkedFunctionsp_meshLinkedFunctions(const void*, SEL) __asm__("_objc_msgSend$" "meshLinkedFunctions"); +NS::UInteger _MTL_msg_NS__UInteger_meshThreadExecutionWidth(const void*, SEL) __asm__("_objc_msgSend$" "meshThreadExecutionWidth"); +bool _MTL_msg_bool_meshThreadgroupSizeIsMultipleOfThreadExecutionWidth(const void*, SEL) __asm__("_objc_msgSend$" "meshThreadgroupSizeIsMultipleOfThreadExecutionWidth"); +MTL::SamplerMinMagFilter _MTL_msg_MTL__SamplerMinMagFilter_minFilter(const void*, SEL) __asm__("_objc_msgSend$" "minFilter"); +NS::UInteger _MTL_msg_NS__UInteger_minimumLinearTextureAlignmentForPixelFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "minimumLinearTextureAlignmentForPixelFormat:"); +NS::UInteger _MTL_msg_NS__UInteger_minimumTextureBufferAlignmentForPixelFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "minimumTextureBufferAlignmentForPixelFormat:"); +MTL::SamplerMipFilter _MTL_msg_MTL__SamplerMipFilter_mipFilter(const void*, SEL) __asm__("_objc_msgSend$" "mipFilter"); +NS::UInteger _MTL_msg_NS__UInteger_mipmapLevelCount(const void*, SEL) __asm__("_objc_msgSend$" "mipmapLevelCount"); +MTL::MotionBorderMode _MTL_msg_MTL__MotionBorderMode_motionEndBorderMode(const void*, SEL) __asm__("_objc_msgSend$" "motionEndBorderMode"); +float _MTL_msg_float_motionEndTime(const void*, SEL) __asm__("_objc_msgSend$" "motionEndTime"); +NS::UInteger _MTL_msg_NS__UInteger_motionKeyframeCount(const void*, SEL) __asm__("_objc_msgSend$" "motionKeyframeCount"); +MTL::MotionBorderMode _MTL_msg_MTL__MotionBorderMode_motionStartBorderMode(const void*, SEL) __asm__("_objc_msgSend$" "motionStartBorderMode"); +float _MTL_msg_float_motionStartTime(const void*, SEL) __asm__("_objc_msgSend$" "motionStartTime"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_motionTransformBuffer(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_motionTransformBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformBufferOffset"); +NS::UInteger _MTL_msg_NS__UInteger_motionTransformCount(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformCount"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_motionTransformCountBuffer(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformCountBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_motionTransformCountBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformCountBufferOffset"); +NS::UInteger _MTL_msg_NS__UInteger_motionTransformStride(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformStride"); +MTL::TransformType _MTL_msg_MTL__TransformType_motionTransformType(const void*, SEL) __asm__("_objc_msgSend$" "motionTransformType"); +void _MTL_msg_v_moveTextureMappingsFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin, MTL::Size, MTL::Texture*, NS::UInteger, NS::UInteger, MTL::Origin) __asm__("_objc_msgSend$" "moveTextureMappingsFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:"); +MTL::Mutability _MTL_msg_MTL__Mutability_mutability(const void*, SEL) __asm__("_objc_msgSend$" "mutability"); +NS::String* _MTL_msg_NS__Stringp_name(const void*, SEL) __asm__("_objc_msgSend$" "name"); +MTL::AccelerationStructure* _MTL_msg_MTL__AccelerationStructurep_newAccelerationStructureWithDescriptor__MTL__AccelerationStructureDescriptorp(const void*, SEL, MTL::AccelerationStructureDescriptor*) __asm__("_objc_msgSend$" "newAccelerationStructureWithDescriptor:"); +MTL::AccelerationStructure* _MTL_msg_MTL__AccelerationStructurep_newAccelerationStructureWithDescriptor_offset__MTL__AccelerationStructureDescriptorp_NS__UInteger(const void*, SEL, MTL::AccelerationStructureDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "newAccelerationStructureWithDescriptor:offset:"); +MTL::AccelerationStructure* _MTL_msg_MTL__AccelerationStructurep_newAccelerationStructureWithSize__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "newAccelerationStructureWithSize:"); +MTL::AccelerationStructure* _MTL_msg_MTL__AccelerationStructurep_newAccelerationStructureWithSize_offset__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "newAccelerationStructureWithSize:offset:"); +MTL4::Archive* _MTL_msg_MTL4__Archivep_newArchiveWithURL_error__NS__URLp_NS__Errorpp(const void*, SEL, NS::URL*, NS::Error**) __asm__("_objc_msgSend$" "newArchiveWithURL:error:"); +MTL::ArgumentEncoder* _MTL_msg_MTL__ArgumentEncoderp_newArgumentEncoderForBufferAtIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "newArgumentEncoderForBufferAtIndex:"); +MTL::ArgumentEncoder* _MTL_msg_MTL__ArgumentEncoderp_newArgumentEncoderWithArguments__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "newArgumentEncoderWithArguments:"); +MTL::ArgumentEncoder* _MTL_msg_MTL__ArgumentEncoderp_newArgumentEncoderWithBufferBinding__MTL__BufferBindingp(const void*, SEL, MTL::BufferBinding*) __asm__("_objc_msgSend$" "newArgumentEncoderWithBufferBinding:"); +MTL::ArgumentEncoder* _MTL_msg_MTL__ArgumentEncoderp_newArgumentEncoderWithBufferIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "newArgumentEncoderWithBufferIndex:"); +MTL::ArgumentEncoder* _MTL_msg_MTL__ArgumentEncoderp_newArgumentEncoderWithBufferIndex_reflection__NS__UInteger_MTL__Argumentpp(const void*, SEL, NS::UInteger, MTL::Argument**) __asm__("_objc_msgSend$" "newArgumentEncoderWithBufferIndex:reflection:"); +MTL4::ArgumentTable* _MTL_msg_MTL4__ArgumentTablep_newArgumentTableWithDescriptor_error__MTL4__ArgumentTableDescriptorp_NS__Errorpp(const void*, SEL, MTL4::ArgumentTableDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newArgumentTableWithDescriptor:error:"); +MTL::BinaryArchive* _MTL_msg_MTL__BinaryArchivep_newBinaryArchiveWithDescriptor_error__MTL__BinaryArchiveDescriptorp_NS__Errorpp(const void*, SEL, MTL::BinaryArchiveDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newBinaryArchiveWithDescriptor:error:"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_newBufferWithBytes_length_options__constvoidp_NS__UInteger_MTL__ResourceOptions(const void*, SEL, const void *, NS::UInteger, MTL::ResourceOptions) __asm__("_objc_msgSend$" "newBufferWithBytes:length:options:"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_newBufferWithBytesNoCopy_length_options_deallocator__voidp_NS__UInteger_MTL__ResourceOptions_MTL__NewBufferBlock(const void*, SEL, void *, NS::UInteger, MTL::ResourceOptions, MTL::NewBufferBlock) __asm__("_objc_msgSend$" "newBufferWithBytesNoCopy:length:options:deallocator:"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_newBufferWithLength_options__NS__UInteger_MTL__ResourceOptions(const void*, SEL, NS::UInteger, MTL::ResourceOptions) __asm__("_objc_msgSend$" "newBufferWithLength:options:"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_newBufferWithLength_options_offset__NS__UInteger_MTL__ResourceOptions_NS__UInteger(const void*, SEL, NS::UInteger, MTL::ResourceOptions, NS::UInteger) __asm__("_objc_msgSend$" "newBufferWithLength:options:offset:"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_newBufferWithLength_options_placementSparsePageSize__NS__UInteger_MTL__ResourceOptions_MTL__SparsePageSize(const void*, SEL, NS::UInteger, MTL::ResourceOptions, MTL::SparsePageSize) __asm__("_objc_msgSend$" "newBufferWithLength:options:placementSparsePageSize:"); +MTL::CaptureScope* _MTL_msg_MTL__CaptureScopep_newCaptureScopeWithCommandQueue__MTL__CommandQueuep(const void*, SEL, MTL::CommandQueue*) __asm__("_objc_msgSend$" "newCaptureScopeWithCommandQueue:"); +MTL::CaptureScope* _MTL_msg_MTL__CaptureScopep_newCaptureScopeWithDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "newCaptureScopeWithDevice:"); +MTL::CaptureScope* _MTL_msg_MTL__CaptureScopep_newCaptureScopeWithMTL4CommandQueue__MTL4__CommandQueuep(const void*, SEL, MTL4::CommandQueue*) __asm__("_objc_msgSend$" "newCaptureScopeWithMTL4CommandQueue:"); +MTL4::CommandAllocator* _MTL_msg_MTL4__CommandAllocatorp_newCommandAllocator(const void*, SEL) __asm__("_objc_msgSend$" "newCommandAllocator"); +MTL4::CommandAllocator* _MTL_msg_MTL4__CommandAllocatorp_newCommandAllocatorWithDescriptor_error__MTL4__CommandAllocatorDescriptorp_NS__Errorpp(const void*, SEL, MTL4::CommandAllocatorDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newCommandAllocatorWithDescriptor:error:"); +MTL4::CommandBuffer* _MTL_msg_MTL4__CommandBufferp_newCommandBuffer(const void*, SEL) __asm__("_objc_msgSend$" "newCommandBuffer"); +MTL::CommandQueue* _MTL_msg_MTL__CommandQueuep_newCommandQueue(const void*, SEL) __asm__("_objc_msgSend$" "newCommandQueue"); +MTL::CommandQueue* _MTL_msg_MTL__CommandQueuep_newCommandQueueWithDescriptor__MTL__CommandQueueDescriptorp(const void*, SEL, MTL::CommandQueueDescriptor*) __asm__("_objc_msgSend$" "newCommandQueueWithDescriptor:"); +MTL::CommandQueue* _MTL_msg_MTL__CommandQueuep_newCommandQueueWithMaxCommandBufferCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "newCommandQueueWithMaxCommandBufferCount:"); +MTL4::Compiler* _MTL_msg_MTL4__Compilerp_newCompilerWithDescriptor_error__MTL4__CompilerDescriptorp_NS__Errorpp(const void*, SEL, MTL4::CompilerDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newCompilerWithDescriptor:error:"); +MTL::ComputePipelineState* _MTL_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithBinaryFunctions_error__NS__Arrayp_NS__Errorpp(const void*, SEL, NS::Array*, NS::Error**) __asm__("_objc_msgSend$" "newComputePipelineStateWithBinaryFunctions:error:"); +void _MTL_msg_v_newComputePipelineStateWithDescriptor_options_completionHandler__MTL__ComputePipelineDescriptorp_MTL__PipelineOption_MTL__NewComputePipelineStateWithReflectionCompletionHandler(const void*, SEL, MTL::ComputePipelineDescriptor*, MTL::PipelineOption, MTL::NewComputePipelineStateWithReflectionCompletionHandler) __asm__("_objc_msgSend$" "newComputePipelineStateWithDescriptor:options:completionHandler:"); +MTL::ComputePipelineState* _MTL_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithDescriptor_options_reflection_error__MTL__ComputePipelineDescriptorp_MTL__PipelineOption_MTL__ComputePipelineReflectionpp_NS__Errorpp(const void*, SEL, MTL::ComputePipelineDescriptor*, MTL::PipelineOption, MTL::ComputePipelineReflection**, NS::Error**) __asm__("_objc_msgSend$" "newComputePipelineStateWithDescriptor:options:reflection:error:"); +void _MTL_msg_v_newComputePipelineStateWithFunction_completionHandler__MTL__Functionp_MTL__NewComputePipelineStateCompletionHandler(const void*, SEL, MTL::Function*, MTL::NewComputePipelineStateCompletionHandler) __asm__("_objc_msgSend$" "newComputePipelineStateWithFunction:completionHandler:"); +MTL::ComputePipelineState* _MTL_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithFunction_error__MTL__Functionp_NS__Errorpp(const void*, SEL, MTL::Function*, NS::Error**) __asm__("_objc_msgSend$" "newComputePipelineStateWithFunction:error:"); +void _MTL_msg_v_newComputePipelineStateWithFunction_options_completionHandler__MTL__Functionp_MTL__PipelineOption_MTL__NewComputePipelineStateWithReflectionCompletionHandler(const void*, SEL, MTL::Function*, MTL::PipelineOption, MTL::NewComputePipelineStateWithReflectionCompletionHandler) __asm__("_objc_msgSend$" "newComputePipelineStateWithFunction:options:completionHandler:"); +MTL::ComputePipelineState* _MTL_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithFunction_options_reflection_error__MTL__Functionp_MTL__PipelineOption_MTL__ComputePipelineReflectionpp_NS__Errorpp(const void*, SEL, MTL::Function*, MTL::PipelineOption, MTL::ComputePipelineReflection**, NS::Error**) __asm__("_objc_msgSend$" "newComputePipelineStateWithFunction:options:reflection:error:"); +MTL4::CounterHeap* _MTL_msg_MTL4__CounterHeapp_newCounterHeapWithDescriptor_error__MTL4__CounterHeapDescriptorp_NS__Errorpp(const void*, SEL, MTL4::CounterHeapDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newCounterHeapWithDescriptor:error:"); +MTL::CounterSampleBuffer* _MTL_msg_MTL__CounterSampleBufferp_newCounterSampleBufferWithDescriptor_error__MTL__CounterSampleBufferDescriptorp_NS__Errorpp(const void*, SEL, MTL::CounterSampleBufferDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newCounterSampleBufferWithDescriptor:error:"); +MTL::Library* _MTL_msg_MTL__Libraryp_newDefaultLibrary(const void*, SEL) __asm__("_objc_msgSend$" "newDefaultLibrary"); +MTL::Library* _MTL_msg_MTL__Libraryp_newDefaultLibraryWithBundle_error__NS__Bundlep_NS__Errorpp(const void*, SEL, NS::Bundle*, NS::Error**) __asm__("_objc_msgSend$" "newDefaultLibraryWithBundle:error:"); +MTL::DepthStencilState* _MTL_msg_MTL__DepthStencilStatep_newDepthStencilStateWithDescriptor__MTL__DepthStencilDescriptorp(const void*, SEL, MTL::DepthStencilDescriptor*) __asm__("_objc_msgSend$" "newDepthStencilStateWithDescriptor:"); +MTL::DynamicLibrary* _MTL_msg_MTL__DynamicLibraryp_newDynamicLibrary_error__MTL__Libraryp_NS__Errorpp(const void*, SEL, MTL::Library*, NS::Error**) __asm__("_objc_msgSend$" "newDynamicLibrary:error:"); +MTL::DynamicLibrary* _MTL_msg_MTL__DynamicLibraryp_newDynamicLibraryWithURL_error__NS__URLp_NS__Errorpp(const void*, SEL, NS::URL*, NS::Error**) __asm__("_objc_msgSend$" "newDynamicLibraryWithURL:error:"); +MTL::Event* _MTL_msg_MTL__Eventp_newEvent(const void*, SEL) __asm__("_objc_msgSend$" "newEvent"); +MTL::Fence* _MTL_msg_MTL__Fencep_newFence(const void*, SEL) __asm__("_objc_msgSend$" "newFence"); +void _MTL_msg_v_newFunctionWithDescriptor_completionHandler__MTL__FunctionDescriptorp_MTL__NewFunctionBlock(const void*, SEL, MTL::FunctionDescriptor*, MTL::NewFunctionBlock) __asm__("_objc_msgSend$" "newFunctionWithDescriptor:completionHandler:"); +MTL::Function* _MTL_msg_MTL__Functionp_newFunctionWithDescriptor_error__MTL__FunctionDescriptorp_NS__Errorpp(const void*, SEL, MTL::FunctionDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newFunctionWithDescriptor:error:"); +MTL::Function* _MTL_msg_MTL__Functionp_newFunctionWithName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "newFunctionWithName:"); +void _MTL_msg_v_newFunctionWithName_constantValues_completionHandler__NS__Stringp_MTL__FunctionConstantValuesp_MTL__NewFunctionBlock(const void*, SEL, NS::String*, MTL::FunctionConstantValues*, MTL::NewFunctionBlock) __asm__("_objc_msgSend$" "newFunctionWithName:constantValues:completionHandler:"); +MTL::Function* _MTL_msg_MTL__Functionp_newFunctionWithName_constantValues_error__NS__Stringp_MTL__FunctionConstantValuesp_NS__Errorpp(const void*, SEL, NS::String*, MTL::FunctionConstantValues*, NS::Error**) __asm__("_objc_msgSend$" "newFunctionWithName:constantValues:error:"); +MTL::Heap* _MTL_msg_MTL__Heapp_newHeapWithDescriptor__MTL__HeapDescriptorp(const void*, SEL, MTL::HeapDescriptor*) __asm__("_objc_msgSend$" "newHeapWithDescriptor:"); +MTL::IOCommandQueue* _MTL_msg_MTL__IOCommandQueuep_newIOCommandQueueWithDescriptor_error__MTL__IOCommandQueueDescriptorp_NS__Errorpp(const void*, SEL, MTL::IOCommandQueueDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newIOCommandQueueWithDescriptor:error:"); +MTL::IOFileHandle* _MTL_msg_MTL__IOFileHandlep_newIOFileHandleWithURL_compressionMethod_error__NS__URLp_MTL__IOCompressionMethod_NS__Errorpp(const void*, SEL, NS::URL*, MTL::IOCompressionMethod, NS::Error**) __asm__("_objc_msgSend$" "newIOFileHandleWithURL:compressionMethod:error:"); +MTL::IOFileHandle* _MTL_msg_MTL__IOFileHandlep_newIOFileHandleWithURL_error__NS__URLp_NS__Errorpp(const void*, SEL, NS::URL*, NS::Error**) __asm__("_objc_msgSend$" "newIOFileHandleWithURL:error:"); +MTL::IOFileHandle* _MTL_msg_MTL__IOFileHandlep_newIOHandleWithURL_compressionMethod_error__NS__URLp_MTL__IOCompressionMethod_NS__Errorpp(const void*, SEL, NS::URL*, MTL::IOCompressionMethod, NS::Error**) __asm__("_objc_msgSend$" "newIOHandleWithURL:compressionMethod:error:"); +MTL::IOFileHandle* _MTL_msg_MTL__IOFileHandlep_newIOHandleWithURL_error__NS__URLp_NS__Errorpp(const void*, SEL, NS::URL*, NS::Error**) __asm__("_objc_msgSend$" "newIOHandleWithURL:error:"); +MTL::IndirectCommandBuffer* _MTL_msg_MTL__IndirectCommandBufferp_newIndirectCommandBufferWithDescriptor_maxCommandCount_options__MTL__IndirectCommandBufferDescriptorp_NS__UInteger_MTL__ResourceOptions(const void*, SEL, MTL::IndirectCommandBufferDescriptor*, NS::UInteger, MTL::ResourceOptions) __asm__("_objc_msgSend$" "newIndirectCommandBufferWithDescriptor:maxCommandCount:options:"); +MTL::IntersectionFunctionTable* _MTL_msg_MTL__IntersectionFunctionTablep_newIntersectionFunctionTableWithDescriptor__MTL__IntersectionFunctionTableDescriptorp(const void*, SEL, MTL::IntersectionFunctionTableDescriptor*) __asm__("_objc_msgSend$" "newIntersectionFunctionTableWithDescriptor:"); +MTL::IntersectionFunctionTable* _MTL_msg_MTL__IntersectionFunctionTablep_newIntersectionFunctionTableWithDescriptor_stage__MTL__IntersectionFunctionTableDescriptorp_MTL__RenderStages(const void*, SEL, MTL::IntersectionFunctionTableDescriptor*, MTL::RenderStages) __asm__("_objc_msgSend$" "newIntersectionFunctionTableWithDescriptor:stage:"); +void _MTL_msg_v_newIntersectionFunctionWithDescriptor_completionHandler__MTL__IntersectionFunctionDescriptorp_MTL__NewFunctionBlock(const void*, SEL, MTL::IntersectionFunctionDescriptor*, MTL::NewFunctionBlock) __asm__("_objc_msgSend$" "newIntersectionFunctionWithDescriptor:completionHandler:"); +MTL::Function* _MTL_msg_MTL__Functionp_newIntersectionFunctionWithDescriptor_error__MTL__IntersectionFunctionDescriptorp_NS__Errorpp(const void*, SEL, MTL::IntersectionFunctionDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newIntersectionFunctionWithDescriptor:error:"); +MTL::Library* _MTL_msg_MTL__Libraryp_newLibraryWithData_error__dispatch_data_t_NS__Errorpp(const void*, SEL, dispatch_data_t, NS::Error**) __asm__("_objc_msgSend$" "newLibraryWithData:error:"); +MTL::Library* _MTL_msg_MTL__Libraryp_newLibraryWithFile_error__NS__Stringp_NS__Errorpp(const void*, SEL, NS::String*, NS::Error**) __asm__("_objc_msgSend$" "newLibraryWithFile:error:"); +void _MTL_msg_v_newLibraryWithSource_options_completionHandler__NS__Stringp_MTL__CompileOptionsp_MTL__NewLibraryCompletionHandler(const void*, SEL, NS::String*, MTL::CompileOptions*, MTL::NewLibraryCompletionHandler) __asm__("_objc_msgSend$" "newLibraryWithSource:options:completionHandler:"); +MTL::Library* _MTL_msg_MTL__Libraryp_newLibraryWithSource_options_error__NS__Stringp_MTL__CompileOptionsp_NS__Errorpp(const void*, SEL, NS::String*, MTL::CompileOptions*, NS::Error**) __asm__("_objc_msgSend$" "newLibraryWithSource:options:error:"); +void _MTL_msg_v_newLibraryWithStitchedDescriptor_completionHandler__MTL__StitchedLibraryDescriptorp_MTL__NewLibraryCompletionHandler(const void*, SEL, MTL::StitchedLibraryDescriptor*, MTL::NewLibraryCompletionHandler) __asm__("_objc_msgSend$" "newLibraryWithStitchedDescriptor:completionHandler:"); +MTL::Library* _MTL_msg_MTL__Libraryp_newLibraryWithStitchedDescriptor_error__MTL__StitchedLibraryDescriptorp_NS__Errorpp(const void*, SEL, MTL::StitchedLibraryDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newLibraryWithStitchedDescriptor:error:"); +MTL::Library* _MTL_msg_MTL__Libraryp_newLibraryWithURL_error__NS__URLp_NS__Errorpp(const void*, SEL, NS::URL*, NS::Error**) __asm__("_objc_msgSend$" "newLibraryWithURL:error:"); +MTL::LogState* _MTL_msg_MTL__LogStatep_newLogStateWithDescriptor_error__MTL__LogStateDescriptorp_NS__Errorpp(const void*, SEL, MTL::LogStateDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newLogStateWithDescriptor:error:"); +MTL4::CommandQueue* _MTL_msg_MTL4__CommandQueuep_newMTL4CommandQueue(const void*, SEL) __asm__("_objc_msgSend$" "newMTL4CommandQueue"); +MTL4::CommandQueue* _MTL_msg_MTL4__CommandQueuep_newMTL4CommandQueueWithDescriptor_error__MTL4__CommandQueueDescriptorp_NS__Errorpp(const void*, SEL, MTL4::CommandQueueDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newMTL4CommandQueueWithDescriptor:error:"); +MTL4::PipelineDataSetSerializer* _MTL_msg_MTL4__PipelineDataSetSerializerp_newPipelineDataSetSerializerWithDescriptor__MTL4__PipelineDataSetSerializerDescriptorp(const void*, SEL, MTL4::PipelineDataSetSerializerDescriptor*) __asm__("_objc_msgSend$" "newPipelineDataSetSerializerWithDescriptor:"); +MTL::RasterizationRateMap* _MTL_msg_MTL__RasterizationRateMapp_newRasterizationRateMapWithDescriptor__MTL__RasterizationRateMapDescriptorp(const void*, SEL, MTL::RasterizationRateMapDescriptor*) __asm__("_objc_msgSend$" "newRasterizationRateMapWithDescriptor:"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_newRemoteBufferViewForDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "newRemoteBufferViewForDevice:"); +MTL::Texture* _MTL_msg_MTL__Texturep_newRemoteTextureViewForDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "newRemoteTextureViewForDevice:"); +MTL4::PipelineDescriptor* _MTL_msg_MTL4__PipelineDescriptorp_newRenderPipelineDescriptorForSpecialization(const void*, SEL) __asm__("_objc_msgSend$" "newRenderPipelineDescriptorForSpecialization"); +MTL::RenderPipelineState* _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithAdditionalBinaryFunctions_error__MTL__RenderPipelineFunctionsDescriptorp_NS__Errorpp(const void*, SEL, MTL::RenderPipelineFunctionsDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateWithAdditionalBinaryFunctions:error:"); +MTL::RenderPipelineState* _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithBinaryFunctions_error__MTL4__RenderPipelineBinaryFunctionsDescriptorp_NS__Errorpp(const void*, SEL, MTL4::RenderPipelineBinaryFunctionsDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateWithBinaryFunctions:error:"); +void _MTL_msg_v_newRenderPipelineStateWithDescriptor_completionHandler__MTL__RenderPipelineDescriptorp_MTL__NewRenderPipelineStateCompletionHandler(const void*, SEL, MTL::RenderPipelineDescriptor*, MTL::NewRenderPipelineStateCompletionHandler) __asm__("_objc_msgSend$" "newRenderPipelineStateWithDescriptor:completionHandler:"); +MTL::RenderPipelineState* _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_error__MTL__RenderPipelineDescriptorp_NS__Errorpp(const void*, SEL, MTL::RenderPipelineDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateWithDescriptor:error:"); +void _MTL_msg_v_newRenderPipelineStateWithDescriptor_options_completionHandler__MTL__RenderPipelineDescriptorp_MTL__PipelineOption_MTL__NewRenderPipelineStateWithReflectionCompletionHandler(const void*, SEL, MTL::RenderPipelineDescriptor*, MTL::PipelineOption, MTL::NewRenderPipelineStateWithReflectionCompletionHandler) __asm__("_objc_msgSend$" "newRenderPipelineStateWithDescriptor:options:completionHandler:"); +MTL::RenderPipelineState* _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_options_reflection_error__MTL__RenderPipelineDescriptorp_MTL__PipelineOption_MTL__RenderPipelineReflectionpp_NS__Errorpp(const void*, SEL, MTL::RenderPipelineDescriptor*, MTL::PipelineOption, MTL::RenderPipelineReflection**, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateWithDescriptor:options:reflection:error:"); +void _MTL_msg_v_newRenderPipelineStateWithMeshDescriptor_options_completionHandler__MTL__MeshRenderPipelineDescriptorp_MTL__PipelineOption_MTL__NewRenderPipelineStateWithReflectionCompletionHandler(const void*, SEL, MTL::MeshRenderPipelineDescriptor*, MTL::PipelineOption, MTL::NewRenderPipelineStateWithReflectionCompletionHandler) __asm__("_objc_msgSend$" "newRenderPipelineStateWithMeshDescriptor:options:completionHandler:"); +MTL::RenderPipelineState* _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithMeshDescriptor_options_reflection_error__MTL__MeshRenderPipelineDescriptorp_MTL__PipelineOption_MTL__RenderPipelineReflectionpp_NS__Errorpp(const void*, SEL, MTL::MeshRenderPipelineDescriptor*, MTL::PipelineOption, MTL::RenderPipelineReflection**, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateWithMeshDescriptor:options:reflection:error:"); +void _MTL_msg_v_newRenderPipelineStateWithTileDescriptor_options_completionHandler__MTL__TileRenderPipelineDescriptorp_MTL__PipelineOption_MTL__NewRenderPipelineStateWithReflectionCompletionHandler(const void*, SEL, MTL::TileRenderPipelineDescriptor*, MTL::PipelineOption, MTL::NewRenderPipelineStateWithReflectionCompletionHandler) __asm__("_objc_msgSend$" "newRenderPipelineStateWithTileDescriptor:options:completionHandler:"); +MTL::RenderPipelineState* _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithTileDescriptor_options_reflection_error__MTL__TileRenderPipelineDescriptorp_MTL__PipelineOption_MTL__RenderPipelineReflectionpp_NS__Errorpp(const void*, SEL, MTL::TileRenderPipelineDescriptor*, MTL::PipelineOption, MTL::RenderPipelineReflection**, NS::Error**) __asm__("_objc_msgSend$" "newRenderPipelineStateWithTileDescriptor:options:reflection:error:"); +MTL::ResidencySet* _MTL_msg_MTL__ResidencySetp_newResidencySetWithDescriptor_error__MTL__ResidencySetDescriptorp_NS__Errorpp(const void*, SEL, MTL::ResidencySetDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newResidencySetWithDescriptor:error:"); +MTL::SamplerState* _MTL_msg_MTL__SamplerStatep_newSamplerStateWithDescriptor__MTL__SamplerDescriptorp(const void*, SEL, MTL::SamplerDescriptor*) __asm__("_objc_msgSend$" "newSamplerStateWithDescriptor:"); +MTL::IOScratchBuffer* _MTL_msg_MTL__IOScratchBufferp_newScratchBufferWithMinimumSize__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "newScratchBufferWithMinimumSize:"); +MTL::SharedEvent* _MTL_msg_MTL__SharedEventp_newSharedEvent(const void*, SEL) __asm__("_objc_msgSend$" "newSharedEvent"); +MTL::SharedEventHandle* _MTL_msg_MTL__SharedEventHandlep_newSharedEventHandle(const void*, SEL) __asm__("_objc_msgSend$" "newSharedEventHandle"); +MTL::SharedEvent* _MTL_msg_MTL__SharedEventp_newSharedEventWithHandle__MTL__SharedEventHandlep(const void*, SEL, MTL::SharedEventHandle*) __asm__("_objc_msgSend$" "newSharedEventWithHandle:"); +MTL::SharedTextureHandle* _MTL_msg_MTL__SharedTextureHandlep_newSharedTextureHandle(const void*, SEL) __asm__("_objc_msgSend$" "newSharedTextureHandle"); +MTL::Texture* _MTL_msg_MTL__Texturep_newSharedTextureWithDescriptor__MTL__TextureDescriptorp(const void*, SEL, MTL::TextureDescriptor*) __asm__("_objc_msgSend$" "newSharedTextureWithDescriptor:"); +MTL::Texture* _MTL_msg_MTL__Texturep_newSharedTextureWithHandle__MTL__SharedTextureHandlep(const void*, SEL, MTL::SharedTextureHandle*) __asm__("_objc_msgSend$" "newSharedTextureWithHandle:"); +MTL::Tensor* _MTL_msg_MTL__Tensorp_newTensorWithDescriptor_error__MTL__TensorDescriptorp_NS__Errorpp(const void*, SEL, MTL::TensorDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newTensorWithDescriptor:error:"); +MTL::Tensor* _MTL_msg_MTL__Tensorp_newTensorWithDescriptor_offset_error__MTL__TensorDescriptorp_NS__UInteger_NS__Errorpp(const void*, SEL, MTL::TensorDescriptor*, NS::UInteger, NS::Error**) __asm__("_objc_msgSend$" "newTensorWithDescriptor:offset:error:"); +MTL::TextureViewPool* _MTL_msg_MTL__TextureViewPoolp_newTextureViewPoolWithDescriptor_error__MTL__ResourceViewPoolDescriptorp_NS__Errorpp(const void*, SEL, MTL::ResourceViewPoolDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "newTextureViewPoolWithDescriptor:error:"); +MTL::Texture* _MTL_msg_MTL__Texturep_newTextureViewWithDescriptor__MTL__TextureViewDescriptorp(const void*, SEL, MTL::TextureViewDescriptor*) __asm__("_objc_msgSend$" "newTextureViewWithDescriptor:"); +MTL::Texture* _MTL_msg_MTL__Texturep_newTextureViewWithPixelFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "newTextureViewWithPixelFormat:"); +MTL::Texture* _MTL_msg_MTL__Texturep_newTextureViewWithPixelFormat_textureType_levels_slices__MTL__PixelFormat_MTL__TextureType_NS__Range_NS__Range(const void*, SEL, MTL::PixelFormat, MTL::TextureType, NS::Range, NS::Range) __asm__("_objc_msgSend$" "newTextureViewWithPixelFormat:textureType:levels:slices:"); +MTL::Texture* _MTL_msg_MTL__Texturep_newTextureViewWithPixelFormat_textureType_levels_slices_swizzle__MTL__PixelFormat_MTL__TextureType_NS__Range_NS__Range_MTL__TextureSwizzleChannels(const void*, SEL, MTL::PixelFormat, MTL::TextureType, NS::Range, NS::Range, MTL::TextureSwizzleChannels) __asm__("_objc_msgSend$" "newTextureViewWithPixelFormat:textureType:levels:slices:swizzle:"); +MTL::Texture* _MTL_msg_MTL__Texturep_newTextureWithDescriptor__MTL__TextureDescriptorp(const void*, SEL, MTL::TextureDescriptor*) __asm__("_objc_msgSend$" "newTextureWithDescriptor:"); +MTL::Texture* _MTL_msg_MTL__Texturep_newTextureWithDescriptor_iosurface_plane__MTL__TextureDescriptorp_IOSurfaceRef_NS__UInteger(const void*, SEL, MTL::TextureDescriptor*, IOSurfaceRef, NS::UInteger) __asm__("_objc_msgSend$" "newTextureWithDescriptor:iosurface:plane:"); +MTL::Texture* _MTL_msg_MTL__Texturep_newTextureWithDescriptor_offset__MTL__TextureDescriptorp_NS__UInteger(const void*, SEL, MTL::TextureDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "newTextureWithDescriptor:offset:"); +MTL::Texture* _MTL_msg_MTL__Texturep_newTextureWithDescriptor_offset_bytesPerRow__MTL__TextureDescriptorp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::TextureDescriptor*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "newTextureWithDescriptor:offset:bytesPerRow:"); +MTL::VisibleFunctionTable* _MTL_msg_MTL__VisibleFunctionTablep_newVisibleFunctionTableWithDescriptor__MTL__VisibleFunctionTableDescriptorp(const void*, SEL, MTL::VisibleFunctionTableDescriptor*) __asm__("_objc_msgSend$" "newVisibleFunctionTableWithDescriptor:"); +MTL::VisibleFunctionTable* _MTL_msg_MTL__VisibleFunctionTablep_newVisibleFunctionTableWithDescriptor_stage__MTL__VisibleFunctionTableDescriptorp_MTL__RenderStages(const void*, SEL, MTL::VisibleFunctionTableDescriptor*, MTL::RenderStages) __asm__("_objc_msgSend$" "newVisibleFunctionTableWithDescriptor:stage:"); +NS::Array* _MTL_msg_NS__Arrayp_nodes(const void*, SEL) __asm__("_objc_msgSend$" "nodes"); +bool _MTL_msg_bool_normalizedCoordinates(const void*, SEL) __asm__("_objc_msgSend$" "normalizedCoordinates"); +void _MTL_msg_v_notifyListener_atValue_block__MTL__SharedEventListenerp_uint64_t_MTL__SharedEventNotificationBlock(const void*, SEL, MTL::SharedEventListener*, uint64_t, MTL::SharedEventNotificationBlock) __asm__("_objc_msgSend$" "notifyListener:atValue:block:"); +MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::AttributeDescriptor* _MTL_msg_MTL__AttributeDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::BlitPassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::BufferLayoutDescriptor* _MTL_msg_MTL__BufferLayoutDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::ComputePassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::PipelineBufferDescriptor* _MTL_msg_MTL__PipelineBufferDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::RasterizationRateLayerDescriptor* _MTL_msg_MTL__RasterizationRateLayerDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::RenderPassColorAttachmentDescriptor* _MTL_msg_MTL__RenderPassColorAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::RenderPassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::RenderPipelineColorAttachmentDescriptor* _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::ResourceStatePassSampleBufferAttachmentDescriptor* _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::TileRenderPipelineColorAttachmentDescriptor* _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::VertexAttributeDescriptor* _MTL_msg_MTL__VertexAttributeDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +MTL::VertexBufferLayoutDescriptor* _MTL_msg_MTL__VertexBufferLayoutDescriptorp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +NS::Number* _MTL_msg_NS__Numberp_objectAtIndexedSubscript__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "objectAtIndexedSubscript:"); +NS::Array* _MTL_msg_NS__Arrayp_objectBindings(const void*, SEL) __asm__("_objc_msgSend$" "objectBindings"); +MTL::PipelineBufferDescriptorArray* _MTL_msg_MTL__PipelineBufferDescriptorArrayp_objectBuffers(const void*, SEL) __asm__("_objc_msgSend$" "objectBuffers"); +MTL::Function* _MTL_msg_MTL__Functionp_objectFunction(const void*, SEL) __asm__("_objc_msgSend$" "objectFunction"); +MTL::LinkedFunctions* _MTL_msg_MTL__LinkedFunctionsp_objectLinkedFunctions(const void*, SEL) __asm__("_objc_msgSend$" "objectLinkedFunctions"); +NS::UInteger _MTL_msg_NS__UInteger_objectPayloadAlignment(const void*, SEL) __asm__("_objc_msgSend$" "objectPayloadAlignment"); +NS::UInteger _MTL_msg_NS__UInteger_objectPayloadDataSize(const void*, SEL) __asm__("_objc_msgSend$" "objectPayloadDataSize"); +NS::UInteger _MTL_msg_NS__UInteger_objectThreadExecutionWidth(const void*, SEL) __asm__("_objc_msgSend$" "objectThreadExecutionWidth"); +bool _MTL_msg_bool_objectThreadgroupSizeIsMultipleOfThreadExecutionWidth(const void*, SEL) __asm__("_objc_msgSend$" "objectThreadgroupSizeIsMultipleOfThreadExecutionWidth"); +NS::UInteger _MTL_msg_NS__UInteger_offset(const void*, SEL) __asm__("_objc_msgSend$" "offset"); +bool _MTL_msg_bool_opaque(const void*, SEL) __asm__("_objc_msgSend$" "opaque"); +MTL::LibraryOptimizationLevel _MTL_msg_MTL__LibraryOptimizationLevel_optimizationLevel(const void*, SEL) __asm__("_objc_msgSend$" "optimizationLevel"); +void _MTL_msg_v_optimizeContentsForGPUAccess__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "optimizeContentsForGPUAccess:"); +void _MTL_msg_v_optimizeContentsForGPUAccess_slice_level__MTL__Texturep_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "optimizeContentsForGPUAccess:slice:level:"); +void _MTL_msg_v_optimizeIndirectCommandBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range(const void*, SEL, MTL::IndirectCommandBuffer*, NS::Range) __asm__("_objc_msgSend$" "optimizeIndirectCommandBuffer:withRange:"); +MTL::FunctionOptions _MTL_msg_MTL__FunctionOptions_options(const void*, SEL) __asm__("_objc_msgSend$" "options"); +MTL::StitchedLibraryOptions _MTL_msg_MTL__StitchedLibraryOptions_options(const void*, SEL) __asm__("_objc_msgSend$" "options"); +MTL::FunctionStitchingFunctionNode* _MTL_msg_MTL__FunctionStitchingFunctionNodep_outputNode(const void*, SEL) __asm__("_objc_msgSend$" "outputNode"); +NS::URL* _MTL_msg_NS__URLp_outputURL(const void*, SEL) __asm__("_objc_msgSend$" "outputURL"); +MTL::ParallelRenderCommandEncoder* _MTL_msg_MTL__ParallelRenderCommandEncoderp_parallelRenderCommandEncoderWithDescriptor__MTL__RenderPassDescriptorp(const void*, SEL, MTL::RenderPassDescriptor*) __asm__("_objc_msgSend$" "parallelRenderCommandEncoderWithDescriptor:"); +MTL::SizeAndAlign _MTL_msg_MTL__SizeAndAlign_parameterBufferSizeAndAlign(const void*, SEL) __asm__("_objc_msgSend$" "parameterBufferSizeAndAlign"); +NS::UInteger _MTL_msg_NS__UInteger_parentRelativeLevel(const void*, SEL) __asm__("_objc_msgSend$" "parentRelativeLevel"); +NS::UInteger _MTL_msg_NS__UInteger_parentRelativeSlice(const void*, SEL) __asm__("_objc_msgSend$" "parentRelativeSlice"); +MTL::Texture* _MTL_msg_MTL__Texturep_parentTexture(const void*, SEL) __asm__("_objc_msgSend$" "parentTexture"); +NS::Integer _MTL_msg_NS__Integer_patchControlPointCount(const void*, SEL) __asm__("_objc_msgSend$" "patchControlPointCount"); +bool _MTL_msg_bool_patchControlPointData(const void*, SEL) __asm__("_objc_msgSend$" "patchControlPointData"); +bool _MTL_msg_bool_patchData(const void*, SEL) __asm__("_objc_msgSend$" "patchData"); +MTL::PatchType _MTL_msg_MTL__PatchType_patchType(const void*, SEL) __asm__("_objc_msgSend$" "patchType"); +NS::UInteger _MTL_msg_NS__UInteger_payloadMemoryLength(const void*, SEL) __asm__("_objc_msgSend$" "payloadMemoryLength"); +uint32_t _MTL_msg_uint32_t_peerCount(const void*, SEL) __asm__("_objc_msgSend$" "peerCount"); +uint64_t _MTL_msg_uint64_t_peerGroupID(const void*, SEL) __asm__("_objc_msgSend$" "peerGroupID"); +uint32_t _MTL_msg_uint32_t_peerIndex(const void*, SEL) __asm__("_objc_msgSend$" "peerIndex"); +MTL::Size _MTL_msg_MTL__Size_physicalGranularity(const void*, SEL) __asm__("_objc_msgSend$" "physicalGranularity"); +MTL::Size _MTL_msg_MTL__Size_physicalSizeForLayer__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "physicalSizeForLayer:"); +MTL::PixelFormat _MTL_msg_MTL__PixelFormat_pixelFormat(const void*, SEL) __asm__("_objc_msgSend$" "pixelFormat"); +MTL::SparsePageSize _MTL_msg_MTL__SparsePageSize_placementSparsePageSize(const void*, SEL) __asm__("_objc_msgSend$" "placementSparsePageSize"); +MTL::PointerType* _MTL_msg_MTL__PointerTypep_pointerType(const void*, SEL) __asm__("_objc_msgSend$" "pointerType"); +void _MTL_msg_v_popDebugGroup(const void*, SEL) __asm__("_objc_msgSend$" "popDebugGroup"); +NS::Array* _MTL_msg_NS__Arrayp_preloadedLibraries(const void*, SEL) __asm__("_objc_msgSend$" "preloadedLibraries"); +NS::Dictionary* _MTL_msg_NS__Dictionaryp_preprocessorMacros(const void*, SEL) __asm__("_objc_msgSend$" "preprocessorMacros"); +void _MTL_msg_v_present(const void*, SEL) __asm__("_objc_msgSend$" "present"); +void _MTL_msg_v_presentAfterMinimumDuration__CFTimeInterval(const void*, SEL, CFTimeInterval) __asm__("_objc_msgSend$" "presentAfterMinimumDuration:"); +void _MTL_msg_v_presentAtTime__CFTimeInterval(const void*, SEL, CFTimeInterval) __asm__("_objc_msgSend$" "presentAtTime:"); +void _MTL_msg_v_presentDrawable__MTL__Drawablep(const void*, SEL, MTL::Drawable*) __asm__("_objc_msgSend$" "presentDrawable:"); +void _MTL_msg_v_presentDrawable_afterMinimumDuration__MTL__Drawablep_CFTimeInterval(const void*, SEL, MTL::Drawable*, CFTimeInterval) __asm__("_objc_msgSend$" "presentDrawable:afterMinimumDuration:"); +void _MTL_msg_v_presentDrawable_atTime__MTL__Drawablep_CFTimeInterval(const void*, SEL, MTL::Drawable*, CFTimeInterval) __asm__("_objc_msgSend$" "presentDrawable:atTime:"); +CFTimeInterval _MTL_msg_CFTimeInterval_presentedTime(const void*, SEL) __asm__("_objc_msgSend$" "presentedTime"); +bool _MTL_msg_bool_preserveInvariance(const void*, SEL) __asm__("_objc_msgSend$" "preserveInvariance"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_primitiveDataBuffer(const void*, SEL) __asm__("_objc_msgSend$" "primitiveDataBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_primitiveDataBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "primitiveDataBufferOffset"); +NS::UInteger _MTL_msg_NS__UInteger_primitiveDataElementSize(const void*, SEL) __asm__("_objc_msgSend$" "primitiveDataElementSize"); +NS::UInteger _MTL_msg_NS__UInteger_primitiveDataStride(const void*, SEL) __asm__("_objc_msgSend$" "primitiveDataStride"); +MTL::IOPriority _MTL_msg_MTL__IOPriority_priority(const void*, SEL) __asm__("_objc_msgSend$" "priority"); +NS::Array* _MTL_msg_NS__Arrayp_privateFunctions(const void*, SEL) __asm__("_objc_msgSend$" "privateFunctions"); +void _MTL_msg_v_pushDebugGroup__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "pushDebugGroup:"); +uint64_t _MTL_msg_uint64_t_queryTimestampFrequency(const void*, SEL) __asm__("_objc_msgSend$" "queryTimestampFrequency"); +MTL::SamplerAddressMode _MTL_msg_MTL__SamplerAddressMode_rAddressMode(const void*, SEL) __asm__("_objc_msgSend$" "rAddressMode"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_radiusBuffer(const void*, SEL) __asm__("_objc_msgSend$" "radiusBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_radiusBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "radiusBufferOffset"); +NS::Array* _MTL_msg_NS__Arrayp_radiusBuffers(const void*, SEL) __asm__("_objc_msgSend$" "radiusBuffers"); +MTL::AttributeFormat _MTL_msg_MTL__AttributeFormat_radiusFormat(const void*, SEL) __asm__("_objc_msgSend$" "radiusFormat"); +NS::UInteger _MTL_msg_NS__UInteger_radiusStride(const void*, SEL) __asm__("_objc_msgSend$" "radiusStride"); +NS::UInteger _MTL_msg_NS__UInteger_rank(const void*, SEL) __asm__("_objc_msgSend$" "rank"); +NS::UInteger _MTL_msg_NS__UInteger_rasterSampleCount(const void*, SEL) __asm__("_objc_msgSend$" "rasterSampleCount"); +bool _MTL_msg_bool_rasterizationEnabled(const void*, SEL) __asm__("_objc_msgSend$" "rasterizationEnabled"); +MTL::RasterizationRateMap* _MTL_msg_MTL__RasterizationRateMapp_rasterizationRateMap(const void*, SEL) __asm__("_objc_msgSend$" "rasterizationRateMap"); +MTL::RasterizationRateMapDescriptor* _MTL_msg_MTL__RasterizationRateMapDescriptorp_rasterizationRateMapDescriptorWithScreenSize__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "rasterizationRateMapDescriptorWithScreenSize:"); +MTL::RasterizationRateMapDescriptor* _MTL_msg_MTL__RasterizationRateMapDescriptorp_rasterizationRateMapDescriptorWithScreenSize_layer__MTL__Size_MTL__RasterizationRateLayerDescriptorp(const void*, SEL, MTL::Size, MTL::RasterizationRateLayerDescriptor*) __asm__("_objc_msgSend$" "rasterizationRateMapDescriptorWithScreenSize:layer:"); +MTL::RasterizationRateMapDescriptor* _MTL_msg_MTL__RasterizationRateMapDescriptorp_rasterizationRateMapDescriptorWithScreenSize_layerCount_layers__MTL__Size_NS__UInteger_constMTL__RasterizationRateLayerDescriptorpconstp(const void*, SEL, MTL::Size, NS::UInteger, const MTL::RasterizationRateLayerDescriptor* const *) __asm__("_objc_msgSend$" "rasterizationRateMapDescriptorWithScreenSize:layerCount:layers:"); +uint32_t _MTL_msg_uint32_t_readMask(const void*, SEL) __asm__("_objc_msgSend$" "readMask"); +MTL::ReadWriteTextureTier _MTL_msg_MTL__ReadWriteTextureTier_readWriteTextureSupport(const void*, SEL) __asm__("_objc_msgSend$" "readWriteTextureSupport"); +uint64_t _MTL_msg_uint64_t_recommendedMaxWorkingSetSize(const void*, SEL) __asm__("_objc_msgSend$" "recommendedMaxWorkingSetSize"); +MTL::SamplerReductionMode _MTL_msg_MTL__SamplerReductionMode_reductionMode(const void*, SEL) __asm__("_objc_msgSend$" "reductionMode"); +void _MTL_msg_v_refitAccelerationStructure_descriptor_destination_scratchBuffer_scratchBufferOffset__MTL__AccelerationStructurep_MTL__AccelerationStructureDescriptorp_MTL__AccelerationStructurep_MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::AccelerationStructure*, MTL::AccelerationStructureDescriptor*, MTL::AccelerationStructure*, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "refitAccelerationStructure:descriptor:destination:scratchBuffer:scratchBufferOffset:"); +void _MTL_msg_v_refitAccelerationStructure_descriptor_destination_scratchBuffer_scratchBufferOffset_options__MTL__AccelerationStructurep_MTL__AccelerationStructureDescriptorp_MTL__AccelerationStructurep_MTL__Bufferp_NS__UInteger_MTL__AccelerationStructureRefitOptions(const void*, SEL, MTL::AccelerationStructure*, MTL::AccelerationStructureDescriptor*, MTL::AccelerationStructure*, MTL::Buffer*, NS::UInteger, MTL::AccelerationStructureRefitOptions) __asm__("_objc_msgSend$" "refitAccelerationStructure:descriptor:destination:scratchBuffer:scratchBufferOffset:options:"); +MTL::ComputePipelineReflection* _MTL_msg_MTL__ComputePipelineReflectionp_reflection(const void*, SEL) __asm__("_objc_msgSend$" "reflection"); +MTL::RenderPipelineReflection* _MTL_msg_MTL__RenderPipelineReflectionp_reflection(const void*, SEL) __asm__("_objc_msgSend$" "reflection"); +MTL::FunctionReflection* _MTL_msg_MTL__FunctionReflectionp_reflectionForFunctionWithName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "reflectionForFunctionWithName:"); +uint64_t _MTL_msg_uint64_t_registryID(const void*, SEL) __asm__("_objc_msgSend$" "registryID"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_remoteStorageBuffer(const void*, SEL) __asm__("_objc_msgSend$" "remoteStorageBuffer"); +MTL::Texture* _MTL_msg_MTL__Texturep_remoteStorageTexture(const void*, SEL) __asm__("_objc_msgSend$" "remoteStorageTexture"); +bool _MTL_msg_bool_removable(const void*, SEL) __asm__("_objc_msgSend$" "removable"); +void _MTL_msg_v_removeAllAllocations(const void*, SEL) __asm__("_objc_msgSend$" "removeAllAllocations"); +void _MTL_msg_v_removeAllDebugMarkers(const void*, SEL) __asm__("_objc_msgSend$" "removeAllDebugMarkers"); +void _MTL_msg_v_removeAllocation__MTL__Allocationp(const void*, SEL, MTL::Allocation*) __asm__("_objc_msgSend$" "removeAllocation:"); +void _MTL_msg_v_removeAllocations_count__constMTL__Allocationpconstp_NS__UInteger(const void*, SEL, const MTL::Allocation* const *, NS::UInteger) __asm__("_objc_msgSend$" "removeAllocations:count:"); +void _MTL_msg_v_removeResidencySet__MTL__ResidencySetp(const void*, SEL, MTL::ResidencySet*) __asm__("_objc_msgSend$" "removeResidencySet:"); +void _MTL_msg_v_removeResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger(const void*, SEL, const MTL::ResidencySet* const *, NS::UInteger) __asm__("_objc_msgSend$" "removeResidencySets:count:"); +MTL::RenderCommandEncoder* _MTL_msg_MTL__RenderCommandEncoderp_renderCommandEncoder(const void*, SEL) __asm__("_objc_msgSend$" "renderCommandEncoder"); +MTL::RenderCommandEncoder* _MTL_msg_MTL__RenderCommandEncoderp_renderCommandEncoderWithDescriptor__MTL__RenderPassDescriptorp(const void*, SEL, MTL::RenderPassDescriptor*) __asm__("_objc_msgSend$" "renderCommandEncoderWithDescriptor:"); +MTL::RenderPassDescriptor* _MTL_msg_MTL__RenderPassDescriptorp_renderPassDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "renderPassDescriptor"); +NS::UInteger _MTL_msg_NS__UInteger_renderTargetArrayLength(const void*, SEL) __asm__("_objc_msgSend$" "renderTargetArrayLength"); +NS::UInteger _MTL_msg_NS__UInteger_renderTargetHeight(const void*, SEL) __asm__("_objc_msgSend$" "renderTargetHeight"); +NS::UInteger _MTL_msg_NS__UInteger_renderTargetWidth(const void*, SEL) __asm__("_objc_msgSend$" "renderTargetWidth"); +void _MTL_msg_v_replaceRegion_mipmapLevel_slice_withBytes_bytesPerRow_bytesPerImage__MTL__Region_NS__UInteger_NS__UInteger_constvoidp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Region, NS::UInteger, NS::UInteger, const void *, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "replaceRegion:mipmapLevel:slice:withBytes:bytesPerRow:bytesPerImage:"); +void _MTL_msg_v_replaceRegion_mipmapLevel_withBytes_bytesPerRow__MTL__Region_NS__UInteger_constvoidp_NS__UInteger(const void*, SEL, MTL::Region, NS::UInteger, const void *, NS::UInteger) __asm__("_objc_msgSend$" "replaceRegion:mipmapLevel:withBytes:bytesPerRow:"); +void _MTL_msg_v_replaceSliceOrigin_sliceDimensions_withBytes_strides__MTL__TensorExtentsp_MTL__TensorExtentsp_constvoidp_MTL__TensorExtentsp(const void*, SEL, MTL::TensorExtents*, MTL::TensorExtents*, const void *, MTL::TensorExtents*) __asm__("_objc_msgSend$" "replaceSliceOrigin:sliceDimensions:withBytes:strides:"); +void _MTL_msg_v_requestResidency(const void*, SEL) __asm__("_objc_msgSend$" "requestResidency"); +bool _MTL_msg_bool_required(const void*, SEL) __asm__("_objc_msgSend$" "required"); +MTL::Size _MTL_msg_MTL__Size_requiredThreadsPerMeshThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "requiredThreadsPerMeshThreadgroup"); +MTL::Size _MTL_msg_MTL__Size_requiredThreadsPerObjectThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "requiredThreadsPerObjectThreadgroup"); +MTL::Size _MTL_msg_MTL__Size_requiredThreadsPerThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "requiredThreadsPerThreadgroup"); +MTL::Size _MTL_msg_MTL__Size_requiredThreadsPerTileThreadgroup(const void*, SEL) __asm__("_objc_msgSend$" "requiredThreadsPerTileThreadgroup"); +void _MTL_msg_v_reset(const void*, SEL) __asm__("_objc_msgSend$" "reset"); +void _MTL_msg_v_resetCommandsInBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range(const void*, SEL, MTL::IndirectCommandBuffer*, NS::Range) __asm__("_objc_msgSend$" "resetCommandsInBuffer:withRange:"); +void _MTL_msg_v_resetTextureAccessCounters_region_mipLevel_slice__MTL__Texturep_MTL__Region_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Texture*, MTL::Region, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "resetTextureAccessCounters:region:mipLevel:slice:"); +void _MTL_msg_v_resetWithRange__NS__Range(const void*, SEL, NS::Range) __asm__("_objc_msgSend$" "resetWithRange:"); +NS::Data* _MTL_msg_NS__Datap_resolveCounterRange__NS__Range(const void*, SEL, NS::Range) __asm__("_objc_msgSend$" "resolveCounterRange:"); +void _MTL_msg_v_resolveCounters_inRange_destinationBuffer_destinationOffset__MTL__CounterSampleBufferp_NS__Range_MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::CounterSampleBuffer*, NS::Range, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "resolveCounters:inRange:destinationBuffer:destinationOffset:"); +NS::UInteger _MTL_msg_NS__UInteger_resolveDepthPlane(const void*, SEL) __asm__("_objc_msgSend$" "resolveDepthPlane"); +NS::UInteger _MTL_msg_NS__UInteger_resolveLevel(const void*, SEL) __asm__("_objc_msgSend$" "resolveLevel"); +NS::UInteger _MTL_msg_NS__UInteger_resolveSlice(const void*, SEL) __asm__("_objc_msgSend$" "resolveSlice"); +MTL::Texture* _MTL_msg_MTL__Texturep_resolveTexture(const void*, SEL) __asm__("_objc_msgSend$" "resolveTexture"); +MTL::ResourceOptions _MTL_msg_MTL__ResourceOptions_resourceOptions(const void*, SEL) __asm__("_objc_msgSend$" "resourceOptions"); +MTL::ResourceStateCommandEncoder* _MTL_msg_MTL__ResourceStateCommandEncoderp_resourceStateCommandEncoder(const void*, SEL) __asm__("_objc_msgSend$" "resourceStateCommandEncoder"); +MTL::ResourceStateCommandEncoder* _MTL_msg_MTL__ResourceStateCommandEncoderp_resourceStateCommandEncoderWithDescriptor__MTL__ResourceStatePassDescriptorp(const void*, SEL, MTL::ResourceStatePassDescriptor*) __asm__("_objc_msgSend$" "resourceStateCommandEncoderWithDescriptor:"); +MTL::ResourceStatePassDescriptor* _MTL_msg_MTL__ResourceStatePassDescriptorp_resourceStatePassDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "resourceStatePassDescriptor"); +NS::UInteger _MTL_msg_NS__UInteger_resourceViewCount(const void*, SEL) __asm__("_objc_msgSend$" "resourceViewCount"); +bool _MTL_msg_bool_retainedReferences(const void*, SEL) __asm__("_objc_msgSend$" "retainedReferences"); +MTL::BlendOperation _MTL_msg_MTL__BlendOperation_rgbBlendOperation(const void*, SEL) __asm__("_objc_msgSend$" "rgbBlendOperation"); +MTL::Resource* _MTL_msg_MTL__Resourcep_rootResource(const void*, SEL) __asm__("_objc_msgSend$" "rootResource"); +MTL::SamplerAddressMode _MTL_msg_MTL__SamplerAddressMode_sAddressMode(const void*, SEL) __asm__("_objc_msgSend$" "sAddressMode"); +MTL::CounterSampleBuffer* _MTL_msg_MTL__CounterSampleBufferp_sampleBuffer(const void*, SEL) __asm__("_objc_msgSend$" "sampleBuffer"); +MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorArrayp_sampleBufferAttachments(const void*, SEL) __asm__("_objc_msgSend$" "sampleBufferAttachments"); +MTL::BlitPassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__BlitPassSampleBufferAttachmentDescriptorArrayp_sampleBufferAttachments(const void*, SEL) __asm__("_objc_msgSend$" "sampleBufferAttachments"); +MTL::ComputePassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorArrayp_sampleBufferAttachments(const void*, SEL) __asm__("_objc_msgSend$" "sampleBufferAttachments"); +MTL::RenderPassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorArrayp_sampleBufferAttachments(const void*, SEL) __asm__("_objc_msgSend$" "sampleBufferAttachments"); +MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorArrayp_sampleBufferAttachments(const void*, SEL) __asm__("_objc_msgSend$" "sampleBufferAttachments"); +MTL::Size _MTL_msg_MTL__Size_sampleCount(const void*, SEL) __asm__("_objc_msgSend$" "sampleCount"); +NS::UInteger _MTL_msg_NS__UInteger_sampleCount(const void*, SEL) __asm__("_objc_msgSend$" "sampleCount"); +void _MTL_msg_v_sampleCountersInBuffer_atSampleIndex_withBarrier__MTL__CounterSampleBufferp_NS__UInteger_bool(const void*, SEL, MTL::CounterSampleBuffer*, NS::UInteger, bool) __asm__("_objc_msgSend$" "sampleCountersInBuffer:atSampleIndex:withBarrier:"); +void _MTL_msg_v_sampleTimestamps_gpuTimestamp__uint64_tp_uint64_tp(const void*, SEL, uint64_t*, uint64_t*) __asm__("_objc_msgSend$" "sampleTimestamps:gpuTimestamp:"); +MTL::IOScratchBufferAllocator* _MTL_msg_MTL__IOScratchBufferAllocatorp_scratchBufferAllocator(const void*, SEL) __asm__("_objc_msgSend$" "scratchBufferAllocator"); +MTL::Size _MTL_msg_MTL__Size_screenSize(const void*, SEL) __asm__("_objc_msgSend$" "screenSize"); +NS::UInteger _MTL_msg_NS__UInteger_segmentControlPointCount(const void*, SEL) __asm__("_objc_msgSend$" "segmentControlPointCount"); +NS::UInteger _MTL_msg_NS__UInteger_segmentCount(const void*, SEL) __asm__("_objc_msgSend$" "segmentCount"); +bool _MTL_msg_bool_serializeToURL_error__NS__URLp_NS__Errorpp(const void*, SEL, NS::URL*, NS::Error**) __asm__("_objc_msgSend$" "serializeToURL:error:"); +void _MTL_msg_v_setAccelerationStructure_atBufferIndex__MTL__AccelerationStructurep_NS__UInteger(const void*, SEL, MTL::AccelerationStructure*, NS::UInteger) __asm__("_objc_msgSend$" "setAccelerationStructure:atBufferIndex:"); +void _MTL_msg_v_setAccelerationStructure_atIndex__MTL__AccelerationStructurep_NS__UInteger(const void*, SEL, MTL::AccelerationStructure*, NS::UInteger) __asm__("_objc_msgSend$" "setAccelerationStructure:atIndex:"); +void _MTL_msg_v_setAccess__MTL__BindingAccess(const void*, SEL, MTL::BindingAccess) __asm__("_objc_msgSend$" "setAccess:"); +void _MTL_msg_v_setAllowDuplicateIntersectionFunctionInvocation__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setAllowDuplicateIntersectionFunctionInvocation:"); +void _MTL_msg_v_setAllowGPUOptimizedContents__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setAllowGPUOptimizedContents:"); +void _MTL_msg_v_setAllowReferencingUndefinedSymbols__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setAllowReferencingUndefinedSymbols:"); +void _MTL_msg_v_setAlphaBlendOperation__MTL__BlendOperation(const void*, SEL, MTL::BlendOperation) __asm__("_objc_msgSend$" "setAlphaBlendOperation:"); +void _MTL_msg_v_setAlphaToCoverageEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setAlphaToCoverageEnabled:"); +void _MTL_msg_v_setAlphaToOneEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setAlphaToOneEnabled:"); +void _MTL_msg_v_setArgumentBuffer_offset__MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "setArgumentBuffer:offset:"); +void _MTL_msg_v_setArgumentBuffer_startOffset_arrayElement__MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setArgumentBuffer:startOffset:arrayElement:"); +void _MTL_msg_v_setArgumentIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setArgumentIndex:"); +void _MTL_msg_v_setArguments__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setArguments:"); +void _MTL_msg_v_setArrayLength__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setArrayLength:"); +void _MTL_msg_v_setAttributes__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setAttributes:"); +void _MTL_msg_v_setBackFaceStencil__MTL__StencilDescriptorp(const void*, SEL, MTL::StencilDescriptor*) __asm__("_objc_msgSend$" "setBackFaceStencil:"); +void _MTL_msg_v_setBarrier(const void*, SEL) __asm__("_objc_msgSend$" "setBarrier"); +void _MTL_msg_v_setBinaryArchives__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setBinaryArchives:"); +void _MTL_msg_v_setBinaryFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setBinaryFunctions:"); +void _MTL_msg_v_setBlendColorRed_green_blue_alpha__float_float_float_float(const void*, SEL, float, float, float, float) __asm__("_objc_msgSend$" "setBlendColorRed:green:blue:alpha:"); +void _MTL_msg_v_setBlendingEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setBlendingEnabled:"); +void _MTL_msg_v_setBorderColor__MTL__SamplerBorderColor(const void*, SEL, MTL::SamplerBorderColor) __asm__("_objc_msgSend$" "setBorderColor:"); +void _MTL_msg_v_setBoundingBoxBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setBoundingBoxBuffer:"); +void _MTL_msg_v_setBoundingBoxBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setBoundingBoxBufferOffset:"); +void _MTL_msg_v_setBoundingBoxBuffers__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setBoundingBoxBuffers:"); +void _MTL_msg_v_setBoundingBoxCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setBoundingBoxCount:"); +void _MTL_msg_v_setBoundingBoxStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setBoundingBoxStride:"); +void _MTL_msg_v_setBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setBuffer:"); +void _MTL_msg_v_setBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setBuffer:offset:atIndex:"); +void _MTL_msg_v_setBuffer_offset_attributeStride_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setBuffer:offset:attributeStride:atIndex:"); +void _MTL_msg_v_setBufferIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setBufferIndex:"); +void _MTL_msg_v_setBufferOffset_atIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setBufferOffset:atIndex:"); +void _MTL_msg_v_setBufferOffset_attributeStride_atIndex__NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setBufferOffset:attributeStride:atIndex:"); +void _MTL_msg_v_setBufferSize__NS__Integer(const void*, SEL, NS::Integer) __asm__("_objc_msgSend$" "setBufferSize:"); +void _MTL_msg_v_setBuffers_offsets_attributeStrides_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_constNS__UIntegerp_NS__Range(const void*, SEL, const MTL::Buffer* const *, const NS::UInteger *, const NS::UInteger *, NS::Range) __asm__("_objc_msgSend$" "setBuffers:offsets:attributeStrides:withRange:"); +void _MTL_msg_v_setBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range(const void*, SEL, const MTL::Buffer* const *, const NS::UInteger *, NS::Range) __asm__("_objc_msgSend$" "setBuffers:offsets:withRange:"); +void _MTL_msg_v_setBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger(const void*, SEL, const void *, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setBytes:length:atIndex:"); +void _MTL_msg_v_setBytes_length_attributeStride_atIndex__constvoidp_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, const void *, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setBytes:length:attributeStride:atIndex:"); +void _MTL_msg_v_setCaptureObject__NS__Objectp(const void*, SEL, NS::Object*) __asm__("_objc_msgSend$" "setCaptureObject:"); +void _MTL_msg_v_setClearColor__MTL__ClearColor(const void*, SEL, MTL::ClearColor) __asm__("_objc_msgSend$" "setClearColor:"); +void _MTL_msg_v_setClearDepth__double(const void*, SEL, double) __asm__("_objc_msgSend$" "setClearDepth:"); +void _MTL_msg_v_setClearStencil__uint32_t(const void*, SEL, uint32_t) __asm__("_objc_msgSend$" "setClearStencil:"); +void _MTL_msg_v_setColorAttachmentMap__MTL__LogicalToPhysicalColorAttachmentMapp(const void*, SEL, MTL::LogicalToPhysicalColorAttachmentMap*) __asm__("_objc_msgSend$" "setColorAttachmentMap:"); +void _MTL_msg_v_setColorStoreAction_atIndex__MTL__StoreAction_NS__UInteger(const void*, SEL, MTL::StoreAction, NS::UInteger) __asm__("_objc_msgSend$" "setColorStoreAction:atIndex:"); +void _MTL_msg_v_setColorStoreActionOptions_atIndex__MTL__StoreActionOptions_NS__UInteger(const void*, SEL, MTL::StoreActionOptions, NS::UInteger) __asm__("_objc_msgSend$" "setColorStoreActionOptions:atIndex:"); +void _MTL_msg_v_setCommandTypes__MTL__IndirectCommandType(const void*, SEL, MTL::IndirectCommandType) __asm__("_objc_msgSend$" "setCommandTypes:"); +void _MTL_msg_v_setCompareFunction__MTL__CompareFunction(const void*, SEL, MTL::CompareFunction) __asm__("_objc_msgSend$" "setCompareFunction:"); +void _MTL_msg_v_setCompileSymbolVisibility__MTL__CompileSymbolVisibility(const void*, SEL, MTL::CompileSymbolVisibility) __asm__("_objc_msgSend$" "setCompileSymbolVisibility:"); +void _MTL_msg_v_setCompressionType__MTL__TextureCompressionType(const void*, SEL, MTL::TextureCompressionType) __asm__("_objc_msgSend$" "setCompressionType:"); +void _MTL_msg_v_setComputeFunction__MTL__Functionp(const void*, SEL, MTL::Function*) __asm__("_objc_msgSend$" "setComputeFunction:"); +void _MTL_msg_v_setComputePipelineState__MTL__ComputePipelineStatep(const void*, SEL, MTL::ComputePipelineState*) __asm__("_objc_msgSend$" "setComputePipelineState:"); +void _MTL_msg_v_setComputePipelineState_atIndex__MTL__ComputePipelineStatep_NS__UInteger(const void*, SEL, MTL::ComputePipelineState*, NS::UInteger) __asm__("_objc_msgSend$" "setComputePipelineState:atIndex:"); +void _MTL_msg_v_setComputePipelineStates_withRange__constMTL__ComputePipelineStatepconstp_NS__Range(const void*, SEL, const MTL::ComputePipelineState* const *, NS::Range) __asm__("_objc_msgSend$" "setComputePipelineStates:withRange:"); +void _MTL_msg_v_setConstantBlockAlignment__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setConstantBlockAlignment:"); +void _MTL_msg_v_setConstantValue_type_atIndex__constvoidp_MTL__DataType_NS__UInteger(const void*, SEL, const void *, MTL::DataType, NS::UInteger) __asm__("_objc_msgSend$" "setConstantValue:type:atIndex:"); +void _MTL_msg_v_setConstantValue_type_withName__constvoidp_MTL__DataType_NS__Stringp(const void*, SEL, const void *, MTL::DataType, NS::String*) __asm__("_objc_msgSend$" "setConstantValue:type:withName:"); +void _MTL_msg_v_setConstantValues__MTL__FunctionConstantValuesp(const void*, SEL, MTL::FunctionConstantValues*) __asm__("_objc_msgSend$" "setConstantValues:"); +void _MTL_msg_v_setConstantValues_type_withRange__constvoidp_MTL__DataType_NS__Range(const void*, SEL, const void *, MTL::DataType, NS::Range) __asm__("_objc_msgSend$" "setConstantValues:type:withRange:"); +void _MTL_msg_v_setControlDependencies__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setControlDependencies:"); +void _MTL_msg_v_setControlPointBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setControlPointBuffer:"); +void _MTL_msg_v_setControlPointBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setControlPointBufferOffset:"); +void _MTL_msg_v_setControlPointBuffers__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setControlPointBuffers:"); +void _MTL_msg_v_setControlPointCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setControlPointCount:"); +void _MTL_msg_v_setControlPointFormat__MTL__AttributeFormat(const void*, SEL, MTL::AttributeFormat) __asm__("_objc_msgSend$" "setControlPointFormat:"); +void _MTL_msg_v_setControlPointStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setControlPointStride:"); +void _MTL_msg_v_setCounterSet__MTL__CounterSetp(const void*, SEL, MTL::CounterSet*) __asm__("_objc_msgSend$" "setCounterSet:"); +void _MTL_msg_v_setCpuCacheMode__MTL__CPUCacheMode(const void*, SEL, MTL::CPUCacheMode) __asm__("_objc_msgSend$" "setCpuCacheMode:"); +void _MTL_msg_v_setCullMode__MTL__CullMode(const void*, SEL, MTL::CullMode) __asm__("_objc_msgSend$" "setCullMode:"); +void _MTL_msg_v_setCurveBasis__MTL__CurveBasis(const void*, SEL, MTL::CurveBasis) __asm__("_objc_msgSend$" "setCurveBasis:"); +void _MTL_msg_v_setCurveEndCaps__MTL__CurveEndCaps(const void*, SEL, MTL::CurveEndCaps) __asm__("_objc_msgSend$" "setCurveEndCaps:"); +void _MTL_msg_v_setCurveType__MTL__CurveType(const void*, SEL, MTL::CurveType) __asm__("_objc_msgSend$" "setCurveType:"); +void _MTL_msg_v_setDataType__MTL__DataType(const void*, SEL, MTL::DataType) __asm__("_objc_msgSend$" "setDataType:"); +void _MTL_msg_v_setDataType__MTL__TensorDataType(const void*, SEL, MTL::TensorDataType) __asm__("_objc_msgSend$" "setDataType:"); +void _MTL_msg_v_setDefaultCaptureScope__MTL__CaptureScopep(const void*, SEL, MTL::CaptureScope*) __asm__("_objc_msgSend$" "setDefaultCaptureScope:"); +void _MTL_msg_v_setDefaultRasterSampleCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setDefaultRasterSampleCount:"); +void _MTL_msg_v_setDepth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setDepth:"); +void _MTL_msg_v_setDepthAttachment__MTL__RenderPassDepthAttachmentDescriptorp(const void*, SEL, MTL::RenderPassDepthAttachmentDescriptor*) __asm__("_objc_msgSend$" "setDepthAttachment:"); +void _MTL_msg_v_setDepthAttachmentPixelFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setDepthAttachmentPixelFormat:"); +void _MTL_msg_v_setDepthBias_slopeScale_clamp__float_float_float(const void*, SEL, float, float, float) __asm__("_objc_msgSend$" "setDepthBias:slopeScale:clamp:"); +void _MTL_msg_v_setDepthClipMode__MTL__DepthClipMode(const void*, SEL, MTL::DepthClipMode) __asm__("_objc_msgSend$" "setDepthClipMode:"); +void _MTL_msg_v_setDepthCompareFunction__MTL__CompareFunction(const void*, SEL, MTL::CompareFunction) __asm__("_objc_msgSend$" "setDepthCompareFunction:"); +void _MTL_msg_v_setDepthFailureOperation__MTL__StencilOperation(const void*, SEL, MTL::StencilOperation) __asm__("_objc_msgSend$" "setDepthFailureOperation:"); +void _MTL_msg_v_setDepthPlane__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setDepthPlane:"); +void _MTL_msg_v_setDepthResolveFilter__MTL__MultisampleDepthResolveFilter(const void*, SEL, MTL::MultisampleDepthResolveFilter) __asm__("_objc_msgSend$" "setDepthResolveFilter:"); +void _MTL_msg_v_setDepthStencilPassOperation__MTL__StencilOperation(const void*, SEL, MTL::StencilOperation) __asm__("_objc_msgSend$" "setDepthStencilPassOperation:"); +void _MTL_msg_v_setDepthStencilState__MTL__DepthStencilStatep(const void*, SEL, MTL::DepthStencilState*) __asm__("_objc_msgSend$" "setDepthStencilState:"); +void _MTL_msg_v_setDepthStencilState_atIndex__MTL__DepthStencilStatep_NS__UInteger(const void*, SEL, MTL::DepthStencilState*, NS::UInteger) __asm__("_objc_msgSend$" "setDepthStencilState:atIndex:"); +void _MTL_msg_v_setDepthStencilStates_withRange__constMTL__DepthStencilStatepconstp_NS__Range(const void*, SEL, const MTL::DepthStencilState* const *, NS::Range) __asm__("_objc_msgSend$" "setDepthStencilStates:withRange:"); +void _MTL_msg_v_setDepthStoreAction__MTL__StoreAction(const void*, SEL, MTL::StoreAction) __asm__("_objc_msgSend$" "setDepthStoreAction:"); +void _MTL_msg_v_setDepthStoreActionOptions__MTL__StoreActionOptions(const void*, SEL, MTL::StoreActionOptions) __asm__("_objc_msgSend$" "setDepthStoreActionOptions:"); +void _MTL_msg_v_setDepthTestMinBound_maxBound__float_float(const void*, SEL, float, float) __asm__("_objc_msgSend$" "setDepthTestMinBound:maxBound:"); +void _MTL_msg_v_setDepthWriteEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setDepthWriteEnabled:"); +void _MTL_msg_v_setDestination__MTL__CaptureDestination(const void*, SEL, MTL::CaptureDestination) __asm__("_objc_msgSend$" "setDestination:"); +void _MTL_msg_v_setDestinationAlphaBlendFactor__MTL__BlendFactor(const void*, SEL, MTL::BlendFactor) __asm__("_objc_msgSend$" "setDestinationAlphaBlendFactor:"); +void _MTL_msg_v_setDestinationRGBBlendFactor__MTL__BlendFactor(const void*, SEL, MTL::BlendFactor) __asm__("_objc_msgSend$" "setDestinationRGBBlendFactor:"); +void _MTL_msg_v_setDimensions__MTL__TensorExtentsp(const void*, SEL, MTL::TensorExtents*) __asm__("_objc_msgSend$" "setDimensions:"); +void _MTL_msg_v_setDispatchType__MTL__DispatchType(const void*, SEL, MTL::DispatchType) __asm__("_objc_msgSend$" "setDispatchType:"); +void _MTL_msg_v_setEnableLogging__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setEnableLogging:"); +void _MTL_msg_v_setEndOfEncoderSampleIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setEndOfEncoderSampleIndex:"); +void _MTL_msg_v_setEndOfFragmentSampleIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setEndOfFragmentSampleIndex:"); +void _MTL_msg_v_setEndOfVertexSampleIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setEndOfVertexSampleIndex:"); +void _MTL_msg_v_setErrorOptions__MTL__CommandBufferErrorOption(const void*, SEL, MTL::CommandBufferErrorOption) __asm__("_objc_msgSend$" "setErrorOptions:"); +void _MTL_msg_v_setFastMathEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setFastMathEnabled:"); +void _MTL_msg_v_setFormat__MTL__AttributeFormat(const void*, SEL, MTL::AttributeFormat) __asm__("_objc_msgSend$" "setFormat:"); +void _MTL_msg_v_setFormat__MTL__VertexFormat(const void*, SEL, MTL::VertexFormat) __asm__("_objc_msgSend$" "setFormat:"); +void _MTL_msg_v_setFragmentAccelerationStructure_atBufferIndex__MTL__AccelerationStructurep_NS__UInteger(const void*, SEL, MTL::AccelerationStructure*, NS::UInteger) __asm__("_objc_msgSend$" "setFragmentAccelerationStructure:atBufferIndex:"); +void _MTL_msg_v_setFragmentAdditionalBinaryFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setFragmentAdditionalBinaryFunctions:"); +void _MTL_msg_v_setFragmentBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setFragmentBuffer:offset:atIndex:"); +void _MTL_msg_v_setFragmentBufferOffset_atIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setFragmentBufferOffset:atIndex:"); +void _MTL_msg_v_setFragmentBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range(const void*, SEL, const MTL::Buffer* const *, const NS::UInteger *, NS::Range) __asm__("_objc_msgSend$" "setFragmentBuffers:offsets:withRange:"); +void _MTL_msg_v_setFragmentBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger(const void*, SEL, const void *, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setFragmentBytes:length:atIndex:"); +void _MTL_msg_v_setFragmentFunction__MTL__Functionp(const void*, SEL, MTL::Function*) __asm__("_objc_msgSend$" "setFragmentFunction:"); +void _MTL_msg_v_setFragmentIntersectionFunctionTable_atBufferIndex__MTL__IntersectionFunctionTablep_NS__UInteger(const void*, SEL, MTL::IntersectionFunctionTable*, NS::UInteger) __asm__("_objc_msgSend$" "setFragmentIntersectionFunctionTable:atBufferIndex:"); +void _MTL_msg_v_setFragmentIntersectionFunctionTables_withBufferRange__constMTL__IntersectionFunctionTablepconstp_NS__Range(const void*, SEL, const MTL::IntersectionFunctionTable* const *, NS::Range) __asm__("_objc_msgSend$" "setFragmentIntersectionFunctionTables:withBufferRange:"); +void _MTL_msg_v_setFragmentLinkedFunctions__MTL__LinkedFunctionsp(const void*, SEL, MTL::LinkedFunctions*) __asm__("_objc_msgSend$" "setFragmentLinkedFunctions:"); +void _MTL_msg_v_setFragmentPreloadedLibraries__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setFragmentPreloadedLibraries:"); +void _MTL_msg_v_setFragmentSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger(const void*, SEL, MTL::SamplerState*, NS::UInteger) __asm__("_objc_msgSend$" "setFragmentSamplerState:atIndex:"); +void _MTL_msg_v_setFragmentSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger(const void*, SEL, MTL::SamplerState*, float, float, NS::UInteger) __asm__("_objc_msgSend$" "setFragmentSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); +void _MTL_msg_v_setFragmentSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, const float *, const float *, NS::Range) __asm__("_objc_msgSend$" "setFragmentSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); +void _MTL_msg_v_setFragmentSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, NS::Range) __asm__("_objc_msgSend$" "setFragmentSamplerStates:withRange:"); +void _MTL_msg_v_setFragmentTexture_atIndex__MTL__Texturep_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger) __asm__("_objc_msgSend$" "setFragmentTexture:atIndex:"); +void _MTL_msg_v_setFragmentTextures_withRange__constMTL__Texturepconstp_NS__Range(const void*, SEL, const MTL::Texture* const *, NS::Range) __asm__("_objc_msgSend$" "setFragmentTextures:withRange:"); +void _MTL_msg_v_setFragmentVisibleFunctionTable_atBufferIndex__MTL__VisibleFunctionTablep_NS__UInteger(const void*, SEL, MTL::VisibleFunctionTable*, NS::UInteger) __asm__("_objc_msgSend$" "setFragmentVisibleFunctionTable:atBufferIndex:"); +void _MTL_msg_v_setFragmentVisibleFunctionTables_withBufferRange__constMTL__VisibleFunctionTablepconstp_NS__Range(const void*, SEL, const MTL::VisibleFunctionTable* const *, NS::Range) __asm__("_objc_msgSend$" "setFragmentVisibleFunctionTables:withBufferRange:"); +void _MTL_msg_v_setFrontFaceStencil__MTL__StencilDescriptorp(const void*, SEL, MTL::StencilDescriptor*) __asm__("_objc_msgSend$" "setFrontFaceStencil:"); +void _MTL_msg_v_setFrontFacingWinding__MTL__Winding(const void*, SEL, MTL::Winding) __asm__("_objc_msgSend$" "setFrontFacingWinding:"); +void _MTL_msg_v_setFunction_atIndex__MTL__FunctionHandlep_NS__UInteger(const void*, SEL, MTL::FunctionHandle*, NS::UInteger) __asm__("_objc_msgSend$" "setFunction:atIndex:"); +void _MTL_msg_v_setFunctionCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setFunctionCount:"); +void _MTL_msg_v_setFunctionGraphs__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setFunctionGraphs:"); +void _MTL_msg_v_setFunctionName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setFunctionName:"); +void _MTL_msg_v_setFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setFunctions:"); +void _MTL_msg_v_setFunctions_withRange__constMTL__FunctionHandlepconstp_NS__Range(const void*, SEL, const MTL::FunctionHandle* const *, NS::Range) __asm__("_objc_msgSend$" "setFunctions:withRange:"); +void _MTL_msg_v_setGeometryDescriptors__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setGeometryDescriptors:"); +void _MTL_msg_v_setGroups__NS__Dictionaryp(const void*, SEL, NS::Dictionary*) __asm__("_objc_msgSend$" "setGroups:"); +void _MTL_msg_v_setHazardTrackingMode__MTL__HazardTrackingMode(const void*, SEL, MTL::HazardTrackingMode) __asm__("_objc_msgSend$" "setHazardTrackingMode:"); +void _MTL_msg_v_setHeight__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setHeight:"); +void _MTL_msg_v_setImageblockSampleLength__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setImageblockSampleLength:"); +void _MTL_msg_v_setImageblockWidth_height__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setImageblockWidth:height:"); +void _MTL_msg_v_setIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setIndex:"); +void _MTL_msg_v_setIndexBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setIndexBuffer:"); +void _MTL_msg_v_setIndexBufferIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setIndexBufferIndex:"); +void _MTL_msg_v_setIndexBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setIndexBufferOffset:"); +void _MTL_msg_v_setIndexType__MTL__IndexType(const void*, SEL, MTL::IndexType) __asm__("_objc_msgSend$" "setIndexType:"); +void _MTL_msg_v_setIndirectCommandBuffer_atIndex__MTL__IndirectCommandBufferp_NS__UInteger(const void*, SEL, MTL::IndirectCommandBuffer*, NS::UInteger) __asm__("_objc_msgSend$" "setIndirectCommandBuffer:atIndex:"); +void _MTL_msg_v_setIndirectCommandBuffers_withRange__constMTL__IndirectCommandBufferpconstp_NS__Range(const void*, SEL, const MTL::IndirectCommandBuffer* const *, NS::Range) __asm__("_objc_msgSend$" "setIndirectCommandBuffers:withRange:"); +void _MTL_msg_v_setInheritBuffers__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setInheritBuffers:"); +void _MTL_msg_v_setInheritCullMode__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setInheritCullMode:"); +void _MTL_msg_v_setInheritDepthBias__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setInheritDepthBias:"); +void _MTL_msg_v_setInheritDepthClipMode__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setInheritDepthClipMode:"); +void _MTL_msg_v_setInheritDepthStencilState__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setInheritDepthStencilState:"); +void _MTL_msg_v_setInheritFrontFacingWinding__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setInheritFrontFacingWinding:"); +void _MTL_msg_v_setInheritPipelineState__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setInheritPipelineState:"); +void _MTL_msg_v_setInheritTriangleFillMode__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setInheritTriangleFillMode:"); +void _MTL_msg_v_setInitialCapacity__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInitialCapacity:"); +void _MTL_msg_v_setInputPrimitiveTopology__MTL__PrimitiveTopologyClass(const void*, SEL, MTL::PrimitiveTopologyClass) __asm__("_objc_msgSend$" "setInputPrimitiveTopology:"); +void _MTL_msg_v_setInsertLibraries__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setInsertLibraries:"); +void _MTL_msg_v_setInstallName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setInstallName:"); +void _MTL_msg_v_setInstanceCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInstanceCount:"); +void _MTL_msg_v_setInstanceCountBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setInstanceCountBuffer:"); +void _MTL_msg_v_setInstanceCountBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInstanceCountBufferOffset:"); +void _MTL_msg_v_setInstanceDescriptorBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setInstanceDescriptorBuffer:"); +void _MTL_msg_v_setInstanceDescriptorBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInstanceDescriptorBufferOffset:"); +void _MTL_msg_v_setInstanceDescriptorStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInstanceDescriptorStride:"); +void _MTL_msg_v_setInstanceDescriptorType__MTL__AccelerationStructureInstanceDescriptorType(const void*, SEL, MTL::AccelerationStructureInstanceDescriptorType) __asm__("_objc_msgSend$" "setInstanceDescriptorType:"); +void _MTL_msg_v_setInstanceTransformationMatrixLayout__MTL__MatrixLayout(const void*, SEL, MTL::MatrixLayout) __asm__("_objc_msgSend$" "setInstanceTransformationMatrixLayout:"); +void _MTL_msg_v_setInstancedAccelerationStructures__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setInstancedAccelerationStructures:"); +void _MTL_msg_v_setIntersectionFunctionTable_atBufferIndex__MTL__IntersectionFunctionTablep_NS__UInteger(const void*, SEL, MTL::IntersectionFunctionTable*, NS::UInteger) __asm__("_objc_msgSend$" "setIntersectionFunctionTable:atBufferIndex:"); +void _MTL_msg_v_setIntersectionFunctionTable_atIndex__MTL__IntersectionFunctionTablep_NS__UInteger(const void*, SEL, MTL::IntersectionFunctionTable*, NS::UInteger) __asm__("_objc_msgSend$" "setIntersectionFunctionTable:atIndex:"); +void _MTL_msg_v_setIntersectionFunctionTableOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setIntersectionFunctionTableOffset:"); +void _MTL_msg_v_setIntersectionFunctionTables_withBufferRange__constMTL__IntersectionFunctionTablepconstp_NS__Range(const void*, SEL, const MTL::IntersectionFunctionTable* const *, NS::Range) __asm__("_objc_msgSend$" "setIntersectionFunctionTables:withBufferRange:"); +void _MTL_msg_v_setIntersectionFunctionTables_withRange__constMTL__IntersectionFunctionTablepconstp_NS__Range(const void*, SEL, const MTL::IntersectionFunctionTable* const *, NS::Range) __asm__("_objc_msgSend$" "setIntersectionFunctionTables:withRange:"); +void _MTL_msg_v_setKernelBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setKernelBuffer:offset:atIndex:"); +void _MTL_msg_v_setKernelBuffer_offset_attributeStride_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setKernelBuffer:offset:attributeStride:atIndex:"); +void _MTL_msg_v_setLabel__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setLabel:"); +void _MTL_msg_v_setLanguageVersion__MTL__LanguageVersion(const void*, SEL, MTL::LanguageVersion) __asm__("_objc_msgSend$" "setLanguageVersion:"); +void _MTL_msg_v_setLayer_atIndex__MTL__RasterizationRateLayerDescriptorp_NS__UInteger(const void*, SEL, MTL::RasterizationRateLayerDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setLayer:atIndex:"); +void _MTL_msg_v_setLevel__MTL__LogLevel(const void*, SEL, MTL::LogLevel) __asm__("_objc_msgSend$" "setLevel:"); +void _MTL_msg_v_setLevel__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setLevel:"); +void _MTL_msg_v_setLevelRange__NS__Range(const void*, SEL, NS::Range) __asm__("_objc_msgSend$" "setLevelRange:"); +void _MTL_msg_v_setLibraries__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setLibraries:"); +void _MTL_msg_v_setLibraryType__MTL__LibraryType(const void*, SEL, MTL::LibraryType) __asm__("_objc_msgSend$" "setLibraryType:"); +void _MTL_msg_v_setLinkedFunctions__MTL__LinkedFunctionsp(const void*, SEL, MTL::LinkedFunctions*) __asm__("_objc_msgSend$" "setLinkedFunctions:"); +void _MTL_msg_v_setLoadAction__MTL__LoadAction(const void*, SEL, MTL::LoadAction) __asm__("_objc_msgSend$" "setLoadAction:"); +void _MTL_msg_v_setLodAverage__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setLodAverage:"); +void _MTL_msg_v_setLodBias__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setLodBias:"); +void _MTL_msg_v_setLodMaxClamp__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setLodMaxClamp:"); +void _MTL_msg_v_setLodMinClamp__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setLodMinClamp:"); +void _MTL_msg_v_setLogState__MTL__LogStatep(const void*, SEL, MTL::LogState*) __asm__("_objc_msgSend$" "setLogState:"); +void _MTL_msg_v_setMagFilter__MTL__SamplerMinMagFilter(const void*, SEL, MTL::SamplerMinMagFilter) __asm__("_objc_msgSend$" "setMagFilter:"); +void _MTL_msg_v_setMathFloatingPointFunctions__MTL__MathFloatingPointFunctions(const void*, SEL, MTL::MathFloatingPointFunctions) __asm__("_objc_msgSend$" "setMathFloatingPointFunctions:"); +void _MTL_msg_v_setMathMode__MTL__MathMode(const void*, SEL, MTL::MathMode) __asm__("_objc_msgSend$" "setMathMode:"); +void _MTL_msg_v_setMaxAnisotropy__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxAnisotropy:"); +void _MTL_msg_v_setMaxCallStackDepth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxCallStackDepth:"); +void _MTL_msg_v_setMaxCommandBufferCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxCommandBufferCount:"); +void _MTL_msg_v_setMaxCommandsInFlight__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxCommandsInFlight:"); +void _MTL_msg_v_setMaxCompatiblePlacementSparsePageSize__MTL__SparsePageSize(const void*, SEL, MTL::SparsePageSize) __asm__("_objc_msgSend$" "setMaxCompatiblePlacementSparsePageSize:"); +void _MTL_msg_v_setMaxFragmentBufferBindCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxFragmentBufferBindCount:"); +void _MTL_msg_v_setMaxFragmentCallStackDepth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxFragmentCallStackDepth:"); +void _MTL_msg_v_setMaxInstanceCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxInstanceCount:"); +void _MTL_msg_v_setMaxKernelBufferBindCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxKernelBufferBindCount:"); +void _MTL_msg_v_setMaxKernelThreadgroupMemoryBindCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxKernelThreadgroupMemoryBindCount:"); +void _MTL_msg_v_setMaxMeshBufferBindCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxMeshBufferBindCount:"); +void _MTL_msg_v_setMaxMotionTransformCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxMotionTransformCount:"); +void _MTL_msg_v_setMaxObjectBufferBindCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxObjectBufferBindCount:"); +void _MTL_msg_v_setMaxObjectThreadgroupMemoryBindCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxObjectThreadgroupMemoryBindCount:"); +void _MTL_msg_v_setMaxTessellationFactor__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxTessellationFactor:"); +void _MTL_msg_v_setMaxTotalThreadgroupsPerMeshGrid__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxTotalThreadgroupsPerMeshGrid:"); +void _MTL_msg_v_setMaxTotalThreadsPerMeshThreadgroup__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxTotalThreadsPerMeshThreadgroup:"); +void _MTL_msg_v_setMaxTotalThreadsPerObjectThreadgroup__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxTotalThreadsPerObjectThreadgroup:"); +void _MTL_msg_v_setMaxTotalThreadsPerThreadgroup__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxTotalThreadsPerThreadgroup:"); +void _MTL_msg_v_setMaxVertexAmplificationCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxVertexAmplificationCount:"); +void _MTL_msg_v_setMaxVertexBufferBindCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxVertexBufferBindCount:"); +void _MTL_msg_v_setMaxVertexCallStackDepth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaxVertexCallStackDepth:"); +void _MTL_msg_v_setMeshBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setMeshBuffer:offset:atIndex:"); +void _MTL_msg_v_setMeshBufferOffset_atIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setMeshBufferOffset:atIndex:"); +void _MTL_msg_v_setMeshBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range(const void*, SEL, const MTL::Buffer* const *, const NS::UInteger *, NS::Range) __asm__("_objc_msgSend$" "setMeshBuffers:offsets:withRange:"); +void _MTL_msg_v_setMeshBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger(const void*, SEL, const void *, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setMeshBytes:length:atIndex:"); +void _MTL_msg_v_setMeshFunction__MTL__Functionp(const void*, SEL, MTL::Function*) __asm__("_objc_msgSend$" "setMeshFunction:"); +void _MTL_msg_v_setMeshLinkedFunctions__MTL__LinkedFunctionsp(const void*, SEL, MTL::LinkedFunctions*) __asm__("_objc_msgSend$" "setMeshLinkedFunctions:"); +void _MTL_msg_v_setMeshSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger(const void*, SEL, MTL::SamplerState*, NS::UInteger) __asm__("_objc_msgSend$" "setMeshSamplerState:atIndex:"); +void _MTL_msg_v_setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger(const void*, SEL, MTL::SamplerState*, float, float, NS::UInteger) __asm__("_objc_msgSend$" "setMeshSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); +void _MTL_msg_v_setMeshSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, const float *, const float *, NS::Range) __asm__("_objc_msgSend$" "setMeshSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); +void _MTL_msg_v_setMeshSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, NS::Range) __asm__("_objc_msgSend$" "setMeshSamplerStates:withRange:"); +void _MTL_msg_v_setMeshTexture_atIndex__MTL__Texturep_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger) __asm__("_objc_msgSend$" "setMeshTexture:atIndex:"); +void _MTL_msg_v_setMeshTextures_withRange__constMTL__Texturepconstp_NS__Range(const void*, SEL, const MTL::Texture* const *, NS::Range) __asm__("_objc_msgSend$" "setMeshTextures:withRange:"); +void _MTL_msg_v_setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth:"); +void _MTL_msg_v_setMinFilter__MTL__SamplerMinMagFilter(const void*, SEL, MTL::SamplerMinMagFilter) __asm__("_objc_msgSend$" "setMinFilter:"); +void _MTL_msg_v_setMipFilter__MTL__SamplerMipFilter(const void*, SEL, MTL::SamplerMipFilter) __asm__("_objc_msgSend$" "setMipFilter:"); +void _MTL_msg_v_setMipmapLevelCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMipmapLevelCount:"); +void _MTL_msg_v_setMotionEndBorderMode__MTL__MotionBorderMode(const void*, SEL, MTL::MotionBorderMode) __asm__("_objc_msgSend$" "setMotionEndBorderMode:"); +void _MTL_msg_v_setMotionEndTime__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setMotionEndTime:"); +void _MTL_msg_v_setMotionKeyframeCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMotionKeyframeCount:"); +void _MTL_msg_v_setMotionStartBorderMode__MTL__MotionBorderMode(const void*, SEL, MTL::MotionBorderMode) __asm__("_objc_msgSend$" "setMotionStartBorderMode:"); +void _MTL_msg_v_setMotionStartTime__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setMotionStartTime:"); +void _MTL_msg_v_setMotionTransformBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setMotionTransformBuffer:"); +void _MTL_msg_v_setMotionTransformBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMotionTransformBufferOffset:"); +void _MTL_msg_v_setMotionTransformCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMotionTransformCount:"); +void _MTL_msg_v_setMotionTransformCountBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setMotionTransformCountBuffer:"); +void _MTL_msg_v_setMotionTransformCountBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMotionTransformCountBufferOffset:"); +void _MTL_msg_v_setMotionTransformStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMotionTransformStride:"); +void _MTL_msg_v_setMotionTransformType__MTL__TransformType(const void*, SEL, MTL::TransformType) __asm__("_objc_msgSend$" "setMotionTransformType:"); +void _MTL_msg_v_setMutability__MTL__Mutability(const void*, SEL, MTL::Mutability) __asm__("_objc_msgSend$" "setMutability:"); +void _MTL_msg_v_setName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setName:"); +void _MTL_msg_v_setNodes__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setNodes:"); +void _MTL_msg_v_setNormalizedCoordinates__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setNormalizedCoordinates:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__AccelerationStructurePassSampleBufferAttachmentDescriptorp_NS__UInteger(const void*, SEL, MTL::AccelerationStructurePassSampleBufferAttachmentDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__AttributeDescriptorp_NS__UInteger(const void*, SEL, MTL::AttributeDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__BlitPassSampleBufferAttachmentDescriptorp_NS__UInteger(const void*, SEL, MTL::BlitPassSampleBufferAttachmentDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__BufferLayoutDescriptorp_NS__UInteger(const void*, SEL, MTL::BufferLayoutDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__ComputePassSampleBufferAttachmentDescriptorp_NS__UInteger(const void*, SEL, MTL::ComputePassSampleBufferAttachmentDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__PipelineBufferDescriptorp_NS__UInteger(const void*, SEL, MTL::PipelineBufferDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__RasterizationRateLayerDescriptorp_NS__UInteger(const void*, SEL, MTL::RasterizationRateLayerDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__RenderPassColorAttachmentDescriptorp_NS__UInteger(const void*, SEL, MTL::RenderPassColorAttachmentDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__RenderPassSampleBufferAttachmentDescriptorp_NS__UInteger(const void*, SEL, MTL::RenderPassSampleBufferAttachmentDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__RenderPipelineColorAttachmentDescriptorp_NS__UInteger(const void*, SEL, MTL::RenderPipelineColorAttachmentDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__ResourceStatePassSampleBufferAttachmentDescriptorp_NS__UInteger(const void*, SEL, MTL::ResourceStatePassSampleBufferAttachmentDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__TileRenderPipelineColorAttachmentDescriptorp_NS__UInteger(const void*, SEL, MTL::TileRenderPipelineColorAttachmentDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__VertexAttributeDescriptorp_NS__UInteger(const void*, SEL, MTL::VertexAttributeDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__MTL__VertexBufferLayoutDescriptorp_NS__UInteger(const void*, SEL, MTL::VertexBufferLayoutDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObject_atIndexedSubscript__NS__Numberp_NS__UInteger(const void*, SEL, NS::Number*, NS::UInteger) __asm__("_objc_msgSend$" "setObject:atIndexedSubscript:"); +void _MTL_msg_v_setObjectBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setObjectBuffer:offset:atIndex:"); +void _MTL_msg_v_setObjectBufferOffset_atIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setObjectBufferOffset:atIndex:"); +void _MTL_msg_v_setObjectBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range(const void*, SEL, const MTL::Buffer* const *, const NS::UInteger *, NS::Range) __asm__("_objc_msgSend$" "setObjectBuffers:offsets:withRange:"); +void _MTL_msg_v_setObjectBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger(const void*, SEL, const void *, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setObjectBytes:length:atIndex:"); +void _MTL_msg_v_setObjectFunction__MTL__Functionp(const void*, SEL, MTL::Function*) __asm__("_objc_msgSend$" "setObjectFunction:"); +void _MTL_msg_v_setObjectLinkedFunctions__MTL__LinkedFunctionsp(const void*, SEL, MTL::LinkedFunctions*) __asm__("_objc_msgSend$" "setObjectLinkedFunctions:"); +void _MTL_msg_v_setObjectSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger(const void*, SEL, MTL::SamplerState*, NS::UInteger) __asm__("_objc_msgSend$" "setObjectSamplerState:atIndex:"); +void _MTL_msg_v_setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger(const void*, SEL, MTL::SamplerState*, float, float, NS::UInteger) __asm__("_objc_msgSend$" "setObjectSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); +void _MTL_msg_v_setObjectSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, const float *, const float *, NS::Range) __asm__("_objc_msgSend$" "setObjectSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); +void _MTL_msg_v_setObjectSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, NS::Range) __asm__("_objc_msgSend$" "setObjectSamplerStates:withRange:"); +void _MTL_msg_v_setObjectTexture_atIndex__MTL__Texturep_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger) __asm__("_objc_msgSend$" "setObjectTexture:atIndex:"); +void _MTL_msg_v_setObjectTextures_withRange__constMTL__Texturepconstp_NS__Range(const void*, SEL, const MTL::Texture* const *, NS::Range) __asm__("_objc_msgSend$" "setObjectTextures:withRange:"); +void _MTL_msg_v_setObjectThreadgroupMemoryLength_atIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setObjectThreadgroupMemoryLength:atIndex:"); +void _MTL_msg_v_setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth:"); +void _MTL_msg_v_setOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setOffset:"); +void _MTL_msg_v_setOpaque__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setOpaque:"); +void _MTL_msg_v_setOpaqueCurveIntersectionFunctionWithSignature_atIndex__MTL__IntersectionFunctionSignature_NS__UInteger(const void*, SEL, MTL::IntersectionFunctionSignature, NS::UInteger) __asm__("_objc_msgSend$" "setOpaqueCurveIntersectionFunctionWithSignature:atIndex:"); +void _MTL_msg_v_setOpaqueCurveIntersectionFunctionWithSignature_withRange__MTL__IntersectionFunctionSignature_NS__Range(const void*, SEL, MTL::IntersectionFunctionSignature, NS::Range) __asm__("_objc_msgSend$" "setOpaqueCurveIntersectionFunctionWithSignature:withRange:"); +void _MTL_msg_v_setOpaqueTriangleIntersectionFunctionWithSignature_atIndex__MTL__IntersectionFunctionSignature_NS__UInteger(const void*, SEL, MTL::IntersectionFunctionSignature, NS::UInteger) __asm__("_objc_msgSend$" "setOpaqueTriangleIntersectionFunctionWithSignature:atIndex:"); +void _MTL_msg_v_setOpaqueTriangleIntersectionFunctionWithSignature_withRange__MTL__IntersectionFunctionSignature_NS__Range(const void*, SEL, MTL::IntersectionFunctionSignature, NS::Range) __asm__("_objc_msgSend$" "setOpaqueTriangleIntersectionFunctionWithSignature:withRange:"); +void _MTL_msg_v_setOptimizationLevel__MTL__LibraryOptimizationLevel(const void*, SEL, MTL::LibraryOptimizationLevel) __asm__("_objc_msgSend$" "setOptimizationLevel:"); +void _MTL_msg_v_setOptions__MTL__FunctionOptions(const void*, SEL, MTL::FunctionOptions) __asm__("_objc_msgSend$" "setOptions:"); +void _MTL_msg_v_setOptions__MTL__StitchedLibraryOptions(const void*, SEL, MTL::StitchedLibraryOptions) __asm__("_objc_msgSend$" "setOptions:"); +void _MTL_msg_v_setOutputNode__MTL__FunctionStitchingFunctionNodep(const void*, SEL, MTL::FunctionStitchingFunctionNode*) __asm__("_objc_msgSend$" "setOutputNode:"); +void _MTL_msg_v_setOutputURL__NS__URLp(const void*, SEL, NS::URL*) __asm__("_objc_msgSend$" "setOutputURL:"); +void* _MTL_msg_voidp_setOwnerWithIdentity__voidp(const void*, SEL, void*) __asm__("_objc_msgSend$" "setOwnerWithIdentity:"); +void _MTL_msg_v_setPayloadMemoryLength__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setPayloadMemoryLength:"); +void _MTL_msg_v_setPhysicalIndex_forLogicalIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setPhysicalIndex:forLogicalIndex:"); +void _MTL_msg_v_setPixelFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setPixelFormat:"); +void _MTL_msg_v_setPlacementSparsePageSize__MTL__SparsePageSize(const void*, SEL, MTL::SparsePageSize) __asm__("_objc_msgSend$" "setPlacementSparsePageSize:"); +void _MTL_msg_v_setPreloadedLibraries__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setPreloadedLibraries:"); +void _MTL_msg_v_setPreprocessorMacros__NS__Dictionaryp(const void*, SEL, NS::Dictionary*) __asm__("_objc_msgSend$" "setPreprocessorMacros:"); +void _MTL_msg_v_setPreserveInvariance__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setPreserveInvariance:"); +void _MTL_msg_v_setPrimitiveDataBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setPrimitiveDataBuffer:"); +void _MTL_msg_v_setPrimitiveDataBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setPrimitiveDataBufferOffset:"); +void _MTL_msg_v_setPrimitiveDataElementSize__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setPrimitiveDataElementSize:"); +void _MTL_msg_v_setPrimitiveDataStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setPrimitiveDataStride:"); +void _MTL_msg_v_setPriority__MTL__IOPriority(const void*, SEL, MTL::IOPriority) __asm__("_objc_msgSend$" "setPriority:"); +void _MTL_msg_v_setPrivateFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setPrivateFunctions:"); +MTL::PurgeableState _MTL_msg_MTL__PurgeableState_setPurgeableState__MTL__PurgeableState(const void*, SEL, MTL::PurgeableState) __asm__("_objc_msgSend$" "setPurgeableState:"); +void _MTL_msg_v_setRAddressMode__MTL__SamplerAddressMode(const void*, SEL, MTL::SamplerAddressMode) __asm__("_objc_msgSend$" "setRAddressMode:"); +void _MTL_msg_v_setRadiusBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setRadiusBuffer:"); +void _MTL_msg_v_setRadiusBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRadiusBufferOffset:"); +void _MTL_msg_v_setRadiusBuffers__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setRadiusBuffers:"); +void _MTL_msg_v_setRadiusFormat__MTL__AttributeFormat(const void*, SEL, MTL::AttributeFormat) __asm__("_objc_msgSend$" "setRadiusFormat:"); +void _MTL_msg_v_setRadiusStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRadiusStride:"); +void _MTL_msg_v_setRasterSampleCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRasterSampleCount:"); +void _MTL_msg_v_setRasterizationEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setRasterizationEnabled:"); +void _MTL_msg_v_setRasterizationRateMap__MTL__RasterizationRateMapp(const void*, SEL, MTL::RasterizationRateMap*) __asm__("_objc_msgSend$" "setRasterizationRateMap:"); +void _MTL_msg_v_setReadMask__uint32_t(const void*, SEL, uint32_t) __asm__("_objc_msgSend$" "setReadMask:"); +void _MTL_msg_v_setReductionMode__MTL__SamplerReductionMode(const void*, SEL, MTL::SamplerReductionMode) __asm__("_objc_msgSend$" "setReductionMode:"); +void _MTL_msg_v_setRenderPipelineState__MTL__RenderPipelineStatep(const void*, SEL, MTL::RenderPipelineState*) __asm__("_objc_msgSend$" "setRenderPipelineState:"); +void _MTL_msg_v_setRenderPipelineState_atIndex__MTL__RenderPipelineStatep_NS__UInteger(const void*, SEL, MTL::RenderPipelineState*, NS::UInteger) __asm__("_objc_msgSend$" "setRenderPipelineState:atIndex:"); +void _MTL_msg_v_setRenderPipelineStates_withRange__constMTL__RenderPipelineStatepconstp_NS__Range(const void*, SEL, const MTL::RenderPipelineState* const *, NS::Range) __asm__("_objc_msgSend$" "setRenderPipelineStates:withRange:"); +void _MTL_msg_v_setRenderTargetArrayLength__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRenderTargetArrayLength:"); +void _MTL_msg_v_setRenderTargetHeight__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRenderTargetHeight:"); +void _MTL_msg_v_setRenderTargetWidth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setRenderTargetWidth:"); +void _MTL_msg_v_setRequiredThreadsPerMeshThreadgroup__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "setRequiredThreadsPerMeshThreadgroup:"); +void _MTL_msg_v_setRequiredThreadsPerObjectThreadgroup__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "setRequiredThreadsPerObjectThreadgroup:"); +void _MTL_msg_v_setRequiredThreadsPerThreadgroup__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "setRequiredThreadsPerThreadgroup:"); +void _MTL_msg_v_setResolveDepthPlane__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setResolveDepthPlane:"); +void _MTL_msg_v_setResolveLevel__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setResolveLevel:"); +void _MTL_msg_v_setResolveSlice__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setResolveSlice:"); +void _MTL_msg_v_setResolveTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setResolveTexture:"); +void _MTL_msg_v_setResourceOptions__MTL__ResourceOptions(const void*, SEL, MTL::ResourceOptions) __asm__("_objc_msgSend$" "setResourceOptions:"); +void _MTL_msg_v_setResourceViewCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setResourceViewCount:"); +void _MTL_msg_v_setRetainedReferences__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setRetainedReferences:"); +void _MTL_msg_v_setRgbBlendOperation__MTL__BlendOperation(const void*, SEL, MTL::BlendOperation) __asm__("_objc_msgSend$" "setRgbBlendOperation:"); +void _MTL_msg_v_setSAddressMode__MTL__SamplerAddressMode(const void*, SEL, MTL::SamplerAddressMode) __asm__("_objc_msgSend$" "setSAddressMode:"); +void _MTL_msg_v_setSampleBuffer__MTL__CounterSampleBufferp(const void*, SEL, MTL::CounterSampleBuffer*) __asm__("_objc_msgSend$" "setSampleBuffer:"); +void _MTL_msg_v_setSampleCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setSampleCount:"); +void _MTL_msg_v_setSamplePositions_count__constMTL__SamplePositionp_NS__UInteger(const void*, SEL, const MTL::SamplePosition *, NS::UInteger) __asm__("_objc_msgSend$" "setSamplePositions:count:"); +void _MTL_msg_v_setSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger(const void*, SEL, MTL::SamplerState*, NS::UInteger) __asm__("_objc_msgSend$" "setSamplerState:atIndex:"); +void _MTL_msg_v_setSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger(const void*, SEL, MTL::SamplerState*, float, float, NS::UInteger) __asm__("_objc_msgSend$" "setSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); +void _MTL_msg_v_setSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, const float *, const float *, NS::Range) __asm__("_objc_msgSend$" "setSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); +void _MTL_msg_v_setSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, NS::Range) __asm__("_objc_msgSend$" "setSamplerStates:withRange:"); +void _MTL_msg_v_setScissorRect__MTL__ScissorRect(const void*, SEL, MTL::ScissorRect) __asm__("_objc_msgSend$" "setScissorRect:"); +void _MTL_msg_v_setScissorRects_count__constMTL__ScissorRectp_NS__UInteger(const void*, SEL, const MTL::ScissorRect *, NS::UInteger) __asm__("_objc_msgSend$" "setScissorRects:count:"); +void _MTL_msg_v_setScratchBufferAllocator__MTL__IOScratchBufferAllocatorp(const void*, SEL, MTL::IOScratchBufferAllocator*) __asm__("_objc_msgSend$" "setScratchBufferAllocator:"); +void _MTL_msg_v_setScreenSize__MTL__Size(const void*, SEL, MTL::Size) __asm__("_objc_msgSend$" "setScreenSize:"); +void _MTL_msg_v_setSegmentControlPointCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setSegmentControlPointCount:"); +void _MTL_msg_v_setSegmentCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setSegmentCount:"); +void _MTL_msg_v_setShaderValidation__MTL__ShaderValidation(const void*, SEL, MTL::ShaderValidation) __asm__("_objc_msgSend$" "setShaderValidation:"); +void _MTL_msg_v_setShouldMaximizeConcurrentCompilation__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setShouldMaximizeConcurrentCompilation:"); +void _MTL_msg_v_setSignaledValue__uint64_t(const void*, SEL, uint64_t) __asm__("_objc_msgSend$" "setSignaledValue:"); +void _MTL_msg_v_setSize__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setSize:"); +void _MTL_msg_v_setSlice__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setSlice:"); +void _MTL_msg_v_setSliceRange__NS__Range(const void*, SEL, NS::Range) __asm__("_objc_msgSend$" "setSliceRange:"); +void _MTL_msg_v_setSourceAlphaBlendFactor__MTL__BlendFactor(const void*, SEL, MTL::BlendFactor) __asm__("_objc_msgSend$" "setSourceAlphaBlendFactor:"); +void _MTL_msg_v_setSourceRGBBlendFactor__MTL__BlendFactor(const void*, SEL, MTL::BlendFactor) __asm__("_objc_msgSend$" "setSourceRGBBlendFactor:"); +void _MTL_msg_v_setSparsePageSize__MTL__SparsePageSize(const void*, SEL, MTL::SparsePageSize) __asm__("_objc_msgSend$" "setSparsePageSize:"); +void _MTL_msg_v_setSpecializedName__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setSpecializedName:"); +void _MTL_msg_v_setStageInRegion__MTL__Region(const void*, SEL, MTL::Region) __asm__("_objc_msgSend$" "setStageInRegion:"); +void _MTL_msg_v_setStageInRegionWithIndirectBuffer_indirectBufferOffset__MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "setStageInRegionWithIndirectBuffer:indirectBufferOffset:"); +void _MTL_msg_v_setStageInputDescriptor__MTL__StageInputOutputDescriptorp(const void*, SEL, MTL::StageInputOutputDescriptor*) __asm__("_objc_msgSend$" "setStageInputDescriptor:"); +void _MTL_msg_v_setStartOfEncoderSampleIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setStartOfEncoderSampleIndex:"); +void _MTL_msg_v_setStartOfFragmentSampleIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setStartOfFragmentSampleIndex:"); +void _MTL_msg_v_setStartOfVertexSampleIndex__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setStartOfVertexSampleIndex:"); +void _MTL_msg_v_setStencilAttachment__MTL__RenderPassStencilAttachmentDescriptorp(const void*, SEL, MTL::RenderPassStencilAttachmentDescriptor*) __asm__("_objc_msgSend$" "setStencilAttachment:"); +void _MTL_msg_v_setStencilAttachmentPixelFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setStencilAttachmentPixelFormat:"); +void _MTL_msg_v_setStencilCompareFunction__MTL__CompareFunction(const void*, SEL, MTL::CompareFunction) __asm__("_objc_msgSend$" "setStencilCompareFunction:"); +void _MTL_msg_v_setStencilFailureOperation__MTL__StencilOperation(const void*, SEL, MTL::StencilOperation) __asm__("_objc_msgSend$" "setStencilFailureOperation:"); +void _MTL_msg_v_setStencilFrontReferenceValue_backReferenceValue__uint32_t_uint32_t(const void*, SEL, uint32_t, uint32_t) __asm__("_objc_msgSend$" "setStencilFrontReferenceValue:backReferenceValue:"); +void _MTL_msg_v_setStencilReferenceValue__uint32_t(const void*, SEL, uint32_t) __asm__("_objc_msgSend$" "setStencilReferenceValue:"); +void _MTL_msg_v_setStencilResolveFilter__MTL__MultisampleStencilResolveFilter(const void*, SEL, MTL::MultisampleStencilResolveFilter) __asm__("_objc_msgSend$" "setStencilResolveFilter:"); +void _MTL_msg_v_setStencilStoreAction__MTL__StoreAction(const void*, SEL, MTL::StoreAction) __asm__("_objc_msgSend$" "setStencilStoreAction:"); +void _MTL_msg_v_setStencilStoreActionOptions__MTL__StoreActionOptions(const void*, SEL, MTL::StoreActionOptions) __asm__("_objc_msgSend$" "setStencilStoreActionOptions:"); +void _MTL_msg_v_setStepFunction__MTL__StepFunction(const void*, SEL, MTL::StepFunction) __asm__("_objc_msgSend$" "setStepFunction:"); +void _MTL_msg_v_setStepFunction__MTL__VertexStepFunction(const void*, SEL, MTL::VertexStepFunction) __asm__("_objc_msgSend$" "setStepFunction:"); +void _MTL_msg_v_setStepRate__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setStepRate:"); +void _MTL_msg_v_setStorageMode__MTL__StorageMode(const void*, SEL, MTL::StorageMode) __asm__("_objc_msgSend$" "setStorageMode:"); +void _MTL_msg_v_setStoreAction__MTL__StoreAction(const void*, SEL, MTL::StoreAction) __asm__("_objc_msgSend$" "setStoreAction:"); +void _MTL_msg_v_setStoreActionOptions__MTL__StoreActionOptions(const void*, SEL, MTL::StoreActionOptions) __asm__("_objc_msgSend$" "setStoreActionOptions:"); +void _MTL_msg_v_setStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setStride:"); +void _MTL_msg_v_setStrides__MTL__TensorExtentsp(const void*, SEL, MTL::TensorExtents*) __asm__("_objc_msgSend$" "setStrides:"); +void _MTL_msg_v_setSupportAddingBinaryFunctions__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportAddingBinaryFunctions:"); +void _MTL_msg_v_setSupportAddingFragmentBinaryFunctions__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportAddingFragmentBinaryFunctions:"); +void _MTL_msg_v_setSupportAddingVertexBinaryFunctions__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportAddingVertexBinaryFunctions:"); +void _MTL_msg_v_setSupportArgumentBuffers__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportArgumentBuffers:"); +void _MTL_msg_v_setSupportColorAttachmentMapping__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportColorAttachmentMapping:"); +void _MTL_msg_v_setSupportDynamicAttributeStride__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportDynamicAttributeStride:"); +void _MTL_msg_v_setSupportIndirectCommandBuffers__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportIndirectCommandBuffers:"); +void _MTL_msg_v_setSupportRayTracing__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSupportRayTracing:"); +void _MTL_msg_v_setSwizzle__MTL__TextureSwizzleChannels(const void*, SEL, MTL::TextureSwizzleChannels) __asm__("_objc_msgSend$" "setSwizzle:"); +void _MTL_msg_v_setTAddressMode__MTL__SamplerAddressMode(const void*, SEL, MTL::SamplerAddressMode) __asm__("_objc_msgSend$" "setTAddressMode:"); +void _MTL_msg_v_setTessellationControlPointIndexType__MTL__TessellationControlPointIndexType(const void*, SEL, MTL::TessellationControlPointIndexType) __asm__("_objc_msgSend$" "setTessellationControlPointIndexType:"); +void _MTL_msg_v_setTessellationFactorBuffer_offset_instanceStride__MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setTessellationFactorBuffer:offset:instanceStride:"); +void _MTL_msg_v_setTessellationFactorFormat__MTL__TessellationFactorFormat(const void*, SEL, MTL::TessellationFactorFormat) __asm__("_objc_msgSend$" "setTessellationFactorFormat:"); +void _MTL_msg_v_setTessellationFactorScale__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setTessellationFactorScale:"); +void _MTL_msg_v_setTessellationFactorScaleEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setTessellationFactorScaleEnabled:"); +void _MTL_msg_v_setTessellationFactorStepFunction__MTL__TessellationFactorStepFunction(const void*, SEL, MTL::TessellationFactorStepFunction) __asm__("_objc_msgSend$" "setTessellationFactorStepFunction:"); +void _MTL_msg_v_setTessellationOutputWindingOrder__MTL__Winding(const void*, SEL, MTL::Winding) __asm__("_objc_msgSend$" "setTessellationOutputWindingOrder:"); +void _MTL_msg_v_setTessellationPartitionMode__MTL__TessellationPartitionMode(const void*, SEL, MTL::TessellationPartitionMode) __asm__("_objc_msgSend$" "setTessellationPartitionMode:"); +void _MTL_msg_v_setTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setTexture:"); +void _MTL_msg_v_setTexture_atIndex__MTL__Texturep_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger) __asm__("_objc_msgSend$" "setTexture:atIndex:"); +void _MTL_msg_v_setTextureType__MTL__TextureType(const void*, SEL, MTL::TextureType) __asm__("_objc_msgSend$" "setTextureType:"); +MTL::ResourceID _MTL_msg_MTL__ResourceID_setTextureView_atIndex__MTL__Texturep_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger) __asm__("_objc_msgSend$" "setTextureView:atIndex:"); +MTL::ResourceID _MTL_msg_MTL__ResourceID_setTextureView_descriptor_atIndex__MTL__Texturep_MTL__TextureViewDescriptorp_NS__UInteger(const void*, SEL, MTL::Texture*, MTL::TextureViewDescriptor*, NS::UInteger) __asm__("_objc_msgSend$" "setTextureView:descriptor:atIndex:"); +MTL::ResourceID _MTL_msg_MTL__ResourceID_setTextureViewFromBuffer_descriptor_offset_bytesPerRow_atIndex__MTL__Bufferp_MTL__TextureDescriptorp_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, MTL::TextureDescriptor*, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setTextureViewFromBuffer:descriptor:offset:bytesPerRow:atIndex:"); +void _MTL_msg_v_setTextures_withRange__constMTL__Texturepconstp_NS__Range(const void*, SEL, const MTL::Texture* const *, NS::Range) __asm__("_objc_msgSend$" "setTextures:withRange:"); +void _MTL_msg_v_setThreadGroupSizeIsMultipleOfThreadExecutionWidth__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setThreadGroupSizeIsMultipleOfThreadExecutionWidth:"); +void _MTL_msg_v_setThreadgroupMemoryLength__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setThreadgroupMemoryLength:"); +void _MTL_msg_v_setThreadgroupMemoryLength_atIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setThreadgroupMemoryLength:atIndex:"); +void _MTL_msg_v_setThreadgroupMemoryLength_offset_atIndex__NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setThreadgroupMemoryLength:offset:atIndex:"); +void _MTL_msg_v_setThreadgroupSizeMatchesTileSize__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setThreadgroupSizeMatchesTileSize:"); +void _MTL_msg_v_setTileAccelerationStructure_atBufferIndex__MTL__AccelerationStructurep_NS__UInteger(const void*, SEL, MTL::AccelerationStructure*, NS::UInteger) __asm__("_objc_msgSend$" "setTileAccelerationStructure:atBufferIndex:"); +void _MTL_msg_v_setTileAdditionalBinaryFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setTileAdditionalBinaryFunctions:"); +void _MTL_msg_v_setTileBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setTileBuffer:offset:atIndex:"); +void _MTL_msg_v_setTileBufferOffset_atIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setTileBufferOffset:atIndex:"); +void _MTL_msg_v_setTileBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range(const void*, SEL, const MTL::Buffer* const *, const NS::UInteger *, NS::Range) __asm__("_objc_msgSend$" "setTileBuffers:offsets:withRange:"); +void _MTL_msg_v_setTileBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger(const void*, SEL, const void *, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setTileBytes:length:atIndex:"); +void _MTL_msg_v_setTileFunction__MTL__Functionp(const void*, SEL, MTL::Function*) __asm__("_objc_msgSend$" "setTileFunction:"); +void _MTL_msg_v_setTileHeight__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setTileHeight:"); +void _MTL_msg_v_setTileIntersectionFunctionTable_atBufferIndex__MTL__IntersectionFunctionTablep_NS__UInteger(const void*, SEL, MTL::IntersectionFunctionTable*, NS::UInteger) __asm__("_objc_msgSend$" "setTileIntersectionFunctionTable:atBufferIndex:"); +void _MTL_msg_v_setTileIntersectionFunctionTables_withBufferRange__constMTL__IntersectionFunctionTablepconstp_NS__Range(const void*, SEL, const MTL::IntersectionFunctionTable* const *, NS::Range) __asm__("_objc_msgSend$" "setTileIntersectionFunctionTables:withBufferRange:"); +void _MTL_msg_v_setTileSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger(const void*, SEL, MTL::SamplerState*, NS::UInteger) __asm__("_objc_msgSend$" "setTileSamplerState:atIndex:"); +void _MTL_msg_v_setTileSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger(const void*, SEL, MTL::SamplerState*, float, float, NS::UInteger) __asm__("_objc_msgSend$" "setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); +void _MTL_msg_v_setTileSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, const float *, const float *, NS::Range) __asm__("_objc_msgSend$" "setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); +void _MTL_msg_v_setTileSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, NS::Range) __asm__("_objc_msgSend$" "setTileSamplerStates:withRange:"); +void _MTL_msg_v_setTileTexture_atIndex__MTL__Texturep_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger) __asm__("_objc_msgSend$" "setTileTexture:atIndex:"); +void _MTL_msg_v_setTileTextures_withRange__constMTL__Texturepconstp_NS__Range(const void*, SEL, const MTL::Texture* const *, NS::Range) __asm__("_objc_msgSend$" "setTileTextures:withRange:"); +void _MTL_msg_v_setTileVisibleFunctionTable_atBufferIndex__MTL__VisibleFunctionTablep_NS__UInteger(const void*, SEL, MTL::VisibleFunctionTable*, NS::UInteger) __asm__("_objc_msgSend$" "setTileVisibleFunctionTable:atBufferIndex:"); +void _MTL_msg_v_setTileVisibleFunctionTables_withBufferRange__constMTL__VisibleFunctionTablepconstp_NS__Range(const void*, SEL, const MTL::VisibleFunctionTable* const *, NS::Range) __asm__("_objc_msgSend$" "setTileVisibleFunctionTables:withBufferRange:"); +void _MTL_msg_v_setTileWidth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setTileWidth:"); +void _MTL_msg_v_setTransformationMatrixBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setTransformationMatrixBuffer:"); +void _MTL_msg_v_setTransformationMatrixBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setTransformationMatrixBufferOffset:"); +void _MTL_msg_v_setTransformationMatrixLayout__MTL__MatrixLayout(const void*, SEL, MTL::MatrixLayout) __asm__("_objc_msgSend$" "setTransformationMatrixLayout:"); +void _MTL_msg_v_setTriangleCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setTriangleCount:"); +void _MTL_msg_v_setTriangleFillMode__MTL__TriangleFillMode(const void*, SEL, MTL::TriangleFillMode) __asm__("_objc_msgSend$" "setTriangleFillMode:"); +void _MTL_msg_v_setType__MTL__HeapType(const void*, SEL, MTL::HeapType) __asm__("_objc_msgSend$" "setType:"); +void _MTL_msg_v_setType__MTL__IOCommandQueueType(const void*, SEL, MTL::IOCommandQueueType) __asm__("_objc_msgSend$" "setType:"); +void _MTL_msg_v_setUrl__NS__URLp(const void*, SEL, NS::URL*) __asm__("_objc_msgSend$" "setUrl:"); +void _MTL_msg_v_setUsage__MTL__AccelerationStructureUsage(const void*, SEL, MTL::AccelerationStructureUsage) __asm__("_objc_msgSend$" "setUsage:"); +void _MTL_msg_v_setUsage__MTL__TensorUsage(const void*, SEL, MTL::TensorUsage) __asm__("_objc_msgSend$" "setUsage:"); +void _MTL_msg_v_setUsage__MTL__TextureUsage(const void*, SEL, MTL::TextureUsage) __asm__("_objc_msgSend$" "setUsage:"); +void _MTL_msg_v_setVertexAccelerationStructure_atBufferIndex__MTL__AccelerationStructurep_NS__UInteger(const void*, SEL, MTL::AccelerationStructure*, NS::UInteger) __asm__("_objc_msgSend$" "setVertexAccelerationStructure:atBufferIndex:"); +void _MTL_msg_v_setVertexAdditionalBinaryFunctions__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setVertexAdditionalBinaryFunctions:"); +void _MTL_msg_v_setVertexAmplificationCount_viewMappings__NS__UInteger_constMTL__VertexAmplificationViewMappingp(const void*, SEL, NS::UInteger, const MTL::VertexAmplificationViewMapping *) __asm__("_objc_msgSend$" "setVertexAmplificationCount:viewMappings:"); +void _MTL_msg_v_setVertexBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setVertexBuffer:"); +void _MTL_msg_v_setVertexBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setVertexBuffer:offset:atIndex:"); +void _MTL_msg_v_setVertexBuffer_offset_attributeStride_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Buffer*, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setVertexBuffer:offset:attributeStride:atIndex:"); +void _MTL_msg_v_setVertexBufferOffset__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setVertexBufferOffset:"); +void _MTL_msg_v_setVertexBufferOffset_atIndex__NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setVertexBufferOffset:atIndex:"); +void _MTL_msg_v_setVertexBufferOffset_attributeStride_atIndex__NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setVertexBufferOffset:attributeStride:atIndex:"); +void _MTL_msg_v_setVertexBuffers__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setVertexBuffers:"); +void _MTL_msg_v_setVertexBuffers_offsets_attributeStrides_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_constNS__UIntegerp_NS__Range(const void*, SEL, const MTL::Buffer* const *, const NS::UInteger *, const NS::UInteger *, NS::Range) __asm__("_objc_msgSend$" "setVertexBuffers:offsets:attributeStrides:withRange:"); +void _MTL_msg_v_setVertexBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range(const void*, SEL, const MTL::Buffer* const *, const NS::UInteger *, NS::Range) __asm__("_objc_msgSend$" "setVertexBuffers:offsets:withRange:"); +void _MTL_msg_v_setVertexBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger(const void*, SEL, const void *, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setVertexBytes:length:atIndex:"); +void _MTL_msg_v_setVertexBytes_length_attributeStride_atIndex__constvoidp_NS__UInteger_NS__UInteger_NS__UInteger(const void*, SEL, const void *, NS::UInteger, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "setVertexBytes:length:attributeStride:atIndex:"); +void _MTL_msg_v_setVertexDescriptor__MTL__VertexDescriptorp(const void*, SEL, MTL::VertexDescriptor*) __asm__("_objc_msgSend$" "setVertexDescriptor:"); +void _MTL_msg_v_setVertexFormat__MTL__AttributeFormat(const void*, SEL, MTL::AttributeFormat) __asm__("_objc_msgSend$" "setVertexFormat:"); +void _MTL_msg_v_setVertexFunction__MTL__Functionp(const void*, SEL, MTL::Function*) __asm__("_objc_msgSend$" "setVertexFunction:"); +void _MTL_msg_v_setVertexIntersectionFunctionTable_atBufferIndex__MTL__IntersectionFunctionTablep_NS__UInteger(const void*, SEL, MTL::IntersectionFunctionTable*, NS::UInteger) __asm__("_objc_msgSend$" "setVertexIntersectionFunctionTable:atBufferIndex:"); +void _MTL_msg_v_setVertexIntersectionFunctionTables_withBufferRange__constMTL__IntersectionFunctionTablepconstp_NS__Range(const void*, SEL, const MTL::IntersectionFunctionTable* const *, NS::Range) __asm__("_objc_msgSend$" "setVertexIntersectionFunctionTables:withBufferRange:"); +void _MTL_msg_v_setVertexLinkedFunctions__MTL__LinkedFunctionsp(const void*, SEL, MTL::LinkedFunctions*) __asm__("_objc_msgSend$" "setVertexLinkedFunctions:"); +void _MTL_msg_v_setVertexPreloadedLibraries__NS__Arrayp(const void*, SEL, NS::Array*) __asm__("_objc_msgSend$" "setVertexPreloadedLibraries:"); +void _MTL_msg_v_setVertexSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger(const void*, SEL, MTL::SamplerState*, NS::UInteger) __asm__("_objc_msgSend$" "setVertexSamplerState:atIndex:"); +void _MTL_msg_v_setVertexSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger(const void*, SEL, MTL::SamplerState*, float, float, NS::UInteger) __asm__("_objc_msgSend$" "setVertexSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); +void _MTL_msg_v_setVertexSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, const float *, const float *, NS::Range) __asm__("_objc_msgSend$" "setVertexSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); +void _MTL_msg_v_setVertexSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range(const void*, SEL, const MTL::SamplerState* const *, NS::Range) __asm__("_objc_msgSend$" "setVertexSamplerStates:withRange:"); +void _MTL_msg_v_setVertexStride__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setVertexStride:"); +void _MTL_msg_v_setVertexTexture_atIndex__MTL__Texturep_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger) __asm__("_objc_msgSend$" "setVertexTexture:atIndex:"); +void _MTL_msg_v_setVertexTextures_withRange__constMTL__Texturepconstp_NS__Range(const void*, SEL, const MTL::Texture* const *, NS::Range) __asm__("_objc_msgSend$" "setVertexTextures:withRange:"); +void _MTL_msg_v_setVertexVisibleFunctionTable_atBufferIndex__MTL__VisibleFunctionTablep_NS__UInteger(const void*, SEL, MTL::VisibleFunctionTable*, NS::UInteger) __asm__("_objc_msgSend$" "setVertexVisibleFunctionTable:atBufferIndex:"); +void _MTL_msg_v_setVertexVisibleFunctionTables_withBufferRange__constMTL__VisibleFunctionTablepconstp_NS__Range(const void*, SEL, const MTL::VisibleFunctionTable* const *, NS::Range) __asm__("_objc_msgSend$" "setVertexVisibleFunctionTables:withBufferRange:"); +void _MTL_msg_v_setViewport__MTL__Viewport(const void*, SEL, MTL::Viewport) __asm__("_objc_msgSend$" "setViewport:"); +void _MTL_msg_v_setViewports_count__constMTL__Viewportp_NS__UInteger(const void*, SEL, const MTL::Viewport *, NS::UInteger) __asm__("_objc_msgSend$" "setViewports:count:"); +void _MTL_msg_v_setVisibilityResultBuffer__MTL__Bufferp(const void*, SEL, MTL::Buffer*) __asm__("_objc_msgSend$" "setVisibilityResultBuffer:"); +void _MTL_msg_v_setVisibilityResultMode_offset__MTL__VisibilityResultMode_NS__UInteger(const void*, SEL, MTL::VisibilityResultMode, NS::UInteger) __asm__("_objc_msgSend$" "setVisibilityResultMode:offset:"); +void _MTL_msg_v_setVisibilityResultType__MTL__VisibilityResultType(const void*, SEL, MTL::VisibilityResultType) __asm__("_objc_msgSend$" "setVisibilityResultType:"); +void _MTL_msg_v_setVisibleFunctionTable_atBufferIndex__MTL__VisibleFunctionTablep_NS__UInteger(const void*, SEL, MTL::VisibleFunctionTable*, NS::UInteger) __asm__("_objc_msgSend$" "setVisibleFunctionTable:atBufferIndex:"); +void _MTL_msg_v_setVisibleFunctionTable_atIndex__MTL__VisibleFunctionTablep_NS__UInteger(const void*, SEL, MTL::VisibleFunctionTable*, NS::UInteger) __asm__("_objc_msgSend$" "setVisibleFunctionTable:atIndex:"); +void _MTL_msg_v_setVisibleFunctionTables_withBufferRange__constMTL__VisibleFunctionTablepconstp_NS__Range(const void*, SEL, const MTL::VisibleFunctionTable* const *, NS::Range) __asm__("_objc_msgSend$" "setVisibleFunctionTables:withBufferRange:"); +void _MTL_msg_v_setVisibleFunctionTables_withRange__constMTL__VisibleFunctionTablepconstp_NS__Range(const void*, SEL, const MTL::VisibleFunctionTable* const *, NS::Range) __asm__("_objc_msgSend$" "setVisibleFunctionTables:withRange:"); +void _MTL_msg_v_setWidth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setWidth:"); +void _MTL_msg_v_setWriteMask__MTL__ColorWriteMask(const void*, SEL, MTL::ColorWriteMask) __asm__("_objc_msgSend$" "setWriteMask:"); +void _MTL_msg_v_setWriteMask__uint32_t(const void*, SEL, uint32_t) __asm__("_objc_msgSend$" "setWriteMask:"); +MTL::ShaderValidation _MTL_msg_MTL__ShaderValidation_shaderValidation(const void*, SEL) __asm__("_objc_msgSend$" "shaderValidation"); +bool _MTL_msg_bool_shareable(const void*, SEL) __asm__("_objc_msgSend$" "shareable"); +MTL::CaptureManager* _MTL_msg_MTL__CaptureManagerp_sharedCaptureManager(const void*, SEL) __asm__("_objc_msgSend$" "sharedCaptureManager"); +MTL::SharedEventListener* _MTL_msg_MTL__SharedEventListenerp_sharedListener(const void*, SEL) __asm__("_objc_msgSend$" "sharedListener"); +bool _MTL_msg_bool_shouldMaximizeConcurrentCompilation(const void*, SEL) __asm__("_objc_msgSend$" "shouldMaximizeConcurrentCompilation"); +void _MTL_msg_v_signalEvent_value__MTL__SharedEventp_uint64_t(const void*, SEL, MTL::SharedEvent*, uint64_t) __asm__("_objc_msgSend$" "signalEvent:value:"); +uint64_t _MTL_msg_uint64_t_signaledValue(const void*, SEL) __asm__("_objc_msgSend$" "signaledValue"); +NS::UInteger _MTL_msg_NS__UInteger_size(const void*, SEL) __asm__("_objc_msgSend$" "size"); +NS::UInteger _MTL_msg_NS__UInteger_sizeOfCounterHeapEntry__MTL4__CounterHeapType(const void*, SEL, MTL4::CounterHeapType) __asm__("_objc_msgSend$" "sizeOfCounterHeapEntry:"); +NS::UInteger _MTL_msg_NS__UInteger_slice(const void*, SEL) __asm__("_objc_msgSend$" "slice"); +NS::Range _MTL_msg_NS__Range_sliceRange(const void*, SEL) __asm__("_objc_msgSend$" "sliceRange"); +MTL::BlendFactor _MTL_msg_MTL__BlendFactor_sourceAlphaBlendFactor(const void*, SEL) __asm__("_objc_msgSend$" "sourceAlphaBlendFactor"); +MTL::BlendFactor _MTL_msg_MTL__BlendFactor_sourceRGBBlendFactor(const void*, SEL) __asm__("_objc_msgSend$" "sourceRGBBlendFactor"); +MTL::BufferSparseTier _MTL_msg_MTL__BufferSparseTier_sparseBufferTier(const void*, SEL) __asm__("_objc_msgSend$" "sparseBufferTier"); +MTL::SparsePageSize _MTL_msg_MTL__SparsePageSize_sparsePageSize(const void*, SEL) __asm__("_objc_msgSend$" "sparsePageSize"); +MTL::TextureSparseTier _MTL_msg_MTL__TextureSparseTier_sparseTextureTier(const void*, SEL) __asm__("_objc_msgSend$" "sparseTextureTier"); +NS::UInteger _MTL_msg_NS__UInteger_sparseTileSizeInBytes(const void*, SEL) __asm__("_objc_msgSend$" "sparseTileSizeInBytes"); +NS::UInteger _MTL_msg_NS__UInteger_sparseTileSizeInBytesForSparsePageSize__MTL__SparsePageSize(const void*, SEL, MTL::SparsePageSize) __asm__("_objc_msgSend$" "sparseTileSizeInBytesForSparsePageSize:"); +MTL::Size _MTL_msg_MTL__Size_sparseTileSizeWithTextureType_pixelFormat_sampleCount__MTL__TextureType_MTL__PixelFormat_NS__UInteger(const void*, SEL, MTL::TextureType, MTL::PixelFormat, NS::UInteger) __asm__("_objc_msgSend$" "sparseTileSizeWithTextureType:pixelFormat:sampleCount:"); +MTL::Size _MTL_msg_MTL__Size_sparseTileSizeWithTextureType_pixelFormat_sampleCount_sparsePageSize__MTL__TextureType_MTL__PixelFormat_NS__UInteger_MTL__SparsePageSize(const void*, SEL, MTL::TextureType, MTL::PixelFormat, NS::UInteger, MTL::SparsePageSize) __asm__("_objc_msgSend$" "sparseTileSizeWithTextureType:pixelFormat:sampleCount:sparsePageSize:"); +NS::String* _MTL_msg_NS__Stringp_specializedName(const void*, SEL) __asm__("_objc_msgSend$" "specializedName"); +NS::Array* _MTL_msg_NS__Arrayp_stageInputAttributes(const void*, SEL) __asm__("_objc_msgSend$" "stageInputAttributes"); +MTL::StageInputOutputDescriptor* _MTL_msg_MTL__StageInputOutputDescriptorp_stageInputDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "stageInputDescriptor"); +MTL::StageInputOutputDescriptor* _MTL_msg_MTL__StageInputOutputDescriptorp_stageInputOutputDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "stageInputOutputDescriptor"); +void _MTL_msg_v_startCaptureWithCommandQueue__MTL__CommandQueuep(const void*, SEL, MTL::CommandQueue*) __asm__("_objc_msgSend$" "startCaptureWithCommandQueue:"); +bool _MTL_msg_bool_startCaptureWithDescriptor_error__MTL__CaptureDescriptorp_NS__Errorpp(const void*, SEL, MTL::CaptureDescriptor*, NS::Error**) __asm__("_objc_msgSend$" "startCaptureWithDescriptor:error:"); +void _MTL_msg_v_startCaptureWithDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "startCaptureWithDevice:"); +void _MTL_msg_v_startCaptureWithScope__MTL__CaptureScopep(const void*, SEL, MTL::CaptureScope*) __asm__("_objc_msgSend$" "startCaptureWithScope:"); +NS::UInteger _MTL_msg_NS__UInteger_startOfEncoderSampleIndex(const void*, SEL) __asm__("_objc_msgSend$" "startOfEncoderSampleIndex"); +NS::UInteger _MTL_msg_NS__UInteger_startOfFragmentSampleIndex(const void*, SEL) __asm__("_objc_msgSend$" "startOfFragmentSampleIndex"); +NS::UInteger _MTL_msg_NS__UInteger_startOfVertexSampleIndex(const void*, SEL) __asm__("_objc_msgSend$" "startOfVertexSampleIndex"); +NS::UInteger _MTL_msg_NS__UInteger_staticThreadgroupMemoryLength(const void*, SEL) __asm__("_objc_msgSend$" "staticThreadgroupMemoryLength"); +MTL::CommandBufferStatus _MTL_msg_MTL__CommandBufferStatus_status(const void*, SEL) __asm__("_objc_msgSend$" "status"); +MTL::IOStatus _MTL_msg_MTL__IOStatus_status(const void*, SEL) __asm__("_objc_msgSend$" "status"); +MTL::RenderPassStencilAttachmentDescriptor* _MTL_msg_MTL__RenderPassStencilAttachmentDescriptorp_stencilAttachment(const void*, SEL) __asm__("_objc_msgSend$" "stencilAttachment"); +MTL::PixelFormat _MTL_msg_MTL__PixelFormat_stencilAttachmentPixelFormat(const void*, SEL) __asm__("_objc_msgSend$" "stencilAttachmentPixelFormat"); +MTL::CompareFunction _MTL_msg_MTL__CompareFunction_stencilCompareFunction(const void*, SEL) __asm__("_objc_msgSend$" "stencilCompareFunction"); +MTL::StencilOperation _MTL_msg_MTL__StencilOperation_stencilFailureOperation(const void*, SEL) __asm__("_objc_msgSend$" "stencilFailureOperation"); +MTL::MultisampleStencilResolveFilter _MTL_msg_MTL__MultisampleStencilResolveFilter_stencilResolveFilter(const void*, SEL) __asm__("_objc_msgSend$" "stencilResolveFilter"); +MTL::StepFunction _MTL_msg_MTL__StepFunction_stepFunction(const void*, SEL) __asm__("_objc_msgSend$" "stepFunction"); +MTL::VertexStepFunction _MTL_msg_MTL__VertexStepFunction_stepFunction(const void*, SEL) __asm__("_objc_msgSend$" "stepFunction"); +NS::UInteger _MTL_msg_NS__UInteger_stepRate(const void*, SEL) __asm__("_objc_msgSend$" "stepRate"); +void _MTL_msg_v_stopCapture(const void*, SEL) __asm__("_objc_msgSend$" "stopCapture"); +MTL::StorageMode _MTL_msg_MTL__StorageMode_storageMode(const void*, SEL) __asm__("_objc_msgSend$" "storageMode"); +MTL::StoreAction _MTL_msg_MTL__StoreAction_storeAction(const void*, SEL) __asm__("_objc_msgSend$" "storeAction"); +MTL::StoreActionOptions _MTL_msg_MTL__StoreActionOptions_storeActionOptions(const void*, SEL) __asm__("_objc_msgSend$" "storeActionOptions"); +NS::UInteger _MTL_msg_NS__UInteger_stride(const void*, SEL) __asm__("_objc_msgSend$" "stride"); +MTL::TensorExtents* _MTL_msg_MTL__TensorExtentsp_strides(const void*, SEL) __asm__("_objc_msgSend$" "strides"); +MTL::StructType* _MTL_msg_MTL__StructTypep_structType(const void*, SEL) __asm__("_objc_msgSend$" "structType"); +bool _MTL_msg_bool_supportAddingBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "supportAddingBinaryFunctions"); +bool _MTL_msg_bool_supportAddingFragmentBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "supportAddingFragmentBinaryFunctions"); +bool _MTL_msg_bool_supportAddingVertexBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "supportAddingVertexBinaryFunctions"); +bool _MTL_msg_bool_supportArgumentBuffers(const void*, SEL) __asm__("_objc_msgSend$" "supportArgumentBuffers"); +bool _MTL_msg_bool_supportColorAttachmentMapping(const void*, SEL) __asm__("_objc_msgSend$" "supportColorAttachmentMapping"); +bool _MTL_msg_bool_supportDynamicAttributeStride(const void*, SEL) __asm__("_objc_msgSend$" "supportDynamicAttributeStride"); +bool _MTL_msg_bool_supportIndirectCommandBuffers(const void*, SEL) __asm__("_objc_msgSend$" "supportIndirectCommandBuffers"); +bool _MTL_msg_bool_supportRayTracing(const void*, SEL) __asm__("_objc_msgSend$" "supportRayTracing"); +bool _MTL_msg_bool_supports32BitFloatFiltering(const void*, SEL) __asm__("_objc_msgSend$" "supports32BitFloatFiltering"); +bool _MTL_msg_bool_supports32BitMSAA(const void*, SEL) __asm__("_objc_msgSend$" "supports32BitMSAA"); +bool _MTL_msg_bool_supportsBCTextureCompression(const void*, SEL) __asm__("_objc_msgSend$" "supportsBCTextureCompression"); +bool _MTL_msg_bool_supportsCounterSampling__MTL__CounterSamplingPoint(const void*, SEL, MTL::CounterSamplingPoint) __asm__("_objc_msgSend$" "supportsCounterSampling:"); +bool _MTL_msg_bool_supportsDestination__MTL__CaptureDestination(const void*, SEL, MTL::CaptureDestination) __asm__("_objc_msgSend$" "supportsDestination:"); +bool _MTL_msg_bool_supportsDynamicLibraries(const void*, SEL) __asm__("_objc_msgSend$" "supportsDynamicLibraries"); +bool _MTL_msg_bool_supportsFamily__MTL__GPUFamily(const void*, SEL, MTL::GPUFamily) __asm__("_objc_msgSend$" "supportsFamily:"); +bool _MTL_msg_bool_supportsFeatureSet__MTL__FeatureSet(const void*, SEL, MTL::FeatureSet) __asm__("_objc_msgSend$" "supportsFeatureSet:"); +bool _MTL_msg_bool_supportsFunctionPointers(const void*, SEL) __asm__("_objc_msgSend$" "supportsFunctionPointers"); +bool _MTL_msg_bool_supportsFunctionPointersFromRender(const void*, SEL) __asm__("_objc_msgSend$" "supportsFunctionPointersFromRender"); +bool _MTL_msg_bool_supportsPrimitiveMotionBlur(const void*, SEL) __asm__("_objc_msgSend$" "supportsPrimitiveMotionBlur"); +bool _MTL_msg_bool_supportsPullModelInterpolation(const void*, SEL) __asm__("_objc_msgSend$" "supportsPullModelInterpolation"); +bool _MTL_msg_bool_supportsQueryTextureLOD(const void*, SEL) __asm__("_objc_msgSend$" "supportsQueryTextureLOD"); +bool _MTL_msg_bool_supportsRasterizationRateMapWithLayerCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "supportsRasterizationRateMapWithLayerCount:"); +bool _MTL_msg_bool_supportsRaytracing(const void*, SEL) __asm__("_objc_msgSend$" "supportsRaytracing"); +bool _MTL_msg_bool_supportsRaytracingFromRender(const void*, SEL) __asm__("_objc_msgSend$" "supportsRaytracingFromRender"); +bool _MTL_msg_bool_supportsRenderDynamicLibraries(const void*, SEL) __asm__("_objc_msgSend$" "supportsRenderDynamicLibraries"); +bool _MTL_msg_bool_supportsShaderBarycentricCoordinates(const void*, SEL) __asm__("_objc_msgSend$" "supportsShaderBarycentricCoordinates"); +bool _MTL_msg_bool_supportsTextureSampleCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "supportsTextureSampleCount:"); +bool _MTL_msg_bool_supportsVertexAmplificationCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "supportsVertexAmplificationCount:"); +MTL::TextureSwizzleChannels _MTL_msg_MTL__TextureSwizzleChannels_swizzle(const void*, SEL) __asm__("_objc_msgSend$" "swizzle"); +void _MTL_msg_v_synchronizeResource__MTL__Resourcep(const void*, SEL, MTL::Resource*) __asm__("_objc_msgSend$" "synchronizeResource:"); +void _MTL_msg_v_synchronizeTexture_slice_level__MTL__Texturep_NS__UInteger_NS__UInteger(const void*, SEL, MTL::Texture*, NS::UInteger, NS::UInteger) __asm__("_objc_msgSend$" "synchronizeTexture:slice:level:"); +MTL::SamplerAddressMode _MTL_msg_MTL__SamplerAddressMode_tAddressMode(const void*, SEL) __asm__("_objc_msgSend$" "tAddressMode"); +NS::UInteger _MTL_msg_NS__UInteger_tailSizeInBytes(const void*, SEL) __asm__("_objc_msgSend$" "tailSizeInBytes"); +MTL::TensorDataType _MTL_msg_MTL__TensorDataType_tensorDataType(const void*, SEL) __asm__("_objc_msgSend$" "tensorDataType"); +MTL::TensorReferenceType* _MTL_msg_MTL__TensorReferenceTypep_tensorReferenceType(const void*, SEL) __asm__("_objc_msgSend$" "tensorReferenceType"); +MTL::SizeAndAlign _MTL_msg_MTL__SizeAndAlign_tensorSizeAndAlignWithDescriptor__MTL__TensorDescriptorp(const void*, SEL, MTL::TensorDescriptor*) __asm__("_objc_msgSend$" "tensorSizeAndAlignWithDescriptor:"); +MTL::TessellationControlPointIndexType _MTL_msg_MTL__TessellationControlPointIndexType_tessellationControlPointIndexType(const void*, SEL) __asm__("_objc_msgSend$" "tessellationControlPointIndexType"); +MTL::TessellationFactorFormat _MTL_msg_MTL__TessellationFactorFormat_tessellationFactorFormat(const void*, SEL) __asm__("_objc_msgSend$" "tessellationFactorFormat"); +bool _MTL_msg_bool_tessellationFactorScaleEnabled(const void*, SEL) __asm__("_objc_msgSend$" "tessellationFactorScaleEnabled"); +MTL::TessellationFactorStepFunction _MTL_msg_MTL__TessellationFactorStepFunction_tessellationFactorStepFunction(const void*, SEL) __asm__("_objc_msgSend$" "tessellationFactorStepFunction"); +MTL::Winding _MTL_msg_MTL__Winding_tessellationOutputWindingOrder(const void*, SEL) __asm__("_objc_msgSend$" "tessellationOutputWindingOrder"); +MTL::TessellationPartitionMode _MTL_msg_MTL__TessellationPartitionMode_tessellationPartitionMode(const void*, SEL) __asm__("_objc_msgSend$" "tessellationPartitionMode"); +MTL::Texture* _MTL_msg_MTL__Texturep_texture(const void*, SEL) __asm__("_objc_msgSend$" "texture"); +MTL::TextureDescriptor* _MTL_msg_MTL__TextureDescriptorp_texture2DDescriptorWithPixelFormat_width_height_mipmapped__MTL__PixelFormat_NS__UInteger_NS__UInteger_bool(const void*, SEL, MTL::PixelFormat, NS::UInteger, NS::UInteger, bool) __asm__("_objc_msgSend$" "texture2DDescriptorWithPixelFormat:width:height:mipmapped:"); +void _MTL_msg_v_textureBarrier(const void*, SEL) __asm__("_objc_msgSend$" "textureBarrier"); +MTL::TextureDescriptor* _MTL_msg_MTL__TextureDescriptorp_textureBufferDescriptorWithPixelFormat_width_resourceOptions_usage__MTL__PixelFormat_NS__UInteger_MTL__ResourceOptions_MTL__TextureUsage(const void*, SEL, MTL::PixelFormat, NS::UInteger, MTL::ResourceOptions, MTL::TextureUsage) __asm__("_objc_msgSend$" "textureBufferDescriptorWithPixelFormat:width:resourceOptions:usage:"); +MTL::TextureDescriptor* _MTL_msg_MTL__TextureDescriptorp_textureCubeDescriptorWithPixelFormat_size_mipmapped__MTL__PixelFormat_NS__UInteger_bool(const void*, SEL, MTL::PixelFormat, NS::UInteger, bool) __asm__("_objc_msgSend$" "textureCubeDescriptorWithPixelFormat:size:mipmapped:"); +MTL::DataType _MTL_msg_MTL__DataType_textureDataType(const void*, SEL) __asm__("_objc_msgSend$" "textureDataType"); +MTL::TextureReferenceType* _MTL_msg_MTL__TextureReferenceTypep_textureReferenceType(const void*, SEL) __asm__("_objc_msgSend$" "textureReferenceType"); +MTL::TextureType _MTL_msg_MTL__TextureType_textureType(const void*, SEL) __asm__("_objc_msgSend$" "textureType"); +NS::UInteger _MTL_msg_NS__UInteger_threadExecutionWidth(const void*, SEL) __asm__("_objc_msgSend$" "threadExecutionWidth"); +bool _MTL_msg_bool_threadGroupSizeIsMultipleOfThreadExecutionWidth(const void*, SEL) __asm__("_objc_msgSend$" "threadGroupSizeIsMultipleOfThreadExecutionWidth"); +NS::UInteger _MTL_msg_NS__UInteger_threadgroupMemoryAlignment(const void*, SEL) __asm__("_objc_msgSend$" "threadgroupMemoryAlignment"); +NS::UInteger _MTL_msg_NS__UInteger_threadgroupMemoryDataSize(const void*, SEL) __asm__("_objc_msgSend$" "threadgroupMemoryDataSize"); +NS::UInteger _MTL_msg_NS__UInteger_threadgroupMemoryLength(const void*, SEL) __asm__("_objc_msgSend$" "threadgroupMemoryLength"); +bool _MTL_msg_bool_threadgroupSizeMatchesTileSize(const void*, SEL) __asm__("_objc_msgSend$" "threadgroupSizeMatchesTileSize"); +NS::Array* _MTL_msg_NS__Arrayp_tileAdditionalBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "tileAdditionalBinaryFunctions"); +NS::Array* _MTL_msg_NS__Arrayp_tileArguments(const void*, SEL) __asm__("_objc_msgSend$" "tileArguments"); +NS::Array* _MTL_msg_NS__Arrayp_tileBindings(const void*, SEL) __asm__("_objc_msgSend$" "tileBindings"); +MTL::PipelineBufferDescriptorArray* _MTL_msg_MTL__PipelineBufferDescriptorArrayp_tileBuffers(const void*, SEL) __asm__("_objc_msgSend$" "tileBuffers"); +MTL::Function* _MTL_msg_MTL__Functionp_tileFunction(const void*, SEL) __asm__("_objc_msgSend$" "tileFunction"); +NS::UInteger _MTL_msg_NS__UInteger_tileHeight(const void*, SEL) __asm__("_objc_msgSend$" "tileHeight"); +NS::UInteger _MTL_msg_NS__UInteger_tileWidth(const void*, SEL) __asm__("_objc_msgSend$" "tileWidth"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_transformationMatrixBuffer(const void*, SEL) __asm__("_objc_msgSend$" "transformationMatrixBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_transformationMatrixBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "transformationMatrixBufferOffset"); +MTL::MatrixLayout _MTL_msg_MTL__MatrixLayout_transformationMatrixLayout(const void*, SEL) __asm__("_objc_msgSend$" "transformationMatrixLayout"); +NS::UInteger _MTL_msg_NS__UInteger_triangleCount(const void*, SEL) __asm__("_objc_msgSend$" "triangleCount"); +void _MTL_msg_v_tryCancel(const void*, SEL) __asm__("_objc_msgSend$" "tryCancel"); +MTL::ArgumentType _MTL_msg_MTL__ArgumentType_type(const void*, SEL) __asm__("_objc_msgSend$" "type"); +MTL::BindingType _MTL_msg_MTL__BindingType_type(const void*, SEL) __asm__("_objc_msgSend$" "type"); +MTL::DataType _MTL_msg_MTL__DataType_type(const void*, SEL) __asm__("_objc_msgSend$" "type"); +MTL::FunctionLogType _MTL_msg_MTL__FunctionLogType_type(const void*, SEL) __asm__("_objc_msgSend$" "type"); +MTL::HeapType _MTL_msg_MTL__HeapType_type(const void*, SEL) __asm__("_objc_msgSend$" "type"); +MTL::IOCommandQueueType _MTL_msg_MTL__IOCommandQueueType_type(const void*, SEL) __asm__("_objc_msgSend$" "type"); +MTL::LibraryType _MTL_msg_MTL__LibraryType_type(const void*, SEL) __asm__("_objc_msgSend$" "type"); +void _MTL_msg_v_updateFence__MTL__Fencep(const void*, SEL, MTL::Fence*) __asm__("_objc_msgSend$" "updateFence:"); +void _MTL_msg_v_updateFence_afterStages__MTL__Fencep_MTL__RenderStages(const void*, SEL, MTL::Fence*, MTL::RenderStages) __asm__("_objc_msgSend$" "updateFence:afterStages:"); +void _MTL_msg_v_updateTextureMapping_mode_indirectBuffer_indirectBufferOffset__MTL__Texturep_MTL__SparseTextureMappingModeconst_MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::Texture*, MTL::SparseTextureMappingMode const, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "updateTextureMapping:mode:indirectBuffer:indirectBufferOffset:"); +void _MTL_msg_v_updateTextureMapping_mode_region_mipLevel_slice__MTL__Texturep_MTL__SparseTextureMappingModeconst_MTL__Regionconst_NS__UIntegerconst_NS__UIntegerconst(const void*, SEL, MTL::Texture*, MTL::SparseTextureMappingMode const, MTL::Region const, NS::UInteger const, NS::UInteger const) __asm__("_objc_msgSend$" "updateTextureMapping:mode:region:mipLevel:slice:"); +void _MTL_msg_v_updateTextureMappings_mode_regions_mipLevels_slices_numRegions__MTL__Texturep_MTL__SparseTextureMappingModeconst_constMTL__Regionp_constNS__UIntegerp_constNS__UIntegerp_NS__UInteger(const void*, SEL, MTL::Texture*, MTL::SparseTextureMappingMode const, const MTL::Region *, const NS::UInteger *, const NS::UInteger *, NS::UInteger) __asm__("_objc_msgSend$" "updateTextureMappings:mode:regions:mipLevels:slices:numRegions:"); +NS::URL* _MTL_msg_NS__URLp_url(const void*, SEL) __asm__("_objc_msgSend$" "url"); +MTL::AccelerationStructureUsage _MTL_msg_MTL__AccelerationStructureUsage_usage(const void*, SEL) __asm__("_objc_msgSend$" "usage"); +MTL::TensorUsage _MTL_msg_MTL__TensorUsage_usage(const void*, SEL) __asm__("_objc_msgSend$" "usage"); +MTL::TextureUsage _MTL_msg_MTL__TextureUsage_usage(const void*, SEL) __asm__("_objc_msgSend$" "usage"); +void _MTL_msg_v_useHeap__MTL__Heapp(const void*, SEL, MTL::Heap*) __asm__("_objc_msgSend$" "useHeap:"); +void _MTL_msg_v_useHeap_stages__MTL__Heapp_MTL__RenderStages(const void*, SEL, MTL::Heap*, MTL::RenderStages) __asm__("_objc_msgSend$" "useHeap:stages:"); +void _MTL_msg_v_useHeaps_count__constMTL__Heappconstp_NS__UInteger(const void*, SEL, const MTL::Heap* const *, NS::UInteger) __asm__("_objc_msgSend$" "useHeaps:count:"); +void _MTL_msg_v_useHeaps_count_stages__constMTL__Heappconstp_NS__UInteger_MTL__RenderStages(const void*, SEL, const MTL::Heap* const *, NS::UInteger, MTL::RenderStages) __asm__("_objc_msgSend$" "useHeaps:count:stages:"); +void _MTL_msg_v_useResidencySet__MTL__ResidencySetp(const void*, SEL, MTL::ResidencySet*) __asm__("_objc_msgSend$" "useResidencySet:"); +void _MTL_msg_v_useResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger(const void*, SEL, const MTL::ResidencySet* const *, NS::UInteger) __asm__("_objc_msgSend$" "useResidencySets:count:"); +void _MTL_msg_v_useResource_usage__MTL__Resourcep_MTL__ResourceUsage(const void*, SEL, MTL::Resource*, MTL::ResourceUsage) __asm__("_objc_msgSend$" "useResource:usage:"); +void _MTL_msg_v_useResource_usage_stages__MTL__Resourcep_MTL__ResourceUsage_MTL__RenderStages(const void*, SEL, MTL::Resource*, MTL::ResourceUsage, MTL::RenderStages) __asm__("_objc_msgSend$" "useResource:usage:stages:"); +void _MTL_msg_v_useResources_count_usage__constMTL__Resourcepconstp_NS__UInteger_MTL__ResourceUsage(const void*, SEL, const MTL::Resource* const *, NS::UInteger, MTL::ResourceUsage) __asm__("_objc_msgSend$" "useResources:count:usage:"); +void _MTL_msg_v_useResources_count_usage_stages__constMTL__Resourcepconstp_NS__UInteger_MTL__ResourceUsage_MTL__RenderStages(const void*, SEL, const MTL::Resource* const *, NS::UInteger, MTL::ResourceUsage, MTL::RenderStages) __asm__("_objc_msgSend$" "useResources:count:usage:stages:"); +bool _MTL_msg_bool_used(const void*, SEL) __asm__("_objc_msgSend$" "used"); +NS::UInteger _MTL_msg_NS__UInteger_usedSize(const void*, SEL) __asm__("_objc_msgSend$" "usedSize"); +NS::Array* _MTL_msg_NS__Arrayp_vertexAdditionalBinaryFunctions(const void*, SEL) __asm__("_objc_msgSend$" "vertexAdditionalBinaryFunctions"); +NS::Array* _MTL_msg_NS__Arrayp_vertexArguments(const void*, SEL) __asm__("_objc_msgSend$" "vertexArguments"); +NS::Array* _MTL_msg_NS__Arrayp_vertexAttributes(const void*, SEL) __asm__("_objc_msgSend$" "vertexAttributes"); +NS::Array* _MTL_msg_NS__Arrayp_vertexBindings(const void*, SEL) __asm__("_objc_msgSend$" "vertexBindings"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_vertexBuffer(const void*, SEL) __asm__("_objc_msgSend$" "vertexBuffer"); +NS::UInteger _MTL_msg_NS__UInteger_vertexBufferOffset(const void*, SEL) __asm__("_objc_msgSend$" "vertexBufferOffset"); +MTL::PipelineBufferDescriptorArray* _MTL_msg_MTL__PipelineBufferDescriptorArrayp_vertexBuffers(const void*, SEL) __asm__("_objc_msgSend$" "vertexBuffers"); +NS::Array* _MTL_msg_NS__Arrayp_vertexBuffers(const void*, SEL) __asm__("_objc_msgSend$" "vertexBuffers"); +MTL::VertexDescriptor* _MTL_msg_MTL__VertexDescriptorp_vertexDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "vertexDescriptor"); +MTL::AttributeFormat _MTL_msg_MTL__AttributeFormat_vertexFormat(const void*, SEL) __asm__("_objc_msgSend$" "vertexFormat"); +MTL::Function* _MTL_msg_MTL__Functionp_vertexFunction(const void*, SEL) __asm__("_objc_msgSend$" "vertexFunction"); +MTL::LinkedFunctions* _MTL_msg_MTL__LinkedFunctionsp_vertexLinkedFunctions(const void*, SEL) __asm__("_objc_msgSend$" "vertexLinkedFunctions"); +NS::Array* _MTL_msg_NS__Arrayp_vertexPreloadedLibraries(const void*, SEL) __asm__("_objc_msgSend$" "vertexPreloadedLibraries"); +NS::UInteger _MTL_msg_NS__UInteger_vertexStride(const void*, SEL) __asm__("_objc_msgSend$" "vertexStride"); +MTL::RasterizationRateSampleArray* _MTL_msg_MTL__RasterizationRateSampleArrayp_vertical(const void*, SEL) __asm__("_objc_msgSend$" "vertical"); +float * _MTL_msg_floatp_verticalSampleStorage(const void*, SEL) __asm__("_objc_msgSend$" "verticalSampleStorage"); +MTL::Buffer* _MTL_msg_MTL__Bufferp_visibilityResultBuffer(const void*, SEL) __asm__("_objc_msgSend$" "visibilityResultBuffer"); +MTL::VisibilityResultType _MTL_msg_MTL__VisibilityResultType_visibilityResultType(const void*, SEL) __asm__("_objc_msgSend$" "visibilityResultType"); +MTL::VisibleFunctionTableDescriptor* _MTL_msg_MTL__VisibleFunctionTableDescriptorp_visibleFunctionTableDescriptor(const void*, SEL) __asm__("_objc_msgSend$" "visibleFunctionTableDescriptor"); +void _MTL_msg_v_waitForEvent_value__MTL__SharedEventp_uint64_t(const void*, SEL, MTL::SharedEvent*, uint64_t) __asm__("_objc_msgSend$" "waitForEvent:value:"); +void _MTL_msg_v_waitForFence__MTL__Fencep(const void*, SEL, MTL::Fence*) __asm__("_objc_msgSend$" "waitForFence:"); +void _MTL_msg_v_waitForFence_beforeStages__MTL__Fencep_MTL__RenderStages(const void*, SEL, MTL::Fence*, MTL::RenderStages) __asm__("_objc_msgSend$" "waitForFence:beforeStages:"); +void _MTL_msg_v_waitUntilCompleted(const void*, SEL) __asm__("_objc_msgSend$" "waitUntilCompleted"); +void _MTL_msg_v_waitUntilScheduled(const void*, SEL) __asm__("_objc_msgSend$" "waitUntilScheduled"); +bool _MTL_msg_bool_waitUntilSignaledValue_timeoutMS__uint64_t_uint64_t(const void*, SEL, uint64_t, uint64_t) __asm__("_objc_msgSend$" "waitUntilSignaledValue:timeoutMS:"); +NS::UInteger _MTL_msg_NS__UInteger_width(const void*, SEL) __asm__("_objc_msgSend$" "width"); +void _MTL_msg_v_writeCompactedAccelerationStructureSize_toBuffer_offset__MTL__AccelerationStructurep_MTL__Bufferp_NS__UInteger(const void*, SEL, MTL::AccelerationStructure*, MTL::Buffer*, NS::UInteger) __asm__("_objc_msgSend$" "writeCompactedAccelerationStructureSize:toBuffer:offset:"); +void _MTL_msg_v_writeCompactedAccelerationStructureSize_toBuffer_offset_sizeDataType__MTL__AccelerationStructurep_MTL__Bufferp_NS__UInteger_MTL__DataType(const void*, SEL, MTL::AccelerationStructure*, MTL::Buffer*, NS::UInteger, MTL::DataType) __asm__("_objc_msgSend$" "writeCompactedAccelerationStructureSize:toBuffer:offset:sizeDataType:"); +MTL::ColorWriteMask _MTL_msg_MTL__ColorWriteMask_writeMask(const void*, SEL) __asm__("_objc_msgSend$" "writeMask"); +uint32_t _MTL_msg_uint32_t_writeMask(const void*, SEL) __asm__("_objc_msgSend$" "writeMask"); +} // extern "C" + +#pragma clang diagnostic pop diff --git a/thirdparty/metal-cpp/Metal/MTLBuffer.hpp b/thirdparty/metal-cpp/Metal/MTLBuffer.hpp index a93be1b06929..3332db09f022 100644 --- a/thirdparty/metal-cpp/Metal/MTLBuffer.hpp +++ b/thirdparty/metal-cpp/Metal/MTLBuffer.hpp @@ -1,119 +1,104 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLBuffer.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLGPUAddress.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLResource.hpp" +namespace MTL { + class Device; + class Tensor; + class TensorDescriptor; + class Texture; + class TextureDescriptor; + enum BufferSparseTier : NS::Integer; +} +namespace NS { + class Error; + class String; +} + namespace MTL { -class Buffer; -class Device; -class Tensor; -class TensorDescriptor; -class Texture; -class TextureDescriptor; - -class Buffer : public NS::Referencing + +class Buffer : public NS::Referencing { public: - void addDebugMarker(const NS::String* marker, NS::Range range); - - void* contents(); + void addDebugMarker(NS::String* marker, NS::Range range); + void * contents(); + void didModifyRange(NS::Range range); + MTL::GPUAddress gpuAddress() const; + NS::UInteger length() const; + MTL::Buffer* newRemoteBufferView(MTL::Device* device); + MTL::Tensor* newTensor(MTL::TensorDescriptor* descriptor, NS::UInteger offset, NS::Error** error); + MTL::Texture* newTexture(MTL::TextureDescriptor* descriptor, NS::UInteger offset, NS::UInteger bytesPerRow); + MTL::Buffer* remoteStorageBuffer() const; + void removeAllDebugMarkers(); + MTL::BufferSparseTier sparseBufferTier() const; - void didModifyRange(NS::Range range); - - GPUAddress gpuAddress() const; - - NS::UInteger length() const; - - Buffer* newRemoteBufferViewForDevice(const MTL::Device* device); - - Tensor* newTensor(const MTL::TensorDescriptor* descriptor, NS::UInteger offset, NS::Error** error); - - Texture* newTexture(const MTL::TextureDescriptor* descriptor, NS::UInteger offset, NS::UInteger bytesPerRow); +}; - Buffer* remoteStorageBuffer() const; +} // namespace MTL - void removeAllDebugMarkers(); +// --- Class symbols + inline implementations --- - BufferSparseTier sparseBufferTier() const; -}; +extern "C" void *OBJC_CLASS_$_MTLBuffer; -} -_MTL_INLINE void MTL::Buffer::addDebugMarker(const NS::String* marker, NS::Range range) +_MTL_INLINE NS::UInteger MTL::Buffer::length() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addDebugMarker_range_), marker, range); + return _MTL_msg_NS__UInteger_length((const void*)this, nullptr); } -_MTL_INLINE void* MTL::Buffer::contents() +_MTL_INLINE MTL::Buffer* MTL::Buffer::remoteStorageBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(contents)); + return _MTL_msg_MTL__Bufferp_remoteStorageBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL::Buffer::didModifyRange(NS::Range range) +_MTL_INLINE MTL::GPUAddress MTL::Buffer::gpuAddress() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(didModifyRange_), range); + return _MTL_msg_MTL__GPUAddress_gpuAddress((const void*)this, nullptr); } -_MTL_INLINE MTL::GPUAddress MTL::Buffer::gpuAddress() const +_MTL_INLINE MTL::BufferSparseTier MTL::Buffer::sparseBufferTier() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuAddress)); + return _MTL_msg_MTL__BufferSparseTier_sparseBufferTier((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Buffer::length() const +_MTL_INLINE void * MTL::Buffer::contents() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(length)); + return _MTL_msg_voidp_contents((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::Buffer::newRemoteBufferViewForDevice(const MTL::Device* device) +_MTL_INLINE void MTL::Buffer::didModifyRange(NS::Range range) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRemoteBufferViewForDevice_), device); + _MTL_msg_v_didModifyRange__NS__Range((const void*)this, nullptr, range); } -_MTL_INLINE MTL::Tensor* MTL::Buffer::newTensor(const MTL::TensorDescriptor* descriptor, NS::UInteger offset, NS::Error** error) +_MTL_INLINE MTL::Texture* MTL::Buffer::newTexture(MTL::TextureDescriptor* descriptor, NS::UInteger offset, NS::UInteger bytesPerRow) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTensorWithDescriptor_offset_error_), descriptor, offset, error); + return _MTL_msg_MTL__Texturep_newTextureWithDescriptor_offset_bytesPerRow__MTL__TextureDescriptorp_NS__UInteger_NS__UInteger((const void*)this, nullptr, descriptor, offset, bytesPerRow); } -_MTL_INLINE MTL::Texture* MTL::Buffer::newTexture(const MTL::TextureDescriptor* descriptor, NS::UInteger offset, NS::UInteger bytesPerRow) +_MTL_INLINE MTL::Tensor* MTL::Buffer::newTensor(MTL::TensorDescriptor* descriptor, NS::UInteger offset, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_offset_bytesPerRow_), descriptor, offset, bytesPerRow); + return _MTL_msg_MTL__Tensorp_newTensorWithDescriptor_offset_error__MTL__TensorDescriptorp_NS__UInteger_NS__Errorpp((const void*)this, nullptr, descriptor, offset, error); } -_MTL_INLINE MTL::Buffer* MTL::Buffer::remoteStorageBuffer() const +_MTL_INLINE void MTL::Buffer::addDebugMarker(NS::String* marker, NS::Range range) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(remoteStorageBuffer)); + _MTL_msg_v_addDebugMarker_range__NS__Stringp_NS__Range((const void*)this, nullptr, marker, range); } _MTL_INLINE void MTL::Buffer::removeAllDebugMarkers() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(removeAllDebugMarkers)); + _MTL_msg_v_removeAllDebugMarkers((const void*)this, nullptr); } -_MTL_INLINE MTL::BufferSparseTier MTL::Buffer::sparseBufferTier() const +_MTL_INLINE MTL::Buffer* MTL::Buffer::newRemoteBufferView(MTL::Device* device) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sparseBufferTier)); + return _MTL_msg_MTL__Bufferp_newRemoteBufferViewForDevice__MTL__Devicep((const void*)this, nullptr, device); } diff --git a/thirdparty/metal-cpp/Metal/MTLCaptureManager.hpp b/thirdparty/metal-cpp/Metal/MTLCaptureManager.hpp index a762241830f9..416670697846 100644 --- a/thirdparty/metal-cpp/Metal/MTLCaptureManager.hpp +++ b/thirdparty/metal-cpp/Metal/MTLCaptureManager.hpp @@ -1,46 +1,31 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLCaptureManager.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" -namespace MTL -{ -class CaptureDescriptor; -class CaptureManager; -class CaptureScope; -class CommandQueue; -class Device; +namespace MTL { + class CaptureScope; + class CommandQueue; + class Device; } - -namespace MTL4 -{ -class CommandQueue; +namespace MTL4 { + class CommandQueue; +} +namespace NS { + class Error; + class Object; + class URL; } namespace MTL { + +extern NS::ErrorDomain const CaptureErrorDomain __asm__("_MTLCaptureErrorDomain"); _MTL_ENUM(NS::Integer, CaptureError) { CaptureErrorNotSupported = 1, CaptureErrorAlreadyCapturing = 2, @@ -52,166 +37,166 @@ _MTL_ENUM(NS::Integer, CaptureDestination) { CaptureDestinationGPUTraceDocument = 2, }; + +class CaptureDescriptor; +class CaptureManager; + class CaptureDescriptor : public NS::Copying { public: static CaptureDescriptor* alloc(); + CaptureDescriptor* init() const; - NS::Object* captureObject() const; - - CaptureDestination destination() const; - - CaptureDescriptor* init(); - - NS::URL* outputURL() const; - - void setCaptureObject(NS::Object* captureObject); - - void setDestination(MTL::CaptureDestination destination); + NS::Object* captureObject() const; + MTL::CaptureDestination destination() const; + NS::URL* outputURL() const; + void setCaptureObject(NS::Object* captureObject); + void setDestination(MTL::CaptureDestination destination); + void setOutputURL(NS::URL* outputURL); - void setOutputURL(const NS::URL* outputURL); }; + class CaptureManager : public NS::Referencing { public: static CaptureManager* alloc(); + CaptureManager* init() const; + + static MTL::CaptureManager* sharedCaptureManager(); + + MTL::CaptureScope* defaultCaptureScope() const; + bool isCapturing() const; + MTL::CaptureScope* newCaptureScope(MTL::Device* device); + MTL::CaptureScope* newCaptureScope(MTL::CommandQueue* commandQueue); + MTL::CaptureScope* newCaptureScope(MTL4::CommandQueue* commandQueue); + void setDefaultCaptureScope(MTL::CaptureScope* defaultCaptureScope); + bool startCapture(MTL::CaptureDescriptor* descriptor, NS::Error** error); + void startCapture(MTL::Device* device); + void startCapture(MTL::CommandQueue* commandQueue); + void startCapture(MTL::CaptureScope* captureScope); + void stopCapture(); + bool supportsDestination(MTL::CaptureDestination destination); - CaptureScope* defaultCaptureScope() const; - - CaptureManager* init(); - - bool isCapturing() const; - - CaptureScope* newCaptureScope(const MTL::Device* device); - CaptureScope* newCaptureScope(const MTL::CommandQueue* commandQueue); - CaptureScope* newCaptureScope(const MTL4::CommandQueue* commandQueue); - - void setDefaultCaptureScope(const MTL::CaptureScope* defaultCaptureScope); - - static CaptureManager* sharedCaptureManager(); +}; - bool startCapture(const MTL::CaptureDescriptor* descriptor, NS::Error** error); - void startCapture(const MTL::Device* device); - void startCapture(const MTL::CommandQueue* commandQueue); - void startCapture(const MTL::CaptureScope* captureScope); +} // namespace MTL - void stopCapture(); +// --- Class symbols + inline implementations --- - bool supportsDestination(MTL::CaptureDestination destination); -}; +extern "C" void *OBJC_CLASS_$_MTLCaptureDescriptor; +extern "C" void *OBJC_CLASS_$_MTLCaptureManager; -} _MTL_INLINE MTL::CaptureDescriptor* MTL::CaptureDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLCaptureDescriptor)); + return _MTL_msg_MTL__CaptureDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLCaptureDescriptor, nullptr); } -_MTL_INLINE NS::Object* MTL::CaptureDescriptor::captureObject() const +_MTL_INLINE MTL::CaptureDescriptor* MTL::CaptureDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(captureObject)); + return _MTL_msg_MTL__CaptureDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::CaptureDestination MTL::CaptureDescriptor::destination() const +_MTL_INLINE NS::Object* MTL::CaptureDescriptor::captureObject() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(destination)); + return _MTL_msg_NS__Objectp_captureObject((const void*)this, nullptr); } -_MTL_INLINE MTL::CaptureDescriptor* MTL::CaptureDescriptor::init() +_MTL_INLINE void MTL::CaptureDescriptor::setCaptureObject(NS::Object* captureObject) { - return NS::Object::init(); + _MTL_msg_v_setCaptureObject__NS__Objectp((const void*)this, nullptr, captureObject); } -_MTL_INLINE NS::URL* MTL::CaptureDescriptor::outputURL() const +_MTL_INLINE MTL::CaptureDestination MTL::CaptureDescriptor::destination() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(outputURL)); + return _MTL_msg_MTL__CaptureDestination_destination((const void*)this, nullptr); } -_MTL_INLINE void MTL::CaptureDescriptor::setCaptureObject(NS::Object* captureObject) +_MTL_INLINE void MTL::CaptureDescriptor::setDestination(MTL::CaptureDestination destination) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCaptureObject_), captureObject); + _MTL_msg_v_setDestination__MTL__CaptureDestination((const void*)this, nullptr, destination); } -_MTL_INLINE void MTL::CaptureDescriptor::setDestination(MTL::CaptureDestination destination) +_MTL_INLINE NS::URL* MTL::CaptureDescriptor::outputURL() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDestination_), destination); + return _MTL_msg_NS__URLp_outputURL((const void*)this, nullptr); } -_MTL_INLINE void MTL::CaptureDescriptor::setOutputURL(const NS::URL* outputURL) +_MTL_INLINE void MTL::CaptureDescriptor::setOutputURL(NS::URL* outputURL) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOutputURL_), outputURL); + _MTL_msg_v_setOutputURL__NS__URLp((const void*)this, nullptr, outputURL); } _MTL_INLINE MTL::CaptureManager* MTL::CaptureManager::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLCaptureManager)); + return _MTL_msg_MTL__CaptureManagerp_alloc((const void*)&OBJC_CLASS_$_MTLCaptureManager, nullptr); } -_MTL_INLINE MTL::CaptureScope* MTL::CaptureManager::defaultCaptureScope() const +_MTL_INLINE MTL::CaptureManager* MTL::CaptureManager::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(defaultCaptureScope)); + return _MTL_msg_MTL__CaptureManagerp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::CaptureManager* MTL::CaptureManager::init() +_MTL_INLINE MTL::CaptureManager* MTL::CaptureManager::sharedCaptureManager() { - return NS::Object::init(); + return _MTL_msg_MTL__CaptureManagerp_sharedCaptureManager((const void*)&OBJC_CLASS_$_MTLCaptureManager, nullptr); } -_MTL_INLINE bool MTL::CaptureManager::isCapturing() const +_MTL_INLINE MTL::CaptureScope* MTL::CaptureManager::defaultCaptureScope() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isCapturing)); + return _MTL_msg_MTL__CaptureScopep_defaultCaptureScope((const void*)this, nullptr); } -_MTL_INLINE MTL::CaptureScope* MTL::CaptureManager::newCaptureScope(const MTL::Device* device) +_MTL_INLINE void MTL::CaptureManager::setDefaultCaptureScope(MTL::CaptureScope* defaultCaptureScope) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCaptureScopeWithDevice_), device); + _MTL_msg_v_setDefaultCaptureScope__MTL__CaptureScopep((const void*)this, nullptr, defaultCaptureScope); } -_MTL_INLINE MTL::CaptureScope* MTL::CaptureManager::newCaptureScope(const MTL::CommandQueue* commandQueue) +_MTL_INLINE bool MTL::CaptureManager::isCapturing() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCaptureScopeWithCommandQueue_), commandQueue); + return _MTL_msg_bool_isCapturing((const void*)this, nullptr); } -_MTL_INLINE MTL::CaptureScope* MTL::CaptureManager::newCaptureScope(const MTL4::CommandQueue* commandQueue) +_MTL_INLINE MTL::CaptureScope* MTL::CaptureManager::newCaptureScope(MTL::Device* device) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCaptureScopeWithMTL4CommandQueue_), commandQueue); + return _MTL_msg_MTL__CaptureScopep_newCaptureScopeWithDevice__MTL__Devicep((const void*)this, nullptr, device); } -_MTL_INLINE void MTL::CaptureManager::setDefaultCaptureScope(const MTL::CaptureScope* defaultCaptureScope) +_MTL_INLINE MTL::CaptureScope* MTL::CaptureManager::newCaptureScope(MTL::CommandQueue* commandQueue) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDefaultCaptureScope_), defaultCaptureScope); + return _MTL_msg_MTL__CaptureScopep_newCaptureScopeWithCommandQueue__MTL__CommandQueuep((const void*)this, nullptr, commandQueue); } -_MTL_INLINE MTL::CaptureManager* MTL::CaptureManager::sharedCaptureManager() +_MTL_INLINE MTL::CaptureScope* MTL::CaptureManager::newCaptureScope(MTL4::CommandQueue* commandQueue) { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLCaptureManager), _MTL_PRIVATE_SEL(sharedCaptureManager)); + return _MTL_msg_MTL__CaptureScopep_newCaptureScopeWithMTL4CommandQueue__MTL4__CommandQueuep((const void*)this, nullptr, commandQueue); } -_MTL_INLINE bool MTL::CaptureManager::startCapture(const MTL::CaptureDescriptor* descriptor, NS::Error** error) +_MTL_INLINE bool MTL::CaptureManager::supportsDestination(MTL::CaptureDestination destination) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(startCaptureWithDescriptor_error_), descriptor, error); + return _MTL_msg_bool_supportsDestination__MTL__CaptureDestination((const void*)this, nullptr, destination); } -_MTL_INLINE void MTL::CaptureManager::startCapture(const MTL::Device* device) +_MTL_INLINE bool MTL::CaptureManager::startCapture(MTL::CaptureDescriptor* descriptor, NS::Error** error) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(startCaptureWithDevice_), device); + return _MTL_msg_bool_startCaptureWithDescriptor_error__MTL__CaptureDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE void MTL::CaptureManager::startCapture(const MTL::CommandQueue* commandQueue) +_MTL_INLINE void MTL::CaptureManager::startCapture(MTL::Device* device) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(startCaptureWithCommandQueue_), commandQueue); + _MTL_msg_v_startCaptureWithDevice__MTL__Devicep((const void*)this, nullptr, device); } -_MTL_INLINE void MTL::CaptureManager::startCapture(const MTL::CaptureScope* captureScope) +_MTL_INLINE void MTL::CaptureManager::startCapture(MTL::CommandQueue* commandQueue) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(startCaptureWithScope_), captureScope); + _MTL_msg_v_startCaptureWithCommandQueue__MTL__CommandQueuep((const void*)this, nullptr, commandQueue); } -_MTL_INLINE void MTL::CaptureManager::stopCapture() +_MTL_INLINE void MTL::CaptureManager::startCapture(MTL::CaptureScope* captureScope) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(stopCapture)); + _MTL_msg_v_startCaptureWithScope__MTL__CaptureScopep((const void*)this, nullptr, captureScope); } -_MTL_INLINE bool MTL::CaptureManager::supportsDestination(MTL::CaptureDestination destination) +_MTL_INLINE void MTL::CaptureManager::stopCapture() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsDestination_), destination); + _MTL_msg_v_stopCapture((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLCaptureScope.hpp b/thirdparty/metal-cpp/Metal/MTLCaptureScope.hpp index 96ade67d47c9..3f941b40d9d1 100644 --- a/thirdparty/metal-cpp/Metal/MTLCaptureScope.hpp +++ b/thirdparty/metal-cpp/Metal/MTLCaptureScope.hpp @@ -1,91 +1,68 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLCaptureScope.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "MTLDefines.hpp" -#include "MTLPrivate.hpp" - -#include "../Foundation/Foundation.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class CommandQueue; + class Device; +} +namespace NS { + class String; +} namespace MTL { + class CaptureScope : public NS::Referencing { public: - class Device* device() const; - - NS::String* label() const; - void setLabel(const NS::String* pLabel); + void beginScope(); + MTL::CommandQueue* commandQueue() const; + MTL::Device* device() const; + void endScope(); + NS::String* label() const; + void setLabel(NS::String* label); - class CommandQueue* commandQueue() const; - - void beginScope(); - void endScope(); }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +} // namespace MTL -_MTL_INLINE MTL::Device* MTL::CaptureScope::device() const -{ - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); -} +// --- Class symbols + inline implementations --- -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +extern "C" void *OBJC_CLASS_$_MTLCaptureScope; _MTL_INLINE NS::String* MTL::CaptureScope::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTL_INLINE void MTL::CaptureScope::setLabel(const NS::String* pLabel) +_MTL_INLINE void MTL::CaptureScope::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), pLabel); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTL_INLINE MTL::Device* MTL::CaptureScope::device() const +{ + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); +} _MTL_INLINE MTL::CommandQueue* MTL::CaptureScope::commandQueue() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(commandQueue)); + return _MTL_msg_MTL__CommandQueuep_commandQueue((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTL_INLINE void MTL::CaptureScope::beginScope() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(beginScope)); + _MTL_msg_v_beginScope((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTL_INLINE void MTL::CaptureScope::endScope() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(endScope)); + _MTL_msg_v_endScope((const void*)this, nullptr); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/Metal/MTLCommandBuffer.hpp b/thirdparty/metal-cpp/Metal/MTLCommandBuffer.hpp index c504573d3312..cfea46b5f5c5 100644 --- a/thirdparty/metal-cpp/Metal/MTLCommandBuffer.hpp +++ b/thirdparty/metal-cpp/Metal/MTLCommandBuffer.hpp @@ -1,56 +1,44 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLCommandBuffer.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include -#include - -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class AccelerationStructureCommandEncoder; + class AccelerationStructurePassDescriptor; + class BlitCommandEncoder; + class BlitPassDescriptor; + class CommandQueue; + class ComputeCommandEncoder; + class ComputePassDescriptor; + class Device; + class Drawable; + class Event; + class LogContainer; + class LogState; + class ParallelRenderCommandEncoder; + class RenderCommandEncoder; + class RenderPassDescriptor; + class ResidencySet; + class ResourceStateCommandEncoder; + class ResourceStatePassDescriptor; +} +namespace NS { + class Array; + class Error; + class String; +} namespace MTL { -class AccelerationStructureCommandEncoder; -class AccelerationStructurePassDescriptor; -class BlitCommandEncoder; -class BlitPassDescriptor; -class CommandBuffer; -class CommandBufferDescriptor; -class CommandQueue; -class ComputeCommandEncoder; -class ComputePassDescriptor; -class Device; -class Drawable; -class Event; -class LogContainer; -class LogState; -class ParallelRenderCommandEncoder; -class RenderCommandEncoder; -class RenderPassDescriptor; -class ResidencySet; -class ResourceStateCommandEncoder; -class ResourceStatePassDescriptor; + +extern NS::ErrorDomain const CommandBufferErrorDomain __asm__("_MTLCommandBufferErrorDomain"); +extern NS::ErrorUserInfoKey const CommandBufferEncoderInfoErrorKey __asm__("_MTLCommandBufferEncoderInfoErrorKey"); _MTL_ENUM(NS::UInteger, CommandBufferStatus) { CommandBufferStatusNotEnqueued = 0, CommandBufferStatusEnqueued = 1, @@ -75,6 +63,11 @@ _MTL_ENUM(NS::UInteger, CommandBufferError) { CommandBufferErrorStackOverflow = 12, }; +_MTL_OPTIONS(NS::UInteger, CommandBufferErrorOption) { + CommandBufferErrorOptionNone = 0, + CommandBufferErrorOptionEncoderExecutionStatus = 1 << 0, +}; + _MTL_ENUM(NS::Integer, CommandEncoderErrorState) { CommandEncoderErrorStateUnknown = 0, CommandEncoderErrorStateCompleted = 1, @@ -88,377 +81,348 @@ _MTL_ENUM(NS::UInteger, DispatchType) { DispatchTypeConcurrent = 1, }; -_MTL_OPTIONS(NS::UInteger, CommandBufferErrorOption) { - CommandBufferErrorOptionNone = 0, - CommandBufferErrorOptionEncoderExecutionStatus = 1, -}; -using CommandBufferHandler = void (^)(CommandBuffer*); -using HandlerFunction = std::function; +class CommandBufferDescriptor; +class CommandBufferEncoderInfo; +class CommandBuffer; class CommandBufferDescriptor : public NS::Copying { public: static CommandBufferDescriptor* alloc(); + CommandBufferDescriptor* init() const; - CommandBufferErrorOption errorOptions() const; - - CommandBufferDescriptor* init(); - - LogState* logState() const; - - bool retainedReferences() const; + MTL::CommandBufferErrorOption errorOptions() const; + MTL::LogState* logState() const; + bool retainedReferences() const; + void setErrorOptions(MTL::CommandBufferErrorOption errorOptions); + void setLogState(MTL::LogState* logState); + void setRetainedReferences(bool retainedReferences); - void setErrorOptions(MTL::CommandBufferErrorOption errorOptions); - - void setLogState(const MTL::LogState* logState); - - void setRetainedReferences(bool retainedReferences); }; + class CommandBufferEncoderInfo : public NS::Referencing { public: - NS::Array* debugSignposts() const; + NS::Array* debugSignposts() const; + MTL::CommandEncoderErrorState errorState() const; + NS::String* label() const; - CommandEncoderErrorState errorState() const; - - NS::String* label() const; }; + class CommandBuffer : public NS::Referencing { public: - CFTimeInterval GPUEndTime() const; - - CFTimeInterval GPUStartTime() const; - - AccelerationStructureCommandEncoder* accelerationStructureCommandEncoder(); - AccelerationStructureCommandEncoder* accelerationStructureCommandEncoder(const MTL::AccelerationStructurePassDescriptor* descriptor); - - void addCompletedHandler(const MTL::CommandBufferHandler block); - void addCompletedHandler(const MTL::HandlerFunction& function); - - void addScheduledHandler(const MTL::CommandBufferHandler block); - void addScheduledHandler(const MTL::HandlerFunction& function); - - BlitCommandEncoder* blitCommandEncoder(); - BlitCommandEncoder* blitCommandEncoder(const MTL::BlitPassDescriptor* blitPassDescriptor); + CFTimeInterval GPUEndTime() const; + CFTimeInterval GPUStartTime() const; + MTL::AccelerationStructureCommandEncoder* accelerationStructureCommandEncoder(); + MTL::AccelerationStructureCommandEncoder* accelerationStructureCommandEncoder(MTL::AccelerationStructurePassDescriptor* descriptor); + void addCompletedHandler(MTL::CommandBufferHandler block); + void addCompletedHandler(const MTL::CommandBufferHandlerFunction& block); + void addScheduledHandler(MTL::CommandBufferHandler block); + void addScheduledHandler(const MTL::CommandBufferHandlerFunction& block); + MTL::BlitCommandEncoder* blitCommandEncoder(); + MTL::BlitCommandEncoder* blitCommandEncoder(MTL::BlitPassDescriptor* blitPassDescriptor); + MTL::CommandQueue* commandQueue() const; + void commit(); + MTL::ComputeCommandEncoder* computeCommandEncoder(MTL::ComputePassDescriptor* computePassDescriptor); + MTL::ComputeCommandEncoder* computeCommandEncoder(); + MTL::ComputeCommandEncoder* computeCommandEncoder(MTL::DispatchType dispatchType); + MTL::Device* device() const; + void encodeSignalEvent(MTL::Event* event, uint64_t value); + void encodeWait(MTL::Event* event, uint64_t value); + void enqueue(); + NS::Error* error() const; + MTL::CommandBufferErrorOption errorOptions() const; + CFTimeInterval kernelEndTime() const; + CFTimeInterval kernelStartTime() const; + NS::String* label() const; + MTL::LogContainer* logs() const; + MTL::ParallelRenderCommandEncoder* parallelRenderCommandEncoder(MTL::RenderPassDescriptor* renderPassDescriptor); + void popDebugGroup(); + void presentDrawable(MTL::Drawable* drawable); + void presentDrawableAfterMinimumDuration(MTL::Drawable* drawable, CFTimeInterval duration); + void presentDrawableAtTime(MTL::Drawable* drawable, CFTimeInterval presentationTime); + void pushDebugGroup(NS::String* string); + MTL::RenderCommandEncoder* renderCommandEncoder(MTL::RenderPassDescriptor* renderPassDescriptor); + MTL::ResourceStateCommandEncoder* resourceStateCommandEncoder(); + MTL::ResourceStateCommandEncoder* resourceStateCommandEncoder(MTL::ResourceStatePassDescriptor* resourceStatePassDescriptor); + bool retainedReferences() const; + void setLabel(NS::String* label); + MTL::CommandBufferStatus status() const; + void useResidencySet(MTL::ResidencySet* residencySet); + void useResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count); + void waitUntilCompleted(); + void waitUntilScheduled(); - CommandQueue* commandQueue() const; - - void commit(); - - ComputeCommandEncoder* computeCommandEncoder(const MTL::ComputePassDescriptor* computePassDescriptor); - ComputeCommandEncoder* computeCommandEncoder(); - ComputeCommandEncoder* computeCommandEncoder(MTL::DispatchType dispatchType); - - Device* device() const; - - void encodeSignalEvent(const MTL::Event* event, uint64_t value); - - void encodeWait(const MTL::Event* event, uint64_t value); - - void enqueue(); - - NS::Error* error() const; - CommandBufferErrorOption errorOptions() const; - - CFTimeInterval kernelEndTime() const; - - CFTimeInterval kernelStartTime() const; - - NS::String* label() const; - - LogContainer* logs() const; - - ParallelRenderCommandEncoder* parallelRenderCommandEncoder(const MTL::RenderPassDescriptor* renderPassDescriptor); - - void popDebugGroup(); - - void presentDrawable(const MTL::Drawable* drawable); - void presentDrawableAfterMinimumDuration(const MTL::Drawable* drawable, CFTimeInterval duration); - - void presentDrawableAtTime(const MTL::Drawable* drawable, CFTimeInterval presentationTime); - - void pushDebugGroup(const NS::String* string); - - RenderCommandEncoder* renderCommandEncoder(const MTL::RenderPassDescriptor* renderPassDescriptor); - - ResourceStateCommandEncoder* resourceStateCommandEncoder(); - ResourceStateCommandEncoder* resourceStateCommandEncoder(const MTL::ResourceStatePassDescriptor* resourceStatePassDescriptor); - - bool retainedReferences() const; - - void setLabel(const NS::String* label); - - CommandBufferStatus status() const; +}; - void useResidencySet(const MTL::ResidencySet* residencySet); - void useResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count); +} // namespace MTL - void waitUntilCompleted(); +// --- Class symbols + inline implementations --- - void waitUntilScheduled(); -}; +extern "C" void *OBJC_CLASS_$_MTLCommandBufferDescriptor; +extern "C" void *OBJC_CLASS_$_MTLCommandBufferEncoderInfo; +extern "C" void *OBJC_CLASS_$_MTLCommandBuffer; -} _MTL_INLINE MTL::CommandBufferDescriptor* MTL::CommandBufferDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLCommandBufferDescriptor)); + return _MTL_msg_MTL__CommandBufferDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLCommandBufferDescriptor, nullptr); } -_MTL_INLINE MTL::CommandBufferErrorOption MTL::CommandBufferDescriptor::errorOptions() const +_MTL_INLINE MTL::CommandBufferDescriptor* MTL::CommandBufferDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(errorOptions)); + return _MTL_msg_MTL__CommandBufferDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::CommandBufferDescriptor* MTL::CommandBufferDescriptor::init() +_MTL_INLINE bool MTL::CommandBufferDescriptor::retainedReferences() const { - return NS::Object::init(); + return _MTL_msg_bool_retainedReferences((const void*)this, nullptr); } -_MTL_INLINE MTL::LogState* MTL::CommandBufferDescriptor::logState() const +_MTL_INLINE void MTL::CommandBufferDescriptor::setRetainedReferences(bool retainedReferences) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(logState)); + _MTL_msg_v_setRetainedReferences__bool((const void*)this, nullptr, retainedReferences); } -_MTL_INLINE bool MTL::CommandBufferDescriptor::retainedReferences() const +_MTL_INLINE MTL::CommandBufferErrorOption MTL::CommandBufferDescriptor::errorOptions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(retainedReferences)); + return _MTL_msg_MTL__CommandBufferErrorOption_errorOptions((const void*)this, nullptr); } _MTL_INLINE void MTL::CommandBufferDescriptor::setErrorOptions(MTL::CommandBufferErrorOption errorOptions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setErrorOptions_), errorOptions); + _MTL_msg_v_setErrorOptions__MTL__CommandBufferErrorOption((const void*)this, nullptr, errorOptions); } -_MTL_INLINE void MTL::CommandBufferDescriptor::setLogState(const MTL::LogState* logState) +_MTL_INLINE MTL::LogState* MTL::CommandBufferDescriptor::logState() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLogState_), logState); + return _MTL_msg_MTL__LogStatep_logState((const void*)this, nullptr); } -_MTL_INLINE void MTL::CommandBufferDescriptor::setRetainedReferences(bool retainedReferences) +_MTL_INLINE void MTL::CommandBufferDescriptor::setLogState(MTL::LogState* logState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRetainedReferences_), retainedReferences); + _MTL_msg_v_setLogState__MTL__LogStatep((const void*)this, nullptr, logState); } -_MTL_INLINE NS::Array* MTL::CommandBufferEncoderInfo::debugSignposts() const +_MTL_INLINE NS::String* MTL::CommandBufferEncoderInfo::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(debugSignposts)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::CommandEncoderErrorState MTL::CommandBufferEncoderInfo::errorState() const +_MTL_INLINE NS::Array* MTL::CommandBufferEncoderInfo::debugSignposts() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(errorState)); + return _MTL_msg_NS__Arrayp_debugSignposts((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::CommandBufferEncoderInfo::label() const +_MTL_INLINE MTL::CommandEncoderErrorState MTL::CommandBufferEncoderInfo::errorState() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__CommandEncoderErrorState_errorState((const void*)this, nullptr); } -_MTL_INLINE CFTimeInterval MTL::CommandBuffer::GPUEndTime() const +_MTL_INLINE MTL::Device* MTL::CommandBuffer::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(GPUEndTime)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE CFTimeInterval MTL::CommandBuffer::GPUStartTime() const +_MTL_INLINE MTL::CommandQueue* MTL::CommandBuffer::commandQueue() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(GPUStartTime)); + return _MTL_msg_MTL__CommandQueuep_commandQueue((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureCommandEncoder* MTL::CommandBuffer::accelerationStructureCommandEncoder() +_MTL_INLINE bool MTL::CommandBuffer::retainedReferences() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(accelerationStructureCommandEncoder)); + return _MTL_msg_bool_retainedReferences((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureCommandEncoder* MTL::CommandBuffer::accelerationStructureCommandEncoder(const MTL::AccelerationStructurePassDescriptor* descriptor) +_MTL_INLINE MTL::CommandBufferErrorOption MTL::CommandBuffer::errorOptions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(accelerationStructureCommandEncoderWithDescriptor_), descriptor); + return _MTL_msg_MTL__CommandBufferErrorOption_errorOptions((const void*)this, nullptr); } -_MTL_INLINE void MTL::CommandBuffer::addCompletedHandler(const MTL::CommandBufferHandler block) +_MTL_INLINE NS::String* MTL::CommandBuffer::label() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addCompletedHandler_), block); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::CommandBuffer::addCompletedHandler(const MTL::HandlerFunction& function) +_MTL_INLINE void MTL::CommandBuffer::setLabel(NS::String* label) { - __block HandlerFunction blockFunction = function; - addCompletedHandler(^(MTL::CommandBuffer* pCommandBuffer) { blockFunction(pCommandBuffer); }); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL::CommandBuffer::addScheduledHandler(const MTL::CommandBufferHandler block) +_MTL_INLINE CFTimeInterval MTL::CommandBuffer::kernelStartTime() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addScheduledHandler_), block); + return _MTL_msg_CFTimeInterval_kernelStartTime((const void*)this, nullptr); } -_MTL_INLINE void MTL::CommandBuffer::addScheduledHandler(const MTL::HandlerFunction& function) +_MTL_INLINE CFTimeInterval MTL::CommandBuffer::kernelEndTime() const { - __block HandlerFunction blockFunction = function; - addScheduledHandler(^(MTL::CommandBuffer* pCommandBuffer) { blockFunction(pCommandBuffer); }); + return _MTL_msg_CFTimeInterval_kernelEndTime((const void*)this, nullptr); } -_MTL_INLINE MTL::BlitCommandEncoder* MTL::CommandBuffer::blitCommandEncoder() +_MTL_INLINE MTL::LogContainer* MTL::CommandBuffer::logs() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(blitCommandEncoder)); + return _MTL_msg_MTL__LogContainerp_logs((const void*)this, nullptr); } -_MTL_INLINE MTL::BlitCommandEncoder* MTL::CommandBuffer::blitCommandEncoder(const MTL::BlitPassDescriptor* blitPassDescriptor) +_MTL_INLINE CFTimeInterval MTL::CommandBuffer::GPUStartTime() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(blitCommandEncoderWithDescriptor_), blitPassDescriptor); + return _MTL_msg_CFTimeInterval_GPUStartTime((const void*)this, nullptr); } -_MTL_INLINE MTL::CommandQueue* MTL::CommandBuffer::commandQueue() const +_MTL_INLINE CFTimeInterval MTL::CommandBuffer::GPUEndTime() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(commandQueue)); + return _MTL_msg_CFTimeInterval_GPUEndTime((const void*)this, nullptr); } -_MTL_INLINE void MTL::CommandBuffer::commit() +_MTL_INLINE MTL::CommandBufferStatus MTL::CommandBuffer::status() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(commit)); + return _MTL_msg_MTL__CommandBufferStatus_status((const void*)this, nullptr); } -_MTL_INLINE MTL::ComputeCommandEncoder* MTL::CommandBuffer::computeCommandEncoder(const MTL::ComputePassDescriptor* computePassDescriptor) +_MTL_INLINE NS::Error* MTL::CommandBuffer::error() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(computeCommandEncoderWithDescriptor_), computePassDescriptor); + return _MTL_msg_NS__Errorp_error((const void*)this, nullptr); } -_MTL_INLINE MTL::ComputeCommandEncoder* MTL::CommandBuffer::computeCommandEncoder() +_MTL_INLINE void MTL::CommandBuffer::enqueue() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(computeCommandEncoder)); + _MTL_msg_v_enqueue((const void*)this, nullptr); } -_MTL_INLINE MTL::ComputeCommandEncoder* MTL::CommandBuffer::computeCommandEncoder(MTL::DispatchType dispatchType) +_MTL_INLINE void MTL::CommandBuffer::commit() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(computeCommandEncoderWithDispatchType_), dispatchType); + _MTL_msg_v_commit((const void*)this, nullptr); } -_MTL_INLINE MTL::Device* MTL::CommandBuffer::device() const +_MTL_INLINE void MTL::CommandBuffer::addScheduledHandler(MTL::CommandBufferHandler block) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + _MTL_msg_v_addScheduledHandler__MTL__CommandBufferHandler((const void*)this, nullptr, block); } -_MTL_INLINE void MTL::CommandBuffer::encodeSignalEvent(const MTL::Event* event, uint64_t value) +_MTL_INLINE void MTL::CommandBuffer::addScheduledHandler(const MTL::CommandBufferHandlerFunction& block) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(encodeSignalEvent_value_), event, value); + __block MTL::CommandBufferHandlerFunction blockFunction = block; + addScheduledHandler(^(MTL::CommandBuffer* x0) { blockFunction(x0); }); } -_MTL_INLINE void MTL::CommandBuffer::encodeWait(const MTL::Event* event, uint64_t value) +_MTL_INLINE void MTL::CommandBuffer::presentDrawable(MTL::Drawable* drawable) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(encodeWaitForEvent_value_), event, value); + _MTL_msg_v_presentDrawable__MTL__Drawablep((const void*)this, nullptr, drawable); } -_MTL_INLINE void MTL::CommandBuffer::enqueue() +_MTL_INLINE void MTL::CommandBuffer::presentDrawableAtTime(MTL::Drawable* drawable, CFTimeInterval presentationTime) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(enqueue)); + _MTL_msg_v_presentDrawable_atTime__MTL__Drawablep_CFTimeInterval((const void*)this, nullptr, drawable, presentationTime); } -_MTL_INLINE NS::Error* MTL::CommandBuffer::error() const +_MTL_INLINE void MTL::CommandBuffer::presentDrawableAfterMinimumDuration(MTL::Drawable* drawable, CFTimeInterval duration) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(error)); + _MTL_msg_v_presentDrawable_afterMinimumDuration__MTL__Drawablep_CFTimeInterval((const void*)this, nullptr, drawable, duration); } -_MTL_INLINE MTL::CommandBufferErrorOption MTL::CommandBuffer::errorOptions() const +_MTL_INLINE void MTL::CommandBuffer::waitUntilScheduled() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(errorOptions)); + _MTL_msg_v_waitUntilScheduled((const void*)this, nullptr); } -_MTL_INLINE CFTimeInterval MTL::CommandBuffer::kernelEndTime() const +_MTL_INLINE void MTL::CommandBuffer::addCompletedHandler(MTL::CommandBufferHandler block) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(kernelEndTime)); + _MTL_msg_v_addCompletedHandler__MTL__CommandBufferHandler((const void*)this, nullptr, block); } -_MTL_INLINE CFTimeInterval MTL::CommandBuffer::kernelStartTime() const +_MTL_INLINE void MTL::CommandBuffer::addCompletedHandler(const MTL::CommandBufferHandlerFunction& block) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(kernelStartTime)); + __block MTL::CommandBufferHandlerFunction blockFunction = block; + addCompletedHandler(^(MTL::CommandBuffer* x0) { blockFunction(x0); }); } -_MTL_INLINE NS::String* MTL::CommandBuffer::label() const +_MTL_INLINE void MTL::CommandBuffer::waitUntilCompleted() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL_msg_v_waitUntilCompleted((const void*)this, nullptr); } -_MTL_INLINE MTL::LogContainer* MTL::CommandBuffer::logs() const +_MTL_INLINE MTL::BlitCommandEncoder* MTL::CommandBuffer::blitCommandEncoder() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(logs)); + return _MTL_msg_MTL__BlitCommandEncoderp_blitCommandEncoder((const void*)this, nullptr); } -_MTL_INLINE MTL::ParallelRenderCommandEncoder* MTL::CommandBuffer::parallelRenderCommandEncoder(const MTL::RenderPassDescriptor* renderPassDescriptor) +_MTL_INLINE MTL::RenderCommandEncoder* MTL::CommandBuffer::renderCommandEncoder(MTL::RenderPassDescriptor* renderPassDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(parallelRenderCommandEncoderWithDescriptor_), renderPassDescriptor); + return _MTL_msg_MTL__RenderCommandEncoderp_renderCommandEncoderWithDescriptor__MTL__RenderPassDescriptorp((const void*)this, nullptr, renderPassDescriptor); } -_MTL_INLINE void MTL::CommandBuffer::popDebugGroup() +_MTL_INLINE MTL::ComputeCommandEncoder* MTL::CommandBuffer::computeCommandEncoder(MTL::ComputePassDescriptor* computePassDescriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(popDebugGroup)); + return _MTL_msg_MTL__ComputeCommandEncoderp_computeCommandEncoderWithDescriptor__MTL__ComputePassDescriptorp((const void*)this, nullptr, computePassDescriptor); } -_MTL_INLINE void MTL::CommandBuffer::presentDrawable(const MTL::Drawable* drawable) +_MTL_INLINE MTL::BlitCommandEncoder* MTL::CommandBuffer::blitCommandEncoder(MTL::BlitPassDescriptor* blitPassDescriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(presentDrawable_), drawable); + return _MTL_msg_MTL__BlitCommandEncoderp_blitCommandEncoderWithDescriptor__MTL__BlitPassDescriptorp((const void*)this, nullptr, blitPassDescriptor); } -_MTL_INLINE void MTL::CommandBuffer::presentDrawableAfterMinimumDuration(const MTL::Drawable* drawable, CFTimeInterval duration) +_MTL_INLINE MTL::ComputeCommandEncoder* MTL::CommandBuffer::computeCommandEncoder() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(presentDrawable_afterMinimumDuration_), drawable, duration); + return _MTL_msg_MTL__ComputeCommandEncoderp_computeCommandEncoder((const void*)this, nullptr); } -_MTL_INLINE void MTL::CommandBuffer::presentDrawableAtTime(const MTL::Drawable* drawable, CFTimeInterval presentationTime) +_MTL_INLINE MTL::ComputeCommandEncoder* MTL::CommandBuffer::computeCommandEncoder(MTL::DispatchType dispatchType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(presentDrawable_atTime_), drawable, presentationTime); + return _MTL_msg_MTL__ComputeCommandEncoderp_computeCommandEncoderWithDispatchType__MTL__DispatchType((const void*)this, nullptr, dispatchType); } -_MTL_INLINE void MTL::CommandBuffer::pushDebugGroup(const NS::String* string) +_MTL_INLINE void MTL::CommandBuffer::encodeWait(MTL::Event* event, uint64_t value) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(pushDebugGroup_), string); + _MTL_msg_v_encodeWaitForEvent_value__MTL__Eventp_uint64_t((const void*)this, nullptr, event, value); } -_MTL_INLINE MTL::RenderCommandEncoder* MTL::CommandBuffer::renderCommandEncoder(const MTL::RenderPassDescriptor* renderPassDescriptor) +_MTL_INLINE void MTL::CommandBuffer::encodeSignalEvent(MTL::Event* event, uint64_t value) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(renderCommandEncoderWithDescriptor_), renderPassDescriptor); + _MTL_msg_v_encodeSignalEvent_value__MTL__Eventp_uint64_t((const void*)this, nullptr, event, value); } -_MTL_INLINE MTL::ResourceStateCommandEncoder* MTL::CommandBuffer::resourceStateCommandEncoder() +_MTL_INLINE MTL::ParallelRenderCommandEncoder* MTL::CommandBuffer::parallelRenderCommandEncoder(MTL::RenderPassDescriptor* renderPassDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resourceStateCommandEncoder)); + return _MTL_msg_MTL__ParallelRenderCommandEncoderp_parallelRenderCommandEncoderWithDescriptor__MTL__RenderPassDescriptorp((const void*)this, nullptr, renderPassDescriptor); } -_MTL_INLINE MTL::ResourceStateCommandEncoder* MTL::CommandBuffer::resourceStateCommandEncoder(const MTL::ResourceStatePassDescriptor* resourceStatePassDescriptor) +_MTL_INLINE MTL::ResourceStateCommandEncoder* MTL::CommandBuffer::resourceStateCommandEncoder() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resourceStateCommandEncoderWithDescriptor_), resourceStatePassDescriptor); + return _MTL_msg_MTL__ResourceStateCommandEncoderp_resourceStateCommandEncoder((const void*)this, nullptr); } -_MTL_INLINE bool MTL::CommandBuffer::retainedReferences() const +_MTL_INLINE MTL::ResourceStateCommandEncoder* MTL::CommandBuffer::resourceStateCommandEncoder(MTL::ResourceStatePassDescriptor* resourceStatePassDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(retainedReferences)); + return _MTL_msg_MTL__ResourceStateCommandEncoderp_resourceStateCommandEncoderWithDescriptor__MTL__ResourceStatePassDescriptorp((const void*)this, nullptr, resourceStatePassDescriptor); } -_MTL_INLINE void MTL::CommandBuffer::setLabel(const NS::String* label) +_MTL_INLINE MTL::AccelerationStructureCommandEncoder* MTL::CommandBuffer::accelerationStructureCommandEncoder() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_MTL__AccelerationStructureCommandEncoderp_accelerationStructureCommandEncoder((const void*)this, nullptr); } -_MTL_INLINE MTL::CommandBufferStatus MTL::CommandBuffer::status() const +_MTL_INLINE MTL::AccelerationStructureCommandEncoder* MTL::CommandBuffer::accelerationStructureCommandEncoder(MTL::AccelerationStructurePassDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(status)); + return _MTL_msg_MTL__AccelerationStructureCommandEncoderp_accelerationStructureCommandEncoderWithDescriptor__MTL__AccelerationStructurePassDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE void MTL::CommandBuffer::useResidencySet(const MTL::ResidencySet* residencySet) +_MTL_INLINE void MTL::CommandBuffer::pushDebugGroup(NS::String* string) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResidencySet_), residencySet); + _MTL_msg_v_pushDebugGroup__NS__Stringp((const void*)this, nullptr, string); } -_MTL_INLINE void MTL::CommandBuffer::useResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count) +_MTL_INLINE void MTL::CommandBuffer::popDebugGroup() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResidencySets_count_), residencySets, count); + _MTL_msg_v_popDebugGroup((const void*)this, nullptr); } -_MTL_INLINE void MTL::CommandBuffer::waitUntilCompleted() +_MTL_INLINE void MTL::CommandBuffer::useResidencySet(MTL::ResidencySet* residencySet) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitUntilCompleted)); + _MTL_msg_v_useResidencySet__MTL__ResidencySetp((const void*)this, nullptr, residencySet); } -_MTL_INLINE void MTL::CommandBuffer::waitUntilScheduled() +_MTL_INLINE void MTL::CommandBuffer::useResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitUntilScheduled)); + _MTL_msg_v_useResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger((const void*)this, nullptr, residencySets, count); } diff --git a/thirdparty/metal-cpp/Metal/MTLCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTLCommandEncoder.hpp index a230ff5df2e5..6cec3310832a 100644 --- a/thirdparty/metal-cpp/Metal/MTLCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTLCommandEncoder.hpp @@ -1,48 +1,37 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLCommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Device; +} +namespace NS { + class String; +} namespace MTL { -class Device; _MTL_OPTIONS(NS::UInteger, ResourceUsage) { - ResourceUsageRead = 1, + ResourceUsageRead = 1 << 0, ResourceUsageWrite = 1 << 1, ResourceUsageSample = 1 << 2, }; _MTL_OPTIONS(NS::UInteger, BarrierScope) { - BarrierScopeBuffers = 1, + BarrierScopeBuffers = 1 << 0, BarrierScopeTextures = 1 << 1, BarrierScopeRenderTargets = 1 << 2, }; _MTL_OPTIONS(NS::UInteger, Stages) { - StageVertex = 1, + StageVertex = 1 << 0, StageFragment = 1 << 1, StageTile = 1 << 2, StageObject = 1 << 3, @@ -55,63 +44,63 @@ _MTL_OPTIONS(NS::UInteger, Stages) { StageAll = 9223372036854775807, }; + class CommandEncoder : public NS::Referencing { public: - void barrierAfterQueueStages(MTL::Stages afterQueueStages, MTL::Stages beforeStages); - - Device* device() const; + void barrierAfterQueueStages(MTL::Stages afterQueueStages, MTL::Stages beforeStages); + MTL::Device* device() const; + void endEncoding(); + void insertDebugSignpost(NS::String* string); + NS::String* label() const; + void popDebugGroup(); + void pushDebugGroup(NS::String* string); + void setLabel(NS::String* label); - void endEncoding(); - - void insertDebugSignpost(const NS::String* string); +}; - NS::String* label() const; +} // namespace MTL - void popDebugGroup(); +// --- Class symbols + inline implementations --- - void pushDebugGroup(const NS::String* string); +extern "C" void *OBJC_CLASS_$_MTLCommandEncoder; - void setLabel(const NS::String* label); -}; - -} -_MTL_INLINE void MTL::CommandEncoder::barrierAfterQueueStages(MTL::Stages afterQueueStages, MTL::Stages beforeStages) +_MTL_INLINE MTL::Device* MTL::CommandEncoder::device() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(barrierAfterQueueStages_beforeStages_), afterQueueStages, beforeStages); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE MTL::Device* MTL::CommandEncoder::device() const +_MTL_INLINE NS::String* MTL::CommandEncoder::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::CommandEncoder::endEncoding() +_MTL_INLINE void MTL::CommandEncoder::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(endEncoding)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL::CommandEncoder::insertDebugSignpost(const NS::String* string) +_MTL_INLINE void MTL::CommandEncoder::endEncoding() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(insertDebugSignpost_), string); + _MTL_msg_v_endEncoding((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::CommandEncoder::label() const +_MTL_INLINE void MTL::CommandEncoder::barrierAfterQueueStages(MTL::Stages afterQueueStages, MTL::Stages beforeStages) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL_msg_v_barrierAfterQueueStages_beforeStages__MTL__Stages_MTL__Stages((const void*)this, nullptr, afterQueueStages, beforeStages); } -_MTL_INLINE void MTL::CommandEncoder::popDebugGroup() +_MTL_INLINE void MTL::CommandEncoder::insertDebugSignpost(NS::String* string) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(popDebugGroup)); + _MTL_msg_v_insertDebugSignpost__NS__Stringp((const void*)this, nullptr, string); } -_MTL_INLINE void MTL::CommandEncoder::pushDebugGroup(const NS::String* string) +_MTL_INLINE void MTL::CommandEncoder::pushDebugGroup(NS::String* string) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(pushDebugGroup_), string); + _MTL_msg_v_pushDebugGroup__NS__Stringp((const void*)this, nullptr, string); } -_MTL_INLINE void MTL::CommandEncoder::setLabel(const NS::String* label) +_MTL_INLINE void MTL::CommandEncoder::popDebugGroup() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_popDebugGroup((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLCommandQueue.hpp b/thirdparty/metal-cpp/Metal/MTLCommandQueue.hpp index 5d3bf164acba..2cc02c69e270 100644 --- a/thirdparty/metal-cpp/Metal/MTLCommandQueue.hpp +++ b/thirdparty/metal-cpp/Metal/MTLCommandQueue.hpp @@ -1,158 +1,148 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLCommandQueue.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class CommandBuffer; + class CommandBufferDescriptor; + class Device; + class LogState; + class ResidencySet; +} +namespace NS { + class String; +} namespace MTL { -class CommandBuffer; -class CommandBufferDescriptor; + +class CommandQueue; class CommandQueueDescriptor; -class Device; -class LogState; -class ResidencySet; class CommandQueue : public NS::Referencing { public: - void addResidencySet(const MTL::ResidencySet* residencySet); - void addResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count); - - CommandBuffer* commandBuffer(); - CommandBuffer* commandBuffer(const MTL::CommandBufferDescriptor* descriptor); - CommandBuffer* commandBufferWithUnretainedReferences(); - - Device* device() const; + void addResidencySet(MTL::ResidencySet* residencySet); + void addResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count); + MTL::CommandBuffer* commandBuffer(); + MTL::CommandBuffer* commandBuffer(MTL::CommandBufferDescriptor* descriptor); + MTL::CommandBuffer* commandBufferWithUnretainedReferences(); + MTL::Device* device() const; + void insertDebugCaptureBoundary(); + NS::String* label() const; + void removeResidencySet(MTL::ResidencySet* residencySet); + void removeResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count); + void setLabel(NS::String* label); - void insertDebugCaptureBoundary(); - - NS::String* label() const; - - void removeResidencySet(const MTL::ResidencySet* residencySet); - void removeResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count); - - void setLabel(const NS::String* label); }; + class CommandQueueDescriptor : public NS::Copying { public: static CommandQueueDescriptor* alloc(); + CommandQueueDescriptor* init() const; - CommandQueueDescriptor* init(); + MTL::LogState* logState() const; + NS::UInteger maxCommandBufferCount() const; + void setLogState(MTL::LogState* logState); + void setMaxCommandBufferCount(NS::UInteger maxCommandBufferCount); - LogState* logState() const; +}; - NS::UInteger maxCommandBufferCount() const; +} // namespace MTL - void setLogState(const MTL::LogState* logState); +// --- Class symbols + inline implementations --- - void setMaxCommandBufferCount(NS::UInteger maxCommandBufferCount); -}; +extern "C" void *OBJC_CLASS_$_MTLCommandQueue; +extern "C" void *OBJC_CLASS_$_MTLCommandQueueDescriptor; -} -_MTL_INLINE void MTL::CommandQueue::addResidencySet(const MTL::ResidencySet* residencySet) +_MTL_INLINE NS::String* MTL::CommandQueue::label() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addResidencySet_), residencySet); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::CommandQueue::addResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count) +_MTL_INLINE void MTL::CommandQueue::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addResidencySets_count_), residencySets, count); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE MTL::CommandBuffer* MTL::CommandQueue::commandBuffer() +_MTL_INLINE MTL::Device* MTL::CommandQueue::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(commandBuffer)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE MTL::CommandBuffer* MTL::CommandQueue::commandBuffer(const MTL::CommandBufferDescriptor* descriptor) +_MTL_INLINE MTL::CommandBuffer* MTL::CommandQueue::commandBuffer() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(commandBufferWithDescriptor_), descriptor); + return _MTL_msg_MTL__CommandBufferp_commandBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::CommandBuffer* MTL::CommandQueue::commandBufferWithUnretainedReferences() +_MTL_INLINE MTL::CommandBuffer* MTL::CommandQueue::commandBuffer(MTL::CommandBufferDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(commandBufferWithUnretainedReferences)); + return _MTL_msg_MTL__CommandBufferp_commandBufferWithDescriptor__MTL__CommandBufferDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE MTL::Device* MTL::CommandQueue::device() const +_MTL_INLINE MTL::CommandBuffer* MTL::CommandQueue::commandBufferWithUnretainedReferences() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_MTL__CommandBufferp_commandBufferWithUnretainedReferences((const void*)this, nullptr); } _MTL_INLINE void MTL::CommandQueue::insertDebugCaptureBoundary() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(insertDebugCaptureBoundary)); + _MTL_msg_v_insertDebugCaptureBoundary((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::CommandQueue::label() const +_MTL_INLINE void MTL::CommandQueue::addResidencySet(MTL::ResidencySet* residencySet) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL_msg_v_addResidencySet__MTL__ResidencySetp((const void*)this, nullptr, residencySet); } -_MTL_INLINE void MTL::CommandQueue::removeResidencySet(const MTL::ResidencySet* residencySet) +_MTL_INLINE void MTL::CommandQueue::addResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(removeResidencySet_), residencySet); + _MTL_msg_v_addResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger((const void*)this, nullptr, residencySets, count); } -_MTL_INLINE void MTL::CommandQueue::removeResidencySets(const MTL::ResidencySet* const residencySets[], NS::UInteger count) +_MTL_INLINE void MTL::CommandQueue::removeResidencySet(MTL::ResidencySet* residencySet) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(removeResidencySets_count_), residencySets, count); + _MTL_msg_v_removeResidencySet__MTL__ResidencySetp((const void*)this, nullptr, residencySet); } -_MTL_INLINE void MTL::CommandQueue::setLabel(const NS::String* label) +_MTL_INLINE void MTL::CommandQueue::removeResidencySets(const MTL::ResidencySet* const * residencySets, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_removeResidencySets_count__constMTL__ResidencySetpconstp_NS__UInteger((const void*)this, nullptr, residencySets, count); } _MTL_INLINE MTL::CommandQueueDescriptor* MTL::CommandQueueDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLCommandQueueDescriptor)); + return _MTL_msg_MTL__CommandQueueDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLCommandQueueDescriptor, nullptr); } -_MTL_INLINE MTL::CommandQueueDescriptor* MTL::CommandQueueDescriptor::init() +_MTL_INLINE MTL::CommandQueueDescriptor* MTL::CommandQueueDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__CommandQueueDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::LogState* MTL::CommandQueueDescriptor::logState() const +_MTL_INLINE NS::UInteger MTL::CommandQueueDescriptor::maxCommandBufferCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(logState)); + return _MTL_msg_NS__UInteger_maxCommandBufferCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::CommandQueueDescriptor::maxCommandBufferCount() const +_MTL_INLINE void MTL::CommandQueueDescriptor::setMaxCommandBufferCount(NS::UInteger maxCommandBufferCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxCommandBufferCount)); + _MTL_msg_v_setMaxCommandBufferCount__NS__UInteger((const void*)this, nullptr, maxCommandBufferCount); } -_MTL_INLINE void MTL::CommandQueueDescriptor::setLogState(const MTL::LogState* logState) +_MTL_INLINE MTL::LogState* MTL::CommandQueueDescriptor::logState() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLogState_), logState); + return _MTL_msg_MTL__LogStatep_logState((const void*)this, nullptr); } -_MTL_INLINE void MTL::CommandQueueDescriptor::setMaxCommandBufferCount(NS::UInteger maxCommandBufferCount) +_MTL_INLINE void MTL::CommandQueueDescriptor::setLogState(MTL::LogState* logState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxCommandBufferCount_), maxCommandBufferCount); + _MTL_msg_v_setLogState__MTL__LogStatep((const void*)this, nullptr, logState); } diff --git a/thirdparty/metal-cpp/Metal/MTLComputeCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTLComputeCommandEncoder.hpp index 2f555e572e3a..487757bad303 100644 --- a/thirdparty/metal-cpp/Metal/MTLComputeCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTLComputeCommandEncoder.hpp @@ -1,324 +1,277 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLComputeCommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLCommandBuffer.hpp" -#include "MTLCommandEncoder.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" -#include - -namespace MTL -{ -class AccelerationStructure; -class Buffer; -class ComputePipelineState; -class CounterSampleBuffer; -class Fence; -class Heap; -class IndirectCommandBuffer; -class IntersectionFunctionTable; -class Resource; -class SamplerState; -class Texture; -class VisibleFunctionTable; - -struct DispatchThreadgroupsIndirectArguments -{ - uint32_t threadgroupsPerGrid[3]; -} _MTL_PACKED; +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLCommandEncoder.hpp" -struct DispatchThreadsIndirectArguments -{ - uint32_t threadsPerGrid[3]; - uint32_t threadsPerThreadgroup[3]; -} _MTL_PACKED; +namespace MTL { + class AccelerationStructure; + class Buffer; + class ComputePipelineState; + class CounterSampleBuffer; + class Fence; + class Heap; + class IndirectCommandBuffer; + class IntersectionFunctionTable; + class Resource; + class SamplerState; + class Texture; + class VisibleFunctionTable; + using BarrierScope = NS::UInteger; + enum DispatchType : NS::UInteger; + using ResourceUsage = NS::UInteger; +} -struct StageInRegionIndirectArguments +namespace MTL { - uint32_t stageInOrigin[3]; - uint32_t stageInSize[3]; -} _MTL_PACKED; -class ComputeCommandEncoder : public NS::Referencing +class ComputeCommandEncoder : public NS::Referencing { public: - void dispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup); - void dispatchThreadgroups(const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset, MTL::Size threadsPerThreadgroup); - - void dispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup); - - DispatchType dispatchType() const; - - void executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange); - void executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandbuffer, const MTL::Buffer* indirectRangeBuffer, NS::UInteger indirectBufferOffset); - - void memoryBarrier(MTL::BarrierScope scope); - void memoryBarrier(const MTL::Resource* const resources[], NS::UInteger count); - - void sampleCountersInBuffer(const MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier); - - void setAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex); - - void setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); - void setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); - void setBufferOffset(NS::UInteger offset, NS::UInteger index); - void setBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index); - - void setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range); - void setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range); - - void setBytes(const void* bytes, NS::UInteger length, NS::UInteger index); - void setBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index); - - void setComputePipelineState(const MTL::ComputePipelineState* state); - - void setImageblockWidth(NS::UInteger width, NS::UInteger height); - - void setIntersectionFunctionTable(const MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex); - void setIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const intersectionFunctionTables[], NS::Range range); - - void setSamplerState(const MTL::SamplerState* sampler, NS::UInteger index); - void setSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); - void setSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range); - void setSamplerStates(const MTL::SamplerState* const samplers[], const float lodMinClamps[], const float lodMaxClamps[], NS::Range range); - - void setStageInRegion(MTL::Region region); - void setStageInRegion(const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); + void dispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup); + void dispatchThreadgroups(MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset, MTL::Size threadsPerThreadgroup); + void dispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup); + MTL::DispatchType dispatchType() const; + void executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange); + void executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandbuffer, MTL::Buffer* indirectRangeBuffer, NS::UInteger indirectBufferOffset); + void memoryBarrier(MTL::BarrierScope scope); + void memoryBarrier(const MTL::Resource* const * resources, NS::UInteger count); + void sampleCountersInBuffer(MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier); + void setAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex); + void setBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + void setBufferOffset(NS::UInteger offset, NS::UInteger index); + void setBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + void setBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range); + void setBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, const NS::UInteger * strides, NS::Range range); + void setBytes(const void * bytes, NS::UInteger length, NS::UInteger index); + void setBytes(const void * bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index); + void setComputePipelineState(MTL::ComputePipelineState* state); + void setImageblockWidth(NS::UInteger width, NS::UInteger height); + void setIntersectionFunctionTable(MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex); + void setIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const * intersectionFunctionTables, NS::Range range); + void setSamplerState(MTL::SamplerState* sampler, NS::UInteger index); + void setSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); + void setSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range); + void setSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range); + void setStageInRegion(MTL::Region region); + void setStageInRegion(MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); + void setTexture(MTL::Texture* texture, NS::UInteger index); + void setTextures(const MTL::Texture* const * textures, NS::Range range); + void setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index); + void setVisibleFunctionTable(MTL::VisibleFunctionTable* visibleFunctionTable, NS::UInteger bufferIndex); + void setVisibleFunctionTables(const MTL::VisibleFunctionTable* const * visibleFunctionTables, NS::Range range); + void updateFence(MTL::Fence* fence); + void useHeap(MTL::Heap* heap); + void useHeaps(const MTL::Heap* const * heaps, NS::UInteger count); + void useResource(MTL::Resource* resource, MTL::ResourceUsage usage); + void useResources(const MTL::Resource* const * resources, NS::UInteger count, MTL::ResourceUsage usage); + void waitForFence(MTL::Fence* fence); - void setTexture(const MTL::Texture* texture, NS::UInteger index); - void setTextures(const MTL::Texture* const textures[], NS::Range range); - - void setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index); - - void setVisibleFunctionTable(const MTL::VisibleFunctionTable* visibleFunctionTable, NS::UInteger bufferIndex); - void setVisibleFunctionTables(const MTL::VisibleFunctionTable* const visibleFunctionTables[], NS::Range range); - - void updateFence(const MTL::Fence* fence); - - void useHeap(const MTL::Heap* heap); - void useHeaps(const MTL::Heap* const heaps[], NS::UInteger count); +}; - void useResource(const MTL::Resource* resource, MTL::ResourceUsage usage); - void useResources(const MTL::Resource* const resources[], NS::UInteger count, MTL::ResourceUsage usage); +} // namespace MTL - void waitForFence(const MTL::Fence* fence); -}; +// --- Class symbols + inline implementations --- -} +extern "C" void *OBJC_CLASS_$_MTLComputeCommandEncoder; -_MTL_INLINE void MTL::ComputeCommandEncoder::dispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup) +_MTL_INLINE MTL::DispatchType MTL::ComputeCommandEncoder::dispatchType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchThreadgroups_threadsPerThreadgroup_), threadgroupsPerGrid, threadsPerThreadgroup); + return _MTL_msg_MTL__DispatchType_dispatchType((const void*)this, nullptr); } -_MTL_INLINE void MTL::ComputeCommandEncoder::dispatchThreadgroups(const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset, MTL::Size threadsPerThreadgroup) +_MTL_INLINE void MTL::ComputeCommandEncoder::setComputePipelineState(MTL::ComputePipelineState* state) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerThreadgroup_), indirectBuffer, indirectBufferOffset, threadsPerThreadgroup); + _MTL_msg_v_setComputePipelineState__MTL__ComputePipelineStatep((const void*)this, nullptr, state); } -_MTL_INLINE void MTL::ComputeCommandEncoder::dispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup) +_MTL_INLINE void MTL::ComputeCommandEncoder::setBytes(const void * bytes, NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchThreads_threadsPerThreadgroup_), threadsPerGrid, threadsPerThreadgroup); + _MTL_msg_v_setBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger((const void*)this, nullptr, bytes, length, index); } -_MTL_INLINE MTL::DispatchType MTL::ComputeCommandEncoder::dispatchType() const +_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchType)); + _MTL_msg_v_setBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::ComputeCommandEncoder::executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange) +_MTL_INLINE void MTL::ComputeCommandEncoder::setBufferOffset(NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(executeCommandsInBuffer_withRange_), indirectCommandBuffer, executionRange); + _MTL_msg_v_setBufferOffset_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, offset, index); } -_MTL_INLINE void MTL::ComputeCommandEncoder::executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandbuffer, const MTL::Buffer* indirectRangeBuffer, NS::UInteger indirectBufferOffset) +_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(executeCommandsInBuffer_indirectBuffer_indirectBufferOffset_), indirectCommandbuffer, indirectRangeBuffer, indirectBufferOffset); + _MTL_msg_v_setBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range((const void*)this, nullptr, buffers, offsets, range); } -_MTL_INLINE void MTL::ComputeCommandEncoder::memoryBarrier(MTL::BarrierScope scope) +_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(memoryBarrierWithScope_), scope); + _MTL_msg_v_setBuffer_offset_attributeStride_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, stride, index); } -_MTL_INLINE void MTL::ComputeCommandEncoder::memoryBarrier(const MTL::Resource* const resources[], NS::UInteger count) +_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, const NS::UInteger * strides, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(memoryBarrierWithResources_count_), resources, count); + _MTL_msg_v_setBuffers_offsets_attributeStrides_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_constNS__UIntegerp_NS__Range((const void*)this, nullptr, buffers, offsets, strides, range); } -_MTL_INLINE void MTL::ComputeCommandEncoder::sampleCountersInBuffer(const MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier) +_MTL_INLINE void MTL::ComputeCommandEncoder::setBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleCountersInBuffer_atSampleIndex_withBarrier_), sampleBuffer, sampleIndex, barrier); + _MTL_msg_v_setBufferOffset_attributeStride_atIndex__NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, offset, stride, index); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::ComputeCommandEncoder::setBytes(const void * bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAccelerationStructure_atBufferIndex_), accelerationStructure, bufferIndex); + _MTL_msg_v_setBytes_length_attributeStride_atIndex__constvoidp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, bytes, length, stride, index); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::ComputeCommandEncoder::setVisibleFunctionTable(MTL::VisibleFunctionTable* visibleFunctionTable, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_setVisibleFunctionTable_atBufferIndex__MTL__VisibleFunctionTablep_NS__UInteger((const void*)this, nullptr, visibleFunctionTable, bufferIndex); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +_MTL_INLINE void MTL::ComputeCommandEncoder::setVisibleFunctionTables(const MTL::VisibleFunctionTable* const * visibleFunctionTables, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); + _MTL_msg_v_setVisibleFunctionTables_withBufferRange__constMTL__VisibleFunctionTablepconstp_NS__Range((const void*)this, nullptr, visibleFunctionTables, range); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setBufferOffset(NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::ComputeCommandEncoder::setIntersectionFunctionTable(MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBufferOffset_atIndex_), offset, index); + _MTL_msg_v_setIntersectionFunctionTable_atBufferIndex__MTL__IntersectionFunctionTablep_NS__UInteger((const void*)this, nullptr, intersectionFunctionTable, bufferIndex); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +_MTL_INLINE void MTL::ComputeCommandEncoder::setIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const * intersectionFunctionTables, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBufferOffset_attributeStride_atIndex_), offset, stride, index); + _MTL_msg_v_setIntersectionFunctionTables_withBufferRange__constMTL__IntersectionFunctionTablepconstp_NS__Range((const void*)this, nullptr, intersectionFunctionTables, range); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range) +_MTL_INLINE void MTL::ComputeCommandEncoder::setAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffers_offsets_withRange_), buffers, offsets, range); + _MTL_msg_v_setAccelerationStructure_atBufferIndex__MTL__AccelerationStructurep_NS__UInteger((const void*)this, nullptr, accelerationStructure, bufferIndex); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range) +_MTL_INLINE void MTL::ComputeCommandEncoder::setTexture(MTL::Texture* texture, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffers_offsets_attributeStrides_withRange_), buffers, offsets, strides, range); + _MTL_msg_v_setTexture_atIndex__MTL__Texturep_NS__UInteger((const void*)this, nullptr, texture, index); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setBytes(const void* bytes, NS::UInteger length, NS::UInteger index) +_MTL_INLINE void MTL::ComputeCommandEncoder::setTextures(const MTL::Texture* const * textures, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBytes_length_atIndex_), bytes, length, index); + _MTL_msg_v_setTextures_withRange__constMTL__Texturepconstp_NS__Range((const void*)this, nullptr, textures, range); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index) +_MTL_INLINE void MTL::ComputeCommandEncoder::setSamplerState(MTL::SamplerState* sampler, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBytes_length_attributeStride_atIndex_), bytes, length, stride, index); + _MTL_msg_v_setSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger((const void*)this, nullptr, sampler, index); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setComputePipelineState(const MTL::ComputePipelineState* state) +_MTL_INLINE void MTL::ComputeCommandEncoder::setSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setComputePipelineState_), state); + _MTL_msg_v_setSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range((const void*)this, nullptr, samplers, range); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setImageblockWidth(NS::UInteger width, NS::UInteger height) +_MTL_INLINE void MTL::ComputeCommandEncoder::setSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setImageblockWidth_height_), width, height); + _MTL_msg_v_setSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger((const void*)this, nullptr, sampler, lodMinClamp, lodMaxClamp, index); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setIntersectionFunctionTable(const MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::ComputeCommandEncoder::setSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIntersectionFunctionTable_atBufferIndex_), intersectionFunctionTable, bufferIndex); + _MTL_msg_v_setSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range((const void*)this, nullptr, samplers, lodMinClamps, lodMaxClamps, range); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const intersectionFunctionTables[], NS::Range range) +_MTL_INLINE void MTL::ComputeCommandEncoder::setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIntersectionFunctionTables_withBufferRange_), intersectionFunctionTables, range); + _MTL_msg_v_setThreadgroupMemoryLength_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, length, index); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setSamplerState(const MTL::SamplerState* sampler, NS::UInteger index) +_MTL_INLINE void MTL::ComputeCommandEncoder::setImageblockWidth(NS::UInteger width, NS::UInteger height) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSamplerState_atIndex_), sampler, index); + _MTL_msg_v_setImageblockWidth_height__NS__UInteger_NS__UInteger((const void*)this, nullptr, width, height); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) +_MTL_INLINE void MTL::ComputeCommandEncoder::setStageInRegion(MTL::Region region) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSamplerState_lodMinClamp_lodMaxClamp_atIndex_), sampler, lodMinClamp, lodMaxClamp, index); + _MTL_msg_v_setStageInRegion__MTL__Region((const void*)this, nullptr, region); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range) +_MTL_INLINE void MTL::ComputeCommandEncoder::setStageInRegion(MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSamplerStates_withRange_), samplers, range); + _MTL_msg_v_setStageInRegionWithIndirectBuffer_indirectBufferOffset__MTL__Bufferp_NS__UInteger((const void*)this, nullptr, indirectBuffer, indirectBufferOffset); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setSamplerStates(const MTL::SamplerState* const samplers[], const float lodMinClamps[], const float lodMaxClamps[], NS::Range range) +_MTL_INLINE void MTL::ComputeCommandEncoder::dispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSamplerStates_lodMinClamps_lodMaxClamps_withRange_), samplers, lodMinClamps, lodMaxClamps, range); + _MTL_msg_v_dispatchThreadgroups_threadsPerThreadgroup__MTL__Size_MTL__Size((const void*)this, nullptr, threadgroupsPerGrid, threadsPerThreadgroup); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setStageInRegion(MTL::Region region) +_MTL_INLINE void MTL::ComputeCommandEncoder::dispatchThreadgroups(MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset, MTL::Size threadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStageInRegion_), region); + _MTL_msg_v_dispatchThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerThreadgroup__MTL__Bufferp_NS__UInteger_MTL__Size((const void*)this, nullptr, indirectBuffer, indirectBufferOffset, threadsPerThreadgroup); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setStageInRegion(const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) +_MTL_INLINE void MTL::ComputeCommandEncoder::dispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStageInRegionWithIndirectBuffer_indirectBufferOffset_), indirectBuffer, indirectBufferOffset); + _MTL_msg_v_dispatchThreads_threadsPerThreadgroup__MTL__Size_MTL__Size((const void*)this, nullptr, threadsPerGrid, threadsPerThreadgroup); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setTexture(const MTL::Texture* texture, NS::UInteger index) +_MTL_INLINE void MTL::ComputeCommandEncoder::updateFence(MTL::Fence* fence) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTexture_atIndex_), texture, index); + _MTL_msg_v_updateFence__MTL__Fencep((const void*)this, nullptr, fence); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setTextures(const MTL::Texture* const textures[], NS::Range range) +_MTL_INLINE void MTL::ComputeCommandEncoder::waitForFence(MTL::Fence* fence) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTextures_withRange_), textures, range); + _MTL_msg_v_waitForFence__MTL__Fencep((const void*)this, nullptr, fence); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) +_MTL_INLINE void MTL::ComputeCommandEncoder::useResource(MTL::Resource* resource, MTL::ResourceUsage usage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadgroupMemoryLength_atIndex_), length, index); + _MTL_msg_v_useResource_usage__MTL__Resourcep_MTL__ResourceUsage((const void*)this, nullptr, resource, usage); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setVisibleFunctionTable(const MTL::VisibleFunctionTable* visibleFunctionTable, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::ComputeCommandEncoder::useResources(const MTL::Resource* const * resources, NS::UInteger count, MTL::ResourceUsage usage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibleFunctionTable_atBufferIndex_), visibleFunctionTable, bufferIndex); + _MTL_msg_v_useResources_count_usage__constMTL__Resourcepconstp_NS__UInteger_MTL__ResourceUsage((const void*)this, nullptr, resources, count, usage); } -_MTL_INLINE void MTL::ComputeCommandEncoder::setVisibleFunctionTables(const MTL::VisibleFunctionTable* const visibleFunctionTables[], NS::Range range) +_MTL_INLINE void MTL::ComputeCommandEncoder::useHeap(MTL::Heap* heap) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibleFunctionTables_withBufferRange_), visibleFunctionTables, range); + _MTL_msg_v_useHeap__MTL__Heapp((const void*)this, nullptr, heap); } -_MTL_INLINE void MTL::ComputeCommandEncoder::updateFence(const MTL::Fence* fence) +_MTL_INLINE void MTL::ComputeCommandEncoder::useHeaps(const MTL::Heap* const * heaps, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateFence_), fence); + _MTL_msg_v_useHeaps_count__constMTL__Heappconstp_NS__UInteger((const void*)this, nullptr, heaps, count); } -_MTL_INLINE void MTL::ComputeCommandEncoder::useHeap(const MTL::Heap* heap) +_MTL_INLINE void MTL::ComputeCommandEncoder::executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useHeap_), heap); + _MTL_msg_v_executeCommandsInBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range((const void*)this, nullptr, indirectCommandBuffer, executionRange); } -_MTL_INLINE void MTL::ComputeCommandEncoder::useHeaps(const MTL::Heap* const heaps[], NS::UInteger count) +_MTL_INLINE void MTL::ComputeCommandEncoder::executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandbuffer, MTL::Buffer* indirectRangeBuffer, NS::UInteger indirectBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useHeaps_count_), heaps, count); + _MTL_msg_v_executeCommandsInBuffer_indirectBuffer_indirectBufferOffset__MTL__IndirectCommandBufferp_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, indirectCommandbuffer, indirectRangeBuffer, indirectBufferOffset); } -_MTL_INLINE void MTL::ComputeCommandEncoder::useResource(const MTL::Resource* resource, MTL::ResourceUsage usage) +_MTL_INLINE void MTL::ComputeCommandEncoder::memoryBarrier(MTL::BarrierScope scope) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResource_usage_), resource, usage); + _MTL_msg_v_memoryBarrierWithScope__MTL__BarrierScope((const void*)this, nullptr, scope); } -_MTL_INLINE void MTL::ComputeCommandEncoder::useResources(const MTL::Resource* const resources[], NS::UInteger count, MTL::ResourceUsage usage) +_MTL_INLINE void MTL::ComputeCommandEncoder::memoryBarrier(const MTL::Resource* const * resources, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResources_count_usage_), resources, count, usage); + _MTL_msg_v_memoryBarrierWithResources_count__constMTL__Resourcepconstp_NS__UInteger((const void*)this, nullptr, resources, count); } -_MTL_INLINE void MTL::ComputeCommandEncoder::waitForFence(const MTL::Fence* fence) +_MTL_INLINE void MTL::ComputeCommandEncoder::sampleCountersInBuffer(MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitForFence_), fence); + _MTL_msg_v_sampleCountersInBuffer_atSampleIndex_withBarrier__MTL__CounterSampleBufferp_NS__UInteger_bool((const void*)this, nullptr, sampleBuffer, sampleIndex, barrier); } diff --git a/thirdparty/metal-cpp/Metal/MTLComputePass.hpp b/thirdparty/metal-cpp/Metal/MTLComputePass.hpp index fb34f7d8491e..9b2447a74f18 100644 --- a/thirdparty/metal-cpp/Metal/MTLComputePass.hpp +++ b/thirdparty/metal-cpp/Metal/MTLComputePass.hpp @@ -1,169 +1,159 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLComputePass.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLCommandBuffer.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class CounterSampleBuffer; + enum DispatchType : NS::UInteger; +} namespace MTL { -class ComputePassDescriptor; + class ComputePassSampleBufferAttachmentDescriptor; class ComputePassSampleBufferAttachmentDescriptorArray; -class CounterSampleBuffer; +class ComputePassDescriptor; class ComputePassSampleBufferAttachmentDescriptor : public NS::Copying { public: static ComputePassSampleBufferAttachmentDescriptor* alloc(); + ComputePassSampleBufferAttachmentDescriptor* init() const; - NS::UInteger endOfEncoderSampleIndex() const; - - ComputePassSampleBufferAttachmentDescriptor* init(); - - CounterSampleBuffer* sampleBuffer() const; - - void setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex); + NS::UInteger endOfEncoderSampleIndex() const; + MTL::CounterSampleBuffer* sampleBuffer() const; + void setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex); + void setSampleBuffer(MTL::CounterSampleBuffer* sampleBuffer); + void setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex); + NS::UInteger startOfEncoderSampleIndex() const; - void setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer); - - void setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex); - NS::UInteger startOfEncoderSampleIndex() const; }; + class ComputePassSampleBufferAttachmentDescriptorArray : public NS::Referencing { public: static ComputePassSampleBufferAttachmentDescriptorArray* alloc(); + ComputePassSampleBufferAttachmentDescriptorArray* init() const; - ComputePassSampleBufferAttachmentDescriptorArray* init(); + MTL::ComputePassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); + void setObject(MTL::ComputePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); - ComputePassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); - void setObject(const MTL::ComputePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); }; + class ComputePassDescriptor : public NS::Copying { public: - static ComputePassDescriptor* alloc(); + static ComputePassDescriptor* alloc(); + ComputePassDescriptor* init() const; + + static MTL::ComputePassDescriptor* computePassDescriptor(); - static ComputePassDescriptor* computePassDescriptor(); + MTL::DispatchType dispatchType() const; + MTL::ComputePassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; + void setDispatchType(MTL::DispatchType dispatchType); - DispatchType dispatchType() const; +}; - ComputePassDescriptor* init(); +} // namespace MTL - ComputePassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; +// --- Class symbols + inline implementations --- - void setDispatchType(MTL::DispatchType dispatchType); -}; +extern "C" void *OBJC_CLASS_$_MTLComputePassSampleBufferAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLComputePassSampleBufferAttachmentDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLComputePassDescriptor; -} _MTL_INLINE MTL::ComputePassSampleBufferAttachmentDescriptor* MTL::ComputePassSampleBufferAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLComputePassSampleBufferAttachmentDescriptor)); + return _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLComputePassSampleBufferAttachmentDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::ComputePassSampleBufferAttachmentDescriptor::endOfEncoderSampleIndex() const +_MTL_INLINE MTL::ComputePassSampleBufferAttachmentDescriptor* MTL::ComputePassSampleBufferAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(endOfEncoderSampleIndex)); + return _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::ComputePassSampleBufferAttachmentDescriptor* MTL::ComputePassSampleBufferAttachmentDescriptor::init() +_MTL_INLINE MTL::CounterSampleBuffer* MTL::ComputePassSampleBufferAttachmentDescriptor::sampleBuffer() const { - return NS::Object::init(); + return _MTL_msg_MTL__CounterSampleBufferp_sampleBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::CounterSampleBuffer* MTL::ComputePassSampleBufferAttachmentDescriptor::sampleBuffer() const +_MTL_INLINE void MTL::ComputePassSampleBufferAttachmentDescriptor::setSampleBuffer(MTL::CounterSampleBuffer* sampleBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleBuffer)); + _MTL_msg_v_setSampleBuffer__MTL__CounterSampleBufferp((const void*)this, nullptr, sampleBuffer); } -_MTL_INLINE void MTL::ComputePassSampleBufferAttachmentDescriptor::setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex) +_MTL_INLINE NS::UInteger MTL::ComputePassSampleBufferAttachmentDescriptor::startOfEncoderSampleIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setEndOfEncoderSampleIndex_), endOfEncoderSampleIndex); + return _MTL_msg_NS__UInteger_startOfEncoderSampleIndex((const void*)this, nullptr); } -_MTL_INLINE void MTL::ComputePassSampleBufferAttachmentDescriptor::setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer) +_MTL_INLINE void MTL::ComputePassSampleBufferAttachmentDescriptor::setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSampleBuffer_), sampleBuffer); + _MTL_msg_v_setStartOfEncoderSampleIndex__NS__UInteger((const void*)this, nullptr, startOfEncoderSampleIndex); } -_MTL_INLINE void MTL::ComputePassSampleBufferAttachmentDescriptor::setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex) +_MTL_INLINE NS::UInteger MTL::ComputePassSampleBufferAttachmentDescriptor::endOfEncoderSampleIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStartOfEncoderSampleIndex_), startOfEncoderSampleIndex); + return _MTL_msg_NS__UInteger_endOfEncoderSampleIndex((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::ComputePassSampleBufferAttachmentDescriptor::startOfEncoderSampleIndex() const +_MTL_INLINE void MTL::ComputePassSampleBufferAttachmentDescriptor::setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(startOfEncoderSampleIndex)); + _MTL_msg_v_setEndOfEncoderSampleIndex__NS__UInteger((const void*)this, nullptr, endOfEncoderSampleIndex); } _MTL_INLINE MTL::ComputePassSampleBufferAttachmentDescriptorArray* MTL::ComputePassSampleBufferAttachmentDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLComputePassSampleBufferAttachmentDescriptorArray)); + return _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLComputePassSampleBufferAttachmentDescriptorArray, nullptr); } -_MTL_INLINE MTL::ComputePassSampleBufferAttachmentDescriptorArray* MTL::ComputePassSampleBufferAttachmentDescriptorArray::init() +_MTL_INLINE MTL::ComputePassSampleBufferAttachmentDescriptorArray* MTL::ComputePassSampleBufferAttachmentDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::ComputePassSampleBufferAttachmentDescriptor* MTL::ComputePassSampleBufferAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex); + return _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, attachmentIndex); } -_MTL_INLINE void MTL::ComputePassSampleBufferAttachmentDescriptorArray::setObject(const MTL::ComputePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) +_MTL_INLINE void MTL::ComputePassSampleBufferAttachmentDescriptorArray::setObject(MTL::ComputePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__ComputePassSampleBufferAttachmentDescriptorp_NS__UInteger((const void*)this, nullptr, attachment, attachmentIndex); } _MTL_INLINE MTL::ComputePassDescriptor* MTL::ComputePassDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLComputePassDescriptor)); + return _MTL_msg_MTL__ComputePassDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLComputePassDescriptor, nullptr); } -_MTL_INLINE MTL::ComputePassDescriptor* MTL::ComputePassDescriptor::computePassDescriptor() +_MTL_INLINE MTL::ComputePassDescriptor* MTL::ComputePassDescriptor::init() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLComputePassDescriptor), _MTL_PRIVATE_SEL(computePassDescriptor)); + return _MTL_msg_MTL__ComputePassDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::DispatchType MTL::ComputePassDescriptor::dispatchType() const +_MTL_INLINE MTL::ComputePassDescriptor* MTL::ComputePassDescriptor::computePassDescriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchType)); + return _MTL_msg_MTL__ComputePassDescriptorp_computePassDescriptor((const void*)&OBJC_CLASS_$_MTLComputePassDescriptor, nullptr); } -_MTL_INLINE MTL::ComputePassDescriptor* MTL::ComputePassDescriptor::init() +_MTL_INLINE MTL::DispatchType MTL::ComputePassDescriptor::dispatchType() const { - return NS::Object::init(); + return _MTL_msg_MTL__DispatchType_dispatchType((const void*)this, nullptr); } -_MTL_INLINE MTL::ComputePassSampleBufferAttachmentDescriptorArray* MTL::ComputePassDescriptor::sampleBufferAttachments() const +_MTL_INLINE void MTL::ComputePassDescriptor::setDispatchType(MTL::DispatchType dispatchType) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleBufferAttachments)); + _MTL_msg_v_setDispatchType__MTL__DispatchType((const void*)this, nullptr, dispatchType); } -_MTL_INLINE void MTL::ComputePassDescriptor::setDispatchType(MTL::DispatchType dispatchType) +_MTL_INLINE MTL::ComputePassSampleBufferAttachmentDescriptorArray* MTL::ComputePassDescriptor::sampleBufferAttachments() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDispatchType_), dispatchType); + return _MTL_msg_MTL__ComputePassSampleBufferAttachmentDescriptorArrayp_sampleBufferAttachments((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLComputePipeline.hpp b/thirdparty/metal-cpp/Metal/MTLComputePipeline.hpp index d200af75b229..62568d94fd36 100644 --- a/thirdparty/metal-cpp/Metal/MTLComputePipeline.hpp +++ b/thirdparty/metal-cpp/Metal/MTLComputePipeline.hpp @@ -1,439 +1,385 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLComputePipeline.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLAllocation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPipeline.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLAllocation.hpp" + +namespace MTL { + class Device; + class Function; + class FunctionHandle; + class IntersectionFunctionTable; + class IntersectionFunctionTableDescriptor; + class LinkedFunctions; + class PipelineBufferDescriptorArray; + class StageInputOutputDescriptor; + class VisibleFunctionTable; + class VisibleFunctionTableDescriptor; + enum ShaderValidation : NS::Integer; +} +namespace MTL4 { + class BinaryFunction; +} +namespace NS { + class Array; + class Error; + class String; +} namespace MTL { -class ComputePipelineDescriptor; + class ComputePipelineReflection; +class ComputePipelineDescriptor; class ComputePipelineState; -class Device; -class Function; -class FunctionHandle; -class IntersectionFunctionTable; -class IntersectionFunctionTableDescriptor; -class LinkedFunctions; -class PipelineBufferDescriptorArray; -class StageInputOutputDescriptor; -class VisibleFunctionTable; -class VisibleFunctionTableDescriptor; - -} -namespace MTL4 -{ -class BinaryFunction; -} -namespace MTL -{ class ComputePipelineReflection : public NS::Referencing { public: static ComputePipelineReflection* alloc(); + ComputePipelineReflection* init() const; - NS::Array* arguments() const; - - NS::Array* bindings() const; + NS::Array* arguments() const; + NS::Array* bindings() const; - ComputePipelineReflection* init(); }; + class ComputePipelineDescriptor : public NS::Copying { public: static ComputePipelineDescriptor* alloc(); + ComputePipelineDescriptor* init() const; + + NS::Array* binaryArchives() const; + MTL::PipelineBufferDescriptorArray* buffers() const; + MTL::Function* computeFunction() const; + NS::Array* insertLibraries() const; + NS::String* label() const; + MTL::LinkedFunctions* linkedFunctions() const; + NS::UInteger maxCallStackDepth() const; + NS::UInteger maxTotalThreadsPerThreadgroup() const; + NS::Array* preloadedLibraries() const; + MTL::Size requiredThreadsPerThreadgroup() const; + void reset(); + void setBinaryArchives(NS::Array* binaryArchives); + void setComputeFunction(MTL::Function* computeFunction); + void setInsertLibraries(NS::Array* insertLibraries); + void setLabel(NS::String* label); + void setLinkedFunctions(MTL::LinkedFunctions* linkedFunctions); + void setMaxCallStackDepth(NS::UInteger maxCallStackDepth); + void setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup); + void setPreloadedLibraries(NS::Array* preloadedLibraries); + void setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup); + void setShaderValidation(MTL::ShaderValidation shaderValidation); + void setStageInputDescriptor(MTL::StageInputOutputDescriptor* stageInputDescriptor); + void setSupportAddingBinaryFunctions(bool supportAddingBinaryFunctions); + void setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers); + void setThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool threadGroupSizeIsMultipleOfThreadExecutionWidth); + MTL::ShaderValidation shaderValidation() const; + MTL::StageInputOutputDescriptor* stageInputDescriptor() const; + bool supportAddingBinaryFunctions() const; + bool supportIndirectCommandBuffers() const; + bool threadGroupSizeIsMultipleOfThreadExecutionWidth() const; - NS::Array* binaryArchives() const; - - PipelineBufferDescriptorArray* buffers() const; - - Function* computeFunction() const; - - ComputePipelineDescriptor* init(); - - NS::Array* insertLibraries() const; - - NS::String* label() const; - - LinkedFunctions* linkedFunctions() const; - - NS::UInteger maxCallStackDepth() const; - - NS::UInteger maxTotalThreadsPerThreadgroup() const; - - NS::Array* preloadedLibraries() const; - - Size requiredThreadsPerThreadgroup() const; - - void reset(); - - void setBinaryArchives(const NS::Array* binaryArchives); - - void setComputeFunction(const MTL::Function* computeFunction); - - void setInsertLibraries(const NS::Array* insertLibraries); - - void setLabel(const NS::String* label); - - void setLinkedFunctions(const MTL::LinkedFunctions* linkedFunctions); - - void setMaxCallStackDepth(NS::UInteger maxCallStackDepth); - - void setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup); - - void setPreloadedLibraries(const NS::Array* preloadedLibraries); - - void setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup); - - void setShaderValidation(MTL::ShaderValidation shaderValidation); - - void setStageInputDescriptor(const MTL::StageInputOutputDescriptor* stageInputDescriptor); - - void setSupportAddingBinaryFunctions(bool supportAddingBinaryFunctions); - - void setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers); - - void setThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool threadGroupSizeIsMultipleOfThreadExecutionWidth); - - ShaderValidation shaderValidation() const; - - StageInputOutputDescriptor* stageInputDescriptor() const; - - bool supportAddingBinaryFunctions() const; - - bool supportIndirectCommandBuffers() const; - - bool threadGroupSizeIsMultipleOfThreadExecutionWidth() const; }; -class ComputePipelineState : public NS::Referencing + +class ComputePipelineState : public NS::Referencing { public: - Device* device() const; - - FunctionHandle* functionHandle(const NS::String* name); - FunctionHandle* functionHandle(const MTL4::BinaryFunction* function); - FunctionHandle* functionHandle(const MTL::Function* function); + MTL::Device* device() const; + MTL::FunctionHandle* functionHandle(NS::String* name); + MTL::FunctionHandle* functionHandle(MTL4::BinaryFunction* function); + MTL::FunctionHandle* functionHandle(MTL::Function* function); + MTL::ResourceID gpuResourceID() const; + NS::UInteger imageblockMemoryLength(MTL::Size imageblockDimensions); + NS::String* label() const; + NS::UInteger maxTotalThreadsPerThreadgroup() const; + MTL::ComputePipelineState* newComputePipelineState(NS::Array* additionalBinaryFunctions, NS::Error** error); + MTL::IntersectionFunctionTable* newIntersectionFunctionTable(MTL::IntersectionFunctionTableDescriptor* descriptor); + MTL::VisibleFunctionTable* newVisibleFunctionTable(MTL::VisibleFunctionTableDescriptor* descriptor); + MTL::ComputePipelineReflection* reflection() const; + MTL::Size requiredThreadsPerThreadgroup() const; + MTL::ShaderValidation shaderValidation() const; + NS::UInteger staticThreadgroupMemoryLength() const; + bool supportIndirectCommandBuffers() const; + NS::UInteger threadExecutionWidth() const; - ResourceID gpuResourceID() const; - - NS::UInteger imageblockMemoryLength(MTL::Size imageblockDimensions); - - NS::String* label() const; - - NS::UInteger maxTotalThreadsPerThreadgroup() const; - - ComputePipelineState* newComputePipelineStateWithBinaryFunctions(const NS::Array* additionalBinaryFunctions, NS::Error** error); - ComputePipelineState* newComputePipelineState(const NS::Array* functions, NS::Error** error); - - IntersectionFunctionTable* newIntersectionFunctionTable(const MTL::IntersectionFunctionTableDescriptor* descriptor); - - VisibleFunctionTable* newVisibleFunctionTable(const MTL::VisibleFunctionTableDescriptor* descriptor); - - ComputePipelineReflection* reflection() const; - - Size requiredThreadsPerThreadgroup() const; - - ShaderValidation shaderValidation() const; +}; - NS::UInteger staticThreadgroupMemoryLength() const; +} // namespace MTL - bool supportIndirectCommandBuffers() const; +// --- Class symbols + inline implementations --- - NS::UInteger threadExecutionWidth() const; -}; +extern "C" void *OBJC_CLASS_$_MTLComputePipelineReflection; +extern "C" void *OBJC_CLASS_$_MTLComputePipelineDescriptor; +extern "C" void *OBJC_CLASS_$_MTLComputePipelineState; -} _MTL_INLINE MTL::ComputePipelineReflection* MTL::ComputePipelineReflection::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLComputePipelineReflection)); + return _MTL_msg_MTL__ComputePipelineReflectionp_alloc((const void*)&OBJC_CLASS_$_MTLComputePipelineReflection, nullptr); } -_MTL_INLINE NS::Array* MTL::ComputePipelineReflection::arguments() const +_MTL_INLINE MTL::ComputePipelineReflection* MTL::ComputePipelineReflection::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(arguments)); + return _MTL_msg_MTL__ComputePipelineReflectionp_init((const void*)this, nullptr); } _MTL_INLINE NS::Array* MTL::ComputePipelineReflection::bindings() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bindings)); + return _MTL_msg_NS__Arrayp_bindings((const void*)this, nullptr); } -_MTL_INLINE MTL::ComputePipelineReflection* MTL::ComputePipelineReflection::init() +_MTL_INLINE NS::Array* MTL::ComputePipelineReflection::arguments() const { - return NS::Object::init(); + return _MTL_msg_NS__Arrayp_arguments((const void*)this, nullptr); } _MTL_INLINE MTL::ComputePipelineDescriptor* MTL::ComputePipelineDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLComputePipelineDescriptor)); + return _MTL_msg_MTL__ComputePipelineDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLComputePipelineDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL::ComputePipelineDescriptor::binaryArchives() const +_MTL_INLINE MTL::ComputePipelineDescriptor* MTL::ComputePipelineDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(binaryArchives)); + return _MTL_msg_MTL__ComputePipelineDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::ComputePipelineDescriptor::buffers() const +_MTL_INLINE NS::String* MTL::ComputePipelineDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(buffers)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::Function* MTL::ComputePipelineDescriptor::computeFunction() const +_MTL_INLINE void MTL::ComputePipelineDescriptor::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(computeFunction)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE MTL::ComputePipelineDescriptor* MTL::ComputePipelineDescriptor::init() +_MTL_INLINE MTL::Function* MTL::ComputePipelineDescriptor::computeFunction() const { - return NS::Object::init(); + return _MTL_msg_MTL__Functionp_computeFunction((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::ComputePipelineDescriptor::insertLibraries() const +_MTL_INLINE void MTL::ComputePipelineDescriptor::setComputeFunction(MTL::Function* computeFunction) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(insertLibraries)); + _MTL_msg_v_setComputeFunction__MTL__Functionp((const void*)this, nullptr, computeFunction); } -_MTL_INLINE NS::String* MTL::ComputePipelineDescriptor::label() const +_MTL_INLINE bool MTL::ComputePipelineDescriptor::threadGroupSizeIsMultipleOfThreadExecutionWidth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_bool_threadGroupSizeIsMultipleOfThreadExecutionWidth((const void*)this, nullptr); } -_MTL_INLINE MTL::LinkedFunctions* MTL::ComputePipelineDescriptor::linkedFunctions() const +_MTL_INLINE void MTL::ComputePipelineDescriptor::setThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool threadGroupSizeIsMultipleOfThreadExecutionWidth) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(linkedFunctions)); + _MTL_msg_v_setThreadGroupSizeIsMultipleOfThreadExecutionWidth__bool((const void*)this, nullptr, threadGroupSizeIsMultipleOfThreadExecutionWidth); } -_MTL_INLINE NS::UInteger MTL::ComputePipelineDescriptor::maxCallStackDepth() const +_MTL_INLINE NS::UInteger MTL::ComputePipelineDescriptor::maxTotalThreadsPerThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxCallStackDepth)); + return _MTL_msg_NS__UInteger_maxTotalThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::ComputePipelineDescriptor::maxTotalThreadsPerThreadgroup() const +_MTL_INLINE void MTL::ComputePipelineDescriptor::setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerThreadgroup)); + _MTL_msg_v_setMaxTotalThreadsPerThreadgroup__NS__UInteger((const void*)this, nullptr, maxTotalThreadsPerThreadgroup); } -_MTL_INLINE NS::Array* MTL::ComputePipelineDescriptor::preloadedLibraries() const +_MTL_INLINE MTL::StageInputOutputDescriptor* MTL::ComputePipelineDescriptor::stageInputDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(preloadedLibraries)); + return _MTL_msg_MTL__StageInputOutputDescriptorp_stageInputDescriptor((const void*)this, nullptr); } -_MTL_INLINE MTL::Size MTL::ComputePipelineDescriptor::requiredThreadsPerThreadgroup() const +_MTL_INLINE void MTL::ComputePipelineDescriptor::setStageInputDescriptor(MTL::StageInputOutputDescriptor* stageInputDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerThreadgroup)); + _MTL_msg_v_setStageInputDescriptor__MTL__StageInputOutputDescriptorp((const void*)this, nullptr, stageInputDescriptor); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::reset() +_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::ComputePipelineDescriptor::buffers() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + return _MTL_msg_MTL__PipelineBufferDescriptorArrayp_buffers((const void*)this, nullptr); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setBinaryArchives(const NS::Array* binaryArchives) +_MTL_INLINE bool MTL::ComputePipelineDescriptor::supportIndirectCommandBuffers() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBinaryArchives_), binaryArchives); + return _MTL_msg_bool_supportIndirectCommandBuffers((const void*)this, nullptr); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setComputeFunction(const MTL::Function* computeFunction) +_MTL_INLINE void MTL::ComputePipelineDescriptor::setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setComputeFunction_), computeFunction); + _MTL_msg_v_setSupportIndirectCommandBuffers__bool((const void*)this, nullptr, supportIndirectCommandBuffers); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setInsertLibraries(const NS::Array* insertLibraries) +_MTL_INLINE NS::Array* MTL::ComputePipelineDescriptor::insertLibraries() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInsertLibraries_), insertLibraries); + return _MTL_msg_NS__Arrayp_insertLibraries((const void*)this, nullptr); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setLabel(const NS::String* label) +_MTL_INLINE void MTL::ComputePipelineDescriptor::setInsertLibraries(NS::Array* insertLibraries) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setInsertLibraries__NS__Arrayp((const void*)this, nullptr, insertLibraries); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setLinkedFunctions(const MTL::LinkedFunctions* linkedFunctions) +_MTL_INLINE NS::Array* MTL::ComputePipelineDescriptor::preloadedLibraries() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLinkedFunctions_), linkedFunctions); + return _MTL_msg_NS__Arrayp_preloadedLibraries((const void*)this, nullptr); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setMaxCallStackDepth(NS::UInteger maxCallStackDepth) +_MTL_INLINE void MTL::ComputePipelineDescriptor::setPreloadedLibraries(NS::Array* preloadedLibraries) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxCallStackDepth_), maxCallStackDepth); + _MTL_msg_v_setPreloadedLibraries__NS__Arrayp((const void*)this, nullptr, preloadedLibraries); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup) +_MTL_INLINE NS::Array* MTL::ComputePipelineDescriptor::binaryArchives() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadsPerThreadgroup_), maxTotalThreadsPerThreadgroup); + return _MTL_msg_NS__Arrayp_binaryArchives((const void*)this, nullptr); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setPreloadedLibraries(const NS::Array* preloadedLibraries) +_MTL_INLINE void MTL::ComputePipelineDescriptor::setBinaryArchives(NS::Array* binaryArchives) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPreloadedLibraries_), preloadedLibraries); + _MTL_msg_v_setBinaryArchives__NS__Arrayp((const void*)this, nullptr, binaryArchives); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup) +_MTL_INLINE MTL::LinkedFunctions* MTL::ComputePipelineDescriptor::linkedFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRequiredThreadsPerThreadgroup_), requiredThreadsPerThreadgroup); + return _MTL_msg_MTL__LinkedFunctionsp_linkedFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setShaderValidation(MTL::ShaderValidation shaderValidation) +_MTL_INLINE void MTL::ComputePipelineDescriptor::setLinkedFunctions(MTL::LinkedFunctions* linkedFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setShaderValidation_), shaderValidation); + _MTL_msg_v_setLinkedFunctions__MTL__LinkedFunctionsp((const void*)this, nullptr, linkedFunctions); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setStageInputDescriptor(const MTL::StageInputOutputDescriptor* stageInputDescriptor) +_MTL_INLINE bool MTL::ComputePipelineDescriptor::supportAddingBinaryFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStageInputDescriptor_), stageInputDescriptor); + return _MTL_msg_bool_supportAddingBinaryFunctions((const void*)this, nullptr); } _MTL_INLINE void MTL::ComputePipelineDescriptor::setSupportAddingBinaryFunctions(bool supportAddingBinaryFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportAddingBinaryFunctions_), supportAddingBinaryFunctions); + _MTL_msg_v_setSupportAddingBinaryFunctions__bool((const void*)this, nullptr, supportAddingBinaryFunctions); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers) +_MTL_INLINE NS::UInteger MTL::ComputePipelineDescriptor::maxCallStackDepth() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportIndirectCommandBuffers_), supportIndirectCommandBuffers); + return _MTL_msg_NS__UInteger_maxCallStackDepth((const void*)this, nullptr); } -_MTL_INLINE void MTL::ComputePipelineDescriptor::setThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool threadGroupSizeIsMultipleOfThreadExecutionWidth) +_MTL_INLINE void MTL::ComputePipelineDescriptor::setMaxCallStackDepth(NS::UInteger maxCallStackDepth) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadGroupSizeIsMultipleOfThreadExecutionWidth_), threadGroupSizeIsMultipleOfThreadExecutionWidth); + _MTL_msg_v_setMaxCallStackDepth__NS__UInteger((const void*)this, nullptr, maxCallStackDepth); } _MTL_INLINE MTL::ShaderValidation MTL::ComputePipelineDescriptor::shaderValidation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(shaderValidation)); + return _MTL_msg_MTL__ShaderValidation_shaderValidation((const void*)this, nullptr); } -_MTL_INLINE MTL::StageInputOutputDescriptor* MTL::ComputePipelineDescriptor::stageInputDescriptor() const -{ - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stageInputDescriptor)); -} - -_MTL_INLINE bool MTL::ComputePipelineDescriptor::supportAddingBinaryFunctions() const +_MTL_INLINE void MTL::ComputePipelineDescriptor::setShaderValidation(MTL::ShaderValidation shaderValidation) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportAddingBinaryFunctions)); + _MTL_msg_v_setShaderValidation__MTL__ShaderValidation((const void*)this, nullptr, shaderValidation); } -_MTL_INLINE bool MTL::ComputePipelineDescriptor::supportIndirectCommandBuffers() const +_MTL_INLINE MTL::Size MTL::ComputePipelineDescriptor::requiredThreadsPerThreadgroup() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers)); + return _MTL_msg_MTL__Size_requiredThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE bool MTL::ComputePipelineDescriptor::threadGroupSizeIsMultipleOfThreadExecutionWidth() const +_MTL_INLINE void MTL::ComputePipelineDescriptor::setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadGroupSizeIsMultipleOfThreadExecutionWidth)); + _MTL_msg_v_setRequiredThreadsPerThreadgroup__MTL__Size((const void*)this, nullptr, requiredThreadsPerThreadgroup); } -_MTL_INLINE MTL::Device* MTL::ComputePipelineState::device() const +_MTL_INLINE void MTL::ComputePipelineDescriptor::reset() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + _MTL_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionHandle* MTL::ComputePipelineState::functionHandle(const NS::String* name) +_MTL_INLINE NS::String* MTL::ComputePipelineState::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionHandleWithName_), name); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionHandle* MTL::ComputePipelineState::functionHandle(const MTL4::BinaryFunction* function) +_MTL_INLINE MTL::ComputePipelineReflection* MTL::ComputePipelineState::reflection() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionHandleWithBinaryFunction_), function); + return _MTL_msg_MTL__ComputePipelineReflectionp_reflection((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionHandle* MTL::ComputePipelineState::functionHandle(const MTL::Function* function) +_MTL_INLINE MTL::Device* MTL::ComputePipelineState::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionHandleWithFunction_), function); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceID MTL::ComputePipelineState::gpuResourceID() const +_MTL_INLINE NS::UInteger MTL::ComputePipelineState::maxTotalThreadsPerThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_NS__UInteger_maxTotalThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::ComputePipelineState::imageblockMemoryLength(MTL::Size imageblockDimensions) +_MTL_INLINE NS::UInteger MTL::ComputePipelineState::threadExecutionWidth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(imageblockMemoryLengthForDimensions_), imageblockDimensions); + return _MTL_msg_NS__UInteger_threadExecutionWidth((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::ComputePipelineState::label() const +_MTL_INLINE NS::UInteger MTL::ComputePipelineState::staticThreadgroupMemoryLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__UInteger_staticThreadgroupMemoryLength((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::ComputePipelineState::maxTotalThreadsPerThreadgroup() const +_MTL_INLINE bool MTL::ComputePipelineState::supportIndirectCommandBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerThreadgroup)); + return _MTL_msg_bool_supportIndirectCommandBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL::ComputePipelineState* MTL::ComputePipelineState::newComputePipelineStateWithBinaryFunctions(const NS::Array* additionalBinaryFunctions, NS::Error** error) +_MTL_INLINE MTL::ResourceID MTL::ComputePipelineState::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithBinaryFunctions_error_), additionalBinaryFunctions, error); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } -_MTL_INLINE MTL::ComputePipelineState* MTL::ComputePipelineState::newComputePipelineState(const NS::Array* functions, NS::Error** error) +_MTL_INLINE MTL::ShaderValidation MTL::ComputePipelineState::shaderValidation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithAdditionalBinaryFunctions_error_), functions, error); + return _MTL_msg_MTL__ShaderValidation_shaderValidation((const void*)this, nullptr); } -_MTL_INLINE MTL::IntersectionFunctionTable* MTL::ComputePipelineState::newIntersectionFunctionTable(const MTL::IntersectionFunctionTableDescriptor* descriptor) +_MTL_INLINE MTL::Size MTL::ComputePipelineState::requiredThreadsPerThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIntersectionFunctionTableWithDescriptor_), descriptor); + return _MTL_msg_MTL__Size_requiredThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE MTL::VisibleFunctionTable* MTL::ComputePipelineState::newVisibleFunctionTable(const MTL::VisibleFunctionTableDescriptor* descriptor) +_MTL_INLINE MTL::FunctionHandle* MTL::ComputePipelineState::functionHandle(NS::String* name) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newVisibleFunctionTableWithDescriptor_), descriptor); + return _MTL_msg_MTL__FunctionHandlep_functionHandleWithName__NS__Stringp((const void*)this, nullptr, name); } -_MTL_INLINE MTL::ComputePipelineReflection* MTL::ComputePipelineState::reflection() const +_MTL_INLINE MTL::FunctionHandle* MTL::ComputePipelineState::functionHandle(MTL4::BinaryFunction* function) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(reflection)); + return _MTL_msg_MTL__FunctionHandlep_functionHandleWithBinaryFunction__MTL4__BinaryFunctionp((const void*)this, nullptr, function); } -_MTL_INLINE MTL::Size MTL::ComputePipelineState::requiredThreadsPerThreadgroup() const +_MTL_INLINE MTL::ComputePipelineState* MTL::ComputePipelineState::newComputePipelineState(NS::Array* additionalBinaryFunctions, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerThreadgroup)); + return _MTL_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithBinaryFunctions_error__NS__Arrayp_NS__Errorpp((const void*)this, nullptr, additionalBinaryFunctions, error); } -_MTL_INLINE MTL::ShaderValidation MTL::ComputePipelineState::shaderValidation() const +_MTL_INLINE NS::UInteger MTL::ComputePipelineState::imageblockMemoryLength(MTL::Size imageblockDimensions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(shaderValidation)); + return _MTL_msg_NS__UInteger_imageblockMemoryLengthForDimensions__MTL__Size((const void*)this, nullptr, imageblockDimensions); } -_MTL_INLINE NS::UInteger MTL::ComputePipelineState::staticThreadgroupMemoryLength() const +_MTL_INLINE MTL::FunctionHandle* MTL::ComputePipelineState::functionHandle(MTL::Function* function) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(staticThreadgroupMemoryLength)); + return _MTL_msg_MTL__FunctionHandlep_functionHandleWithFunction__MTL__Functionp((const void*)this, nullptr, function); } -_MTL_INLINE bool MTL::ComputePipelineState::supportIndirectCommandBuffers() const +_MTL_INLINE MTL::VisibleFunctionTable* MTL::ComputePipelineState::newVisibleFunctionTable(MTL::VisibleFunctionTableDescriptor* descriptor) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers)); + return _MTL_msg_MTL__VisibleFunctionTablep_newVisibleFunctionTableWithDescriptor__MTL__VisibleFunctionTableDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE NS::UInteger MTL::ComputePipelineState::threadExecutionWidth() const +_MTL_INLINE MTL::IntersectionFunctionTable* MTL::ComputePipelineState::newIntersectionFunctionTable(MTL::IntersectionFunctionTableDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadExecutionWidth)); + return _MTL_msg_MTL__IntersectionFunctionTablep_newIntersectionFunctionTableWithDescriptor__MTL__IntersectionFunctionTableDescriptorp((const void*)this, nullptr, descriptor); } diff --git a/thirdparty/metal-cpp/Metal/MTLCounters.hpp b/thirdparty/metal-cpp/Metal/MTLCounters.hpp index 6d655f158dcb..5e6be0cb1fa0 100644 --- a/thirdparty/metal-cpp/Metal/MTLCounters.hpp +++ b/thirdparty/metal-cpp/Metal/MTLCounters.hpp @@ -1,243 +1,189 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLCounters.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLResource.hpp" -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Device; + enum StorageMode : NS::UInteger; +} +namespace NS { + class Array; + class Data; + class String; +} namespace MTL { -class CounterSampleBufferDescriptor; -class CounterSet; -class Device; + +extern MTL::CommonCounter CommonCounterTimestamp __asm__("_MTLCommonCounterTimestamp"); +extern MTL::CommonCounter CommonCounterTessellationInputPatches __asm__("_MTLCommonCounterTessellationInputPatches"); +extern MTL::CommonCounter CommonCounterVertexInvocations __asm__("_MTLCommonCounterVertexInvocations"); +extern MTL::CommonCounter CommonCounterPostTessellationVertexInvocations __asm__("_MTLCommonCounterPostTessellationVertexInvocations"); +extern MTL::CommonCounter CommonCounterClipperInvocations __asm__("_MTLCommonCounterClipperInvocations"); +extern MTL::CommonCounter CommonCounterClipperPrimitivesOut __asm__("_MTLCommonCounterClipperPrimitivesOut"); +extern MTL::CommonCounter CommonCounterFragmentInvocations __asm__("_MTLCommonCounterFragmentInvocations"); +extern MTL::CommonCounter CommonCounterFragmentsPassed __asm__("_MTLCommonCounterFragmentsPassed"); +extern MTL::CommonCounter CommonCounterComputeKernelInvocations __asm__("_MTLCommonCounterComputeKernelInvocations"); +extern MTL::CommonCounter CommonCounterTotalCycles __asm__("_MTLCommonCounterTotalCycles"); +extern MTL::CommonCounter CommonCounterVertexCycles __asm__("_MTLCommonCounterVertexCycles"); +extern MTL::CommonCounter CommonCounterTessellationCycles __asm__("_MTLCommonCounterTessellationCycles"); +extern MTL::CommonCounter CommonCounterPostTessellationVertexCycles __asm__("_MTLCommonCounterPostTessellationVertexCycles"); +extern MTL::CommonCounter CommonCounterFragmentCycles __asm__("_MTLCommonCounterFragmentCycles"); +extern MTL::CommonCounter CommonCounterRenderTargetWriteCycles __asm__("_MTLCommonCounterRenderTargetWriteCycles"); +extern MTL::CommonCounterSet CommonCounterSetTimestamp __asm__("_MTLCommonCounterSetTimestamp"); +extern MTL::CommonCounterSet CommonCounterSetStageUtilization __asm__("_MTLCommonCounterSetStageUtilization"); +extern MTL::CommonCounterSet CommonCounterSetStatistic __asm__("_MTLCommonCounterSetStatistic"); +extern NS::ErrorDomain const CounterErrorDomain __asm__("_MTLCounterErrorDomain"); _MTL_ENUM(NS::Integer, CounterSampleBufferError) { CounterSampleBufferErrorOutOfMemory = 0, CounterSampleBufferErrorInvalid = 1, CounterSampleBufferErrorInternal = 2, }; -using CommonCounter = NS::String*; -using CommonCounterSet = NS::String*; - -static const NS::UInteger CounterErrorValue = static_cast(~0ULL); -static const NS::UInteger CounterDontSample = static_cast(-1); -_MTL_CONST(NS::ErrorDomain, CounterErrorDomain); -_MTL_CONST(CommonCounter, CommonCounterTimestamp); -_MTL_CONST(CommonCounter, CommonCounterTessellationInputPatches); -_MTL_CONST(CommonCounter, CommonCounterVertexInvocations); -_MTL_CONST(CommonCounter, CommonCounterPostTessellationVertexInvocations); -_MTL_CONST(CommonCounter, CommonCounterClipperInvocations); -_MTL_CONST(CommonCounter, CommonCounterClipperPrimitivesOut); -_MTL_CONST(CommonCounter, CommonCounterFragmentInvocations); -_MTL_CONST(CommonCounter, CommonCounterFragmentsPassed); -_MTL_CONST(CommonCounter, CommonCounterComputeKernelInvocations); -_MTL_CONST(CommonCounter, CommonCounterTotalCycles); -_MTL_CONST(CommonCounter, CommonCounterVertexCycles); -_MTL_CONST(CommonCounter, CommonCounterTessellationCycles); -_MTL_CONST(CommonCounter, CommonCounterPostTessellationVertexCycles); -_MTL_CONST(CommonCounter, CommonCounterFragmentCycles); -_MTL_CONST(CommonCounter, CommonCounterRenderTargetWriteCycles); -_MTL_CONST(CommonCounterSet, CommonCounterSetTimestamp); -_MTL_CONST(CommonCounterSet, CommonCounterSetStageUtilization); -_MTL_CONST(CommonCounterSet, CommonCounterSetStatistic); -struct CounterResultTimestamp -{ - uint64_t timestamp; -} _MTL_PACKED; - -struct CounterResultStageUtilization -{ - uint64_t totalCycles; - uint64_t vertexCycles; - uint64_t tessellationCycles; - uint64_t postTessellationVertexCycles; - uint64_t fragmentCycles; - uint64_t renderTargetCycles; -} _MTL_PACKED; - -struct CounterResultStatistic -{ - uint64_t tessellationInputPatches; - uint64_t vertexInvocations; - uint64_t postTessellationVertexInvocations; - uint64_t clipperInvocations; - uint64_t clipperPrimitivesOut; - uint64_t fragmentInvocations; - uint64_t fragmentsPassed; - uint64_t computeKernelInvocations; -} _MTL_PACKED; + +class Counter; +class CounterSet; +class CounterSampleBufferDescriptor; +class CounterSampleBuffer; class Counter : public NS::Referencing { public: NS::String* name() const; + }; + class CounterSet : public NS::Referencing { public: NS::Array* counters() const; - NS::String* name() const; + }; + class CounterSampleBufferDescriptor : public NS::Copying { public: static CounterSampleBufferDescriptor* alloc(); + CounterSampleBufferDescriptor* init() const; - CounterSet* counterSet() const; - - CounterSampleBufferDescriptor* init(); - - NS::String* label() const; - - NS::UInteger sampleCount() const; + MTL::CounterSet* counterSet() const; + NS::String* label() const; + NS::UInteger sampleCount() const; + void setCounterSet(MTL::CounterSet* counterSet); + void setLabel(NS::String* label); + void setSampleCount(NS::UInteger sampleCount); + void setStorageMode(MTL::StorageMode storageMode); + MTL::StorageMode storageMode() const; - void setCounterSet(const MTL::CounterSet* counterSet); - - void setLabel(const NS::String* label); - - void setSampleCount(NS::UInteger sampleCount); - - void setStorageMode(MTL::StorageMode storageMode); - StorageMode storageMode() const; }; + class CounterSampleBuffer : public NS::Referencing { public: - Device* device() const; - + MTL::Device* device() const; NS::String* label() const; - NS::Data* resolveCounterRange(NS::Range range); - NS::UInteger sampleCount() const; + }; -} +} // namespace MTL -_MTL_PRIVATE_DEF_CONST(NS::ErrorDomain, CounterErrorDomain); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterTimestamp); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterTessellationInputPatches); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterVertexInvocations); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterPostTessellationVertexInvocations); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterClipperInvocations); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterClipperPrimitivesOut); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterFragmentInvocations); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterFragmentsPassed); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterComputeKernelInvocations); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterTotalCycles); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterVertexCycles); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterTessellationCycles); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterPostTessellationVertexCycles); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterFragmentCycles); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounter, CommonCounterRenderTargetWriteCycles); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounterSet, CommonCounterSetTimestamp); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounterSet, CommonCounterSetStageUtilization); -_MTL_PRIVATE_DEF_CONST(MTL::CommonCounterSet, CommonCounterSetStatistic); +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLCounter; +extern "C" void *OBJC_CLASS_$_MTLCounterSet; +extern "C" void *OBJC_CLASS_$_MTLCounterSampleBufferDescriptor; +extern "C" void *OBJC_CLASS_$_MTLCounterSampleBuffer; _MTL_INLINE NS::String* MTL::Counter::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::CounterSet::counters() const +_MTL_INLINE NS::String* MTL::CounterSet::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(counters)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::CounterSet::name() const +_MTL_INLINE NS::Array* MTL::CounterSet::counters() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_NS__Arrayp_counters((const void*)this, nullptr); } _MTL_INLINE MTL::CounterSampleBufferDescriptor* MTL::CounterSampleBufferDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLCounterSampleBufferDescriptor)); + return _MTL_msg_MTL__CounterSampleBufferDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLCounterSampleBufferDescriptor, nullptr); } -_MTL_INLINE MTL::CounterSet* MTL::CounterSampleBufferDescriptor::counterSet() const +_MTL_INLINE MTL::CounterSampleBufferDescriptor* MTL::CounterSampleBufferDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(counterSet)); + return _MTL_msg_MTL__CounterSampleBufferDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::CounterSampleBufferDescriptor* MTL::CounterSampleBufferDescriptor::init() +_MTL_INLINE MTL::CounterSet* MTL::CounterSampleBufferDescriptor::counterSet() const { - return NS::Object::init(); + return _MTL_msg_MTL__CounterSetp_counterSet((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::CounterSampleBufferDescriptor::label() const +_MTL_INLINE void MTL::CounterSampleBufferDescriptor::setCounterSet(MTL::CounterSet* counterSet) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL_msg_v_setCounterSet__MTL__CounterSetp((const void*)this, nullptr, counterSet); } -_MTL_INLINE NS::UInteger MTL::CounterSampleBufferDescriptor::sampleCount() const +_MTL_INLINE NS::String* MTL::CounterSampleBufferDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleCount)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::CounterSampleBufferDescriptor::setCounterSet(const MTL::CounterSet* counterSet) +_MTL_INLINE void MTL::CounterSampleBufferDescriptor::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCounterSet_), counterSet); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL::CounterSampleBufferDescriptor::setLabel(const NS::String* label) +_MTL_INLINE MTL::StorageMode MTL::CounterSampleBufferDescriptor::storageMode() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_MTL__StorageMode_storageMode((const void*)this, nullptr); } -_MTL_INLINE void MTL::CounterSampleBufferDescriptor::setSampleCount(NS::UInteger sampleCount) +_MTL_INLINE void MTL::CounterSampleBufferDescriptor::setStorageMode(MTL::StorageMode storageMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSampleCount_), sampleCount); + _MTL_msg_v_setStorageMode__MTL__StorageMode((const void*)this, nullptr, storageMode); } -_MTL_INLINE void MTL::CounterSampleBufferDescriptor::setStorageMode(MTL::StorageMode storageMode) +_MTL_INLINE NS::UInteger MTL::CounterSampleBufferDescriptor::sampleCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStorageMode_), storageMode); + return _MTL_msg_NS__UInteger_sampleCount((const void*)this, nullptr); } -_MTL_INLINE MTL::StorageMode MTL::CounterSampleBufferDescriptor::storageMode() const +_MTL_INLINE void MTL::CounterSampleBufferDescriptor::setSampleCount(NS::UInteger sampleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(storageMode)); + _MTL_msg_v_setSampleCount__NS__UInteger((const void*)this, nullptr, sampleCount); } _MTL_INLINE MTL::Device* MTL::CounterSampleBuffer::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } _MTL_INLINE NS::String* MTL::CounterSampleBuffer::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::Data* MTL::CounterSampleBuffer::resolveCounterRange(NS::Range range) +_MTL_INLINE NS::UInteger MTL::CounterSampleBuffer::sampleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resolveCounterRange_), range); + return _MTL_msg_NS__UInteger_sampleCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::CounterSampleBuffer::sampleCount() const +_MTL_INLINE NS::Data* MTL::CounterSampleBuffer::resolveCounterRange(NS::Range range) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleCount)); + return _MTL_msg_NS__Datap_resolveCounterRange__NS__Range((const void*)this, nullptr, range); } diff --git a/thirdparty/metal-cpp/Metal/MTLDataType.hpp b/thirdparty/metal-cpp/Metal/MTLDataType.hpp index f0e9b25adc90..66d5cfdcf74a 100644 --- a/thirdparty/metal-cpp/Metal/MTLDataType.hpp +++ b/thirdparty/metal-cpp/Metal/MTLDataType.hpp @@ -1,31 +1,16 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLDataType.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" namespace MTL { + _MTL_ENUM(NS::UInteger, DataType) { DataTypeNone = 0, DataTypeStruct = 1, @@ -126,4 +111,5 @@ _MTL_ENUM(NS::UInteger, DataType) { DataTypeTensor = 140, }; -} + +} // namespace MTL diff --git a/thirdparty/metal-cpp/Metal/MTLDepthStencil.hpp b/thirdparty/metal-cpp/Metal/MTLDepthStencil.hpp index e1116175e111..6e62b82f5ce1 100644 --- a/thirdparty/metal-cpp/Metal/MTLDepthStencil.hpp +++ b/thirdparty/metal-cpp/Metal/MTLDepthStencil.hpp @@ -1,37 +1,23 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLDepthStencil.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Device; +} +namespace NS { + class String; +} namespace MTL { -class DepthStencilDescriptor; -class Device; -class StencilDescriptor; + _MTL_ENUM(NS::UInteger, CompareFunction) { CompareFunctionNever = 0, CompareFunctionLess = 1, @@ -54,224 +40,215 @@ _MTL_ENUM(NS::UInteger, StencilOperation) { StencilOperationDecrementWrap = 7, }; + +class StencilDescriptor; +class DepthStencilDescriptor; +class DepthStencilState; + class StencilDescriptor : public NS::Copying { public: static StencilDescriptor* alloc(); + StencilDescriptor* init() const; + + MTL::StencilOperation depthFailureOperation() const; + MTL::StencilOperation depthStencilPassOperation() const; + uint32_t readMask() const; + void setDepthFailureOperation(MTL::StencilOperation depthFailureOperation); + void setDepthStencilPassOperation(MTL::StencilOperation depthStencilPassOperation); + void setReadMask(uint32_t readMask); + void setStencilCompareFunction(MTL::CompareFunction stencilCompareFunction); + void setStencilFailureOperation(MTL::StencilOperation stencilFailureOperation); + void setWriteMask(uint32_t writeMask); + MTL::CompareFunction stencilCompareFunction() const; + MTL::StencilOperation stencilFailureOperation() const; + uint32_t writeMask() const; - StencilOperation depthFailureOperation() const; - - StencilOperation depthStencilPassOperation() const; - - StencilDescriptor* init(); - - uint32_t readMask() const; - - void setDepthFailureOperation(MTL::StencilOperation depthFailureOperation); - - void setDepthStencilPassOperation(MTL::StencilOperation depthStencilPassOperation); - - void setReadMask(uint32_t readMask); - - void setStencilCompareFunction(MTL::CompareFunction stencilCompareFunction); - - void setStencilFailureOperation(MTL::StencilOperation stencilFailureOperation); - - void setWriteMask(uint32_t writeMask); - - CompareFunction stencilCompareFunction() const; - - StencilOperation stencilFailureOperation() const; - - uint32_t writeMask() const; }; + class DepthStencilDescriptor : public NS::Copying { public: static DepthStencilDescriptor* alloc(); + DepthStencilDescriptor* init() const; - StencilDescriptor* backFaceStencil() const; - - CompareFunction depthCompareFunction() const; - - [[deprecated("please use isDepthWriteEnabled instead")]] + MTL::StencilDescriptor* backFaceStencil() const; + MTL::CompareFunction depthCompareFunction() const; bool depthWriteEnabled() const; - - StencilDescriptor* frontFaceStencil() const; - - DepthStencilDescriptor* init(); - - bool isDepthWriteEnabled() const; - + MTL::StencilDescriptor* frontFaceStencil() const; + bool isDepthWriteEnabled(); NS::String* label() const; - - void setBackFaceStencil(const MTL::StencilDescriptor* backFaceStencil); - + void setBackFaceStencil(MTL::StencilDescriptor* backFaceStencil); void setDepthCompareFunction(MTL::CompareFunction depthCompareFunction); - void setDepthWriteEnabled(bool depthWriteEnabled); + void setFrontFaceStencil(MTL::StencilDescriptor* frontFaceStencil); + void setLabel(NS::String* label); - void setFrontFaceStencil(const MTL::StencilDescriptor* frontFaceStencil); - - void setLabel(const NS::String* label); }; + class DepthStencilState : public NS::Referencing { public: - Device* device() const; - - ResourceID gpuResourceID() const; + MTL::Device* device() const; + MTL::ResourceID gpuResourceID() const; + NS::String* label() const; - NS::String* label() const; }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLStencilDescriptor; +extern "C" void *OBJC_CLASS_$_MTLDepthStencilDescriptor; +extern "C" void *OBJC_CLASS_$_MTLDepthStencilState; + _MTL_INLINE MTL::StencilDescriptor* MTL::StencilDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLStencilDescriptor)); + return _MTL_msg_MTL__StencilDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLStencilDescriptor, nullptr); } -_MTL_INLINE MTL::StencilOperation MTL::StencilDescriptor::depthFailureOperation() const +_MTL_INLINE MTL::StencilDescriptor* MTL::StencilDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depthFailureOperation)); + return _MTL_msg_MTL__StencilDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::StencilOperation MTL::StencilDescriptor::depthStencilPassOperation() const +_MTL_INLINE MTL::CompareFunction MTL::StencilDescriptor::stencilCompareFunction() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depthStencilPassOperation)); + return _MTL_msg_MTL__CompareFunction_stencilCompareFunction((const void*)this, nullptr); } -_MTL_INLINE MTL::StencilDescriptor* MTL::StencilDescriptor::init() +_MTL_INLINE void MTL::StencilDescriptor::setStencilCompareFunction(MTL::CompareFunction stencilCompareFunction) { - return NS::Object::init(); + _MTL_msg_v_setStencilCompareFunction__MTL__CompareFunction((const void*)this, nullptr, stencilCompareFunction); } -_MTL_INLINE uint32_t MTL::StencilDescriptor::readMask() const +_MTL_INLINE MTL::StencilOperation MTL::StencilDescriptor::stencilFailureOperation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(readMask)); + return _MTL_msg_MTL__StencilOperation_stencilFailureOperation((const void*)this, nullptr); } -_MTL_INLINE void MTL::StencilDescriptor::setDepthFailureOperation(MTL::StencilOperation depthFailureOperation) +_MTL_INLINE void MTL::StencilDescriptor::setStencilFailureOperation(MTL::StencilOperation stencilFailureOperation) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthFailureOperation_), depthFailureOperation); + _MTL_msg_v_setStencilFailureOperation__MTL__StencilOperation((const void*)this, nullptr, stencilFailureOperation); } -_MTL_INLINE void MTL::StencilDescriptor::setDepthStencilPassOperation(MTL::StencilOperation depthStencilPassOperation) +_MTL_INLINE MTL::StencilOperation MTL::StencilDescriptor::depthFailureOperation() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStencilPassOperation_), depthStencilPassOperation); + return _MTL_msg_MTL__StencilOperation_depthFailureOperation((const void*)this, nullptr); } -_MTL_INLINE void MTL::StencilDescriptor::setReadMask(uint32_t readMask) +_MTL_INLINE void MTL::StencilDescriptor::setDepthFailureOperation(MTL::StencilOperation depthFailureOperation) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setReadMask_), readMask); + _MTL_msg_v_setDepthFailureOperation__MTL__StencilOperation((const void*)this, nullptr, depthFailureOperation); } -_MTL_INLINE void MTL::StencilDescriptor::setStencilCompareFunction(MTL::CompareFunction stencilCompareFunction) +_MTL_INLINE MTL::StencilOperation MTL::StencilDescriptor::depthStencilPassOperation() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilCompareFunction_), stencilCompareFunction); + return _MTL_msg_MTL__StencilOperation_depthStencilPassOperation((const void*)this, nullptr); } -_MTL_INLINE void MTL::StencilDescriptor::setStencilFailureOperation(MTL::StencilOperation stencilFailureOperation) +_MTL_INLINE void MTL::StencilDescriptor::setDepthStencilPassOperation(MTL::StencilOperation depthStencilPassOperation) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilFailureOperation_), stencilFailureOperation); + _MTL_msg_v_setDepthStencilPassOperation__MTL__StencilOperation((const void*)this, nullptr, depthStencilPassOperation); } -_MTL_INLINE void MTL::StencilDescriptor::setWriteMask(uint32_t writeMask) +_MTL_INLINE uint32_t MTL::StencilDescriptor::readMask() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setWriteMask_), writeMask); + return _MTL_msg_uint32_t_readMask((const void*)this, nullptr); } -_MTL_INLINE MTL::CompareFunction MTL::StencilDescriptor::stencilCompareFunction() const +_MTL_INLINE void MTL::StencilDescriptor::setReadMask(uint32_t readMask) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stencilCompareFunction)); + _MTL_msg_v_setReadMask__uint32_t((const void*)this, nullptr, readMask); } -_MTL_INLINE MTL::StencilOperation MTL::StencilDescriptor::stencilFailureOperation() const +_MTL_INLINE uint32_t MTL::StencilDescriptor::writeMask() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stencilFailureOperation)); + return _MTL_msg_uint32_t_writeMask((const void*)this, nullptr); } -_MTL_INLINE uint32_t MTL::StencilDescriptor::writeMask() const +_MTL_INLINE void MTL::StencilDescriptor::setWriteMask(uint32_t writeMask) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(writeMask)); + _MTL_msg_v_setWriteMask__uint32_t((const void*)this, nullptr, writeMask); } _MTL_INLINE MTL::DepthStencilDescriptor* MTL::DepthStencilDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLDepthStencilDescriptor)); + return _MTL_msg_MTL__DepthStencilDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLDepthStencilDescriptor, nullptr); } -_MTL_INLINE MTL::StencilDescriptor* MTL::DepthStencilDescriptor::backFaceStencil() const +_MTL_INLINE MTL::DepthStencilDescriptor* MTL::DepthStencilDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(backFaceStencil)); + return _MTL_msg_MTL__DepthStencilDescriptorp_init((const void*)this, nullptr); } _MTL_INLINE MTL::CompareFunction MTL::DepthStencilDescriptor::depthCompareFunction() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depthCompareFunction)); + return _MTL_msg_MTL__CompareFunction_depthCompareFunction((const void*)this, nullptr); } -_MTL_INLINE bool MTL::DepthStencilDescriptor::depthWriteEnabled() const +_MTL_INLINE void MTL::DepthStencilDescriptor::setDepthCompareFunction(MTL::CompareFunction depthCompareFunction) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isDepthWriteEnabled)); + _MTL_msg_v_setDepthCompareFunction__MTL__CompareFunction((const void*)this, nullptr, depthCompareFunction); } -_MTL_INLINE MTL::StencilDescriptor* MTL::DepthStencilDescriptor::frontFaceStencil() const +_MTL_INLINE bool MTL::DepthStencilDescriptor::depthWriteEnabled() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(frontFaceStencil)); + return _MTL_msg_bool_depthWriteEnabled((const void*)this, nullptr); } -_MTL_INLINE MTL::DepthStencilDescriptor* MTL::DepthStencilDescriptor::init() +_MTL_INLINE void MTL::DepthStencilDescriptor::setDepthWriteEnabled(bool depthWriteEnabled) { - return NS::Object::init(); + _MTL_msg_v_setDepthWriteEnabled__bool((const void*)this, nullptr, depthWriteEnabled); } -_MTL_INLINE bool MTL::DepthStencilDescriptor::isDepthWriteEnabled() const +_MTL_INLINE MTL::StencilDescriptor* MTL::DepthStencilDescriptor::frontFaceStencil() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isDepthWriteEnabled)); + return _MTL_msg_MTL__StencilDescriptorp_frontFaceStencil((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::DepthStencilDescriptor::label() const +_MTL_INLINE void MTL::DepthStencilDescriptor::setFrontFaceStencil(MTL::StencilDescriptor* frontFaceStencil) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL_msg_v_setFrontFaceStencil__MTL__StencilDescriptorp((const void*)this, nullptr, frontFaceStencil); } -_MTL_INLINE void MTL::DepthStencilDescriptor::setBackFaceStencil(const MTL::StencilDescriptor* backFaceStencil) +_MTL_INLINE MTL::StencilDescriptor* MTL::DepthStencilDescriptor::backFaceStencil() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBackFaceStencil_), backFaceStencil); + return _MTL_msg_MTL__StencilDescriptorp_backFaceStencil((const void*)this, nullptr); } -_MTL_INLINE void MTL::DepthStencilDescriptor::setDepthCompareFunction(MTL::CompareFunction depthCompareFunction) +_MTL_INLINE void MTL::DepthStencilDescriptor::setBackFaceStencil(MTL::StencilDescriptor* backFaceStencil) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthCompareFunction_), depthCompareFunction); + _MTL_msg_v_setBackFaceStencil__MTL__StencilDescriptorp((const void*)this, nullptr, backFaceStencil); } -_MTL_INLINE void MTL::DepthStencilDescriptor::setDepthWriteEnabled(bool depthWriteEnabled) +_MTL_INLINE NS::String* MTL::DepthStencilDescriptor::label() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthWriteEnabled_), depthWriteEnabled); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::DepthStencilDescriptor::setFrontFaceStencil(const MTL::StencilDescriptor* frontFaceStencil) +_MTL_INLINE void MTL::DepthStencilDescriptor::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFrontFaceStencil_), frontFaceStencil); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL::DepthStencilDescriptor::setLabel(const NS::String* label) +_MTL_INLINE bool MTL::DepthStencilDescriptor::isDepthWriteEnabled() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_bool_isDepthWriteEnabled((const void*)this, nullptr); } -_MTL_INLINE MTL::Device* MTL::DepthStencilState::device() const +_MTL_INLINE NS::String* MTL::DepthStencilState::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceID MTL::DepthStencilState::gpuResourceID() const +_MTL_INLINE MTL::Device* MTL::DepthStencilState::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::DepthStencilState::label() const +_MTL_INLINE MTL::ResourceID MTL::DepthStencilState::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLDevice.hpp b/thirdparty/metal-cpp/Metal/MTLDevice.hpp index 0e867397bebb..3874e6a57a1f 100644 --- a/thirdparty/metal-cpp/Metal/MTLDevice.hpp +++ b/thirdparty/metal-cpp/Metal/MTLDevice.hpp @@ -1,128 +1,107 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLDevice.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTL4Counters.hpp" -#include "MTLArgument.hpp" -#include "MTLDataType.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPixelFormat.hpp" -#include "MTLPrivate.hpp" -#include "MTLResource.hpp" -#include "MTLTexture.hpp" -#include "MTLTypes.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include -#include -#include -#include -#include -#include +namespace MTL { + class AccelerationStructure; + class AccelerationStructureDescriptor; + class ArgumentEncoder; + class BinaryArchive; + class BinaryArchiveDescriptor; + class Buffer; + class BufferBinding; + class CommandQueue; + class CommandQueueDescriptor; + class CompileOptions; + class ComputePipelineDescriptor; + class ComputePipelineState; + class CounterSampleBuffer; + class CounterSampleBufferDescriptor; + class DepthStencilDescriptor; + class DepthStencilState; + class DynamicLibrary; + class Event; + class Fence; + class Function; + class FunctionHandle; + class Heap; + class HeapDescriptor; + class IOCommandQueue; + class IOCommandQueueDescriptor; + class IOFileHandle; + class IndirectCommandBuffer; + class IndirectCommandBufferDescriptor; + class Library; + class LogState; + class LogStateDescriptor; + class MeshRenderPipelineDescriptor; + class RasterizationRateMap; + class RasterizationRateMapDescriptor; + class RenderPipelineDescriptor; + class RenderPipelineState; + class ResidencySet; + class ResidencySetDescriptor; + class ResourceViewPoolDescriptor; + class SamplerDescriptor; + class SamplerState; + class SharedEvent; + class SharedEventHandle; + class SharedTextureHandle; + class StitchedLibraryDescriptor; + class Tensor; + class TensorDescriptor; + class Texture; + class TextureDescriptor; + class TextureViewPool; + class TileRenderPipelineDescriptor; + enum BindingAccess : NS::UInteger; + enum DataType : NS::UInteger; + enum PixelFormat : NS::UInteger; + using ResourceOptions = NS::UInteger; + enum SparsePageSize : NS::Integer; + enum TextureType : NS::UInteger; +} +namespace MTL4 { + class Archive; + class ArgumentTable; + class ArgumentTableDescriptor; + class BinaryFunction; + class CommandAllocator; + class CommandAllocatorDescriptor; + class CommandBuffer; + class CommandQueue; + class CommandQueueDescriptor; + class Compiler; + class CompilerDescriptor; + class CounterHeap; + class CounterHeapDescriptor; + class PipelineDataSetSerializer; + class PipelineDataSetSerializerDescriptor; + enum CounterHeapType : NS::Integer; +} +namespace NS { + class Array; + class Bundle; + class Error; + class String; + class URL; +} namespace MTL { -class AccelerationStructure; -class AccelerationStructureDescriptor; -class Architecture; -class ArgumentDescriptor; -class ArgumentEncoder; -class BinaryArchive; -class BinaryArchiveDescriptor; -class Buffer; -class BufferBinding; -class CommandQueue; -class CommandQueueDescriptor; -class CompileOptions; -class ComputePipelineDescriptor; -class ComputePipelineReflection; -class ComputePipelineState; -class CounterSampleBuffer; -class CounterSampleBufferDescriptor; -class DepthStencilDescriptor; -class DepthStencilState; -class Device; -class DynamicLibrary; -class Event; -class Fence; -class Function; -class FunctionConstantValues; -class FunctionHandle; -class Heap; -class HeapDescriptor; -class IOCommandQueue; -class IOCommandQueueDescriptor; -class IOFileHandle; -class IndirectCommandBuffer; -class IndirectCommandBufferDescriptor; -class Library; -class LogState; -class LogStateDescriptor; -class MeshRenderPipelineDescriptor; -class RasterizationRateMap; -class RasterizationRateMapDescriptor; -struct Region; -class RenderPipelineDescriptor; -class RenderPipelineReflection; -class RenderPipelineState; -class ResidencySet; -class ResidencySetDescriptor; -class ResourceViewPoolDescriptor; -struct SamplePosition; -class SamplerDescriptor; -class SamplerState; -class SharedEvent; -class SharedEventHandle; -class SharedTextureHandle; -class StitchedLibraryDescriptor; -class Tensor; -class TensorDescriptor; -class Texture; -class TextureDescriptor; -class TextureViewPool; -class TileRenderPipelineDescriptor; - -} -namespace MTL4 -{ -class Archive; -class ArgumentTable; -class ArgumentTableDescriptor; -class BinaryFunction; -class CommandAllocator; -class CommandAllocatorDescriptor; -class CommandBuffer; -class CommandQueue; -class CommandQueueDescriptor; -class Compiler; -class CompilerDescriptor; -class CounterHeap; -class CounterHeapDescriptor; -class PipelineDataSetSerializer; -class PipelineDataSetSerializerDescriptor; -} -namespace MTL -{ +using DeviceNotificationName = NS::String*; +extern DeviceNotificationName const DeviceWasAddedNotification __asm__("_MTLDeviceWasAddedNotification"); +extern DeviceNotificationName const DeviceRemovalRequestedNotification __asm__("_MTLDeviceRemovalRequestedNotification"); +extern DeviceNotificationName const DeviceWasRemovedNotification __asm__("_MTLDeviceWasRemovedNotification"); +extern NS::ErrorDomain const DeviceErrorDomain __asm__("_MTLDeviceErrorDomain"); _MTL_ENUM(NS::Integer, IOCompressionMethod) { IOCompressionMethodZlib = 0, IOCompressionMethodLZFSE = 1, @@ -150,20 +129,16 @@ _MTL_ENUM(NS::UInteger, FeatureSet) { FeatureSet_iOS_GPUFamily4_v2 = 15, FeatureSet_iOS_GPUFamily5_v1 = 16, FeatureSet_macOS_GPUFamily1_v1 = 10000, - FeatureSet_OSX_GPUFamily1_v1 = 10000, + FeatureSet_OSX_GPUFamily1_v1 = FeatureSet_macOS_GPUFamily1_v1, FeatureSet_macOS_GPUFamily1_v2 = 10001, - FeatureSet_OSX_GPUFamily1_v2 = 10001, + FeatureSet_OSX_GPUFamily1_v2 = FeatureSet_macOS_GPUFamily1_v2, FeatureSet_macOS_ReadWriteTextureTier2 = 10002, - FeatureSet_OSX_ReadWriteTextureTier2 = 10002, + FeatureSet_OSX_ReadWriteTextureTier2 = FeatureSet_macOS_ReadWriteTextureTier2, FeatureSet_macOS_GPUFamily1_v3 = 10003, FeatureSet_macOS_GPUFamily1_v4 = 10004, FeatureSet_macOS_GPUFamily2_v1 = 10005, - FeatureSet_watchOS_GPUFamily1_v1 = 20000, - FeatureSet_WatchOS_GPUFamily1_v1 = 20000, - FeatureSet_watchOS_GPUFamily2_v1 = 20001, - FeatureSet_WatchOS_GPUFamily2_v1 = 20001, FeatureSet_tvOS_GPUFamily1_v1 = 30000, - FeatureSet_TVOS_GPUFamily1_v1 = 30000, + FeatureSet_TVOS_GPUFamily1_v1 = FeatureSet_tvOS_GPUFamily1_v1, FeatureSet_tvOS_GPUFamily1_v2 = 30001, FeatureSet_tvOS_GPUFamily1_v3 = 30002, FeatureSet_tvOS_GPUFamily2_v1 = 30003, @@ -197,7 +172,15 @@ _MTL_ENUM(NS::UInteger, DeviceLocation) { DeviceLocationBuiltIn = 0, DeviceLocationSlot = 1, DeviceLocationExternal = 2, - DeviceLocationUnspecified = NS::UIntegerMax, + DeviceLocationUnspecified = static_cast(-1), +}; + +_MTL_OPTIONS(NS::UInteger, PipelineOption) { + PipelineOptionNone = 0, + PipelineOptionArgumentInfo = 1 << 0, + PipelineOptionBindingInfo = 1 << 0, + PipelineOptionBufferTypeInfo = 1 << 1, + PipelineOptionFailOnBinaryArchiveMiss = 1 << 2, }; _MTL_ENUM(NS::UInteger, ReadWriteTextureTier) { @@ -224,1270 +207,1071 @@ _MTL_ENUM(NS::UInteger, CounterSamplingPoint) { CounterSamplingPointAtBlitBoundary = 4, }; -_MTL_OPTIONS(NS::UInteger, PipelineOption) { - PipelineOptionNone = 0, - PipelineOptionArgumentInfo = 1, - PipelineOptionBindingInfo = 1, - PipelineOptionBufferTypeInfo = 1 << 1, - PipelineOptionFailOnBinaryArchiveMiss = 1 << 2, +_MTL_ENUM(NS::Integer, DeviceError) { + DeviceErrorNone = 0, + DeviceErrorNotSupported = 1, }; -using DeviceNotificationName = NS::String*; -using DeviceNotificationHandlerBlock = void (^)(MTL::Device* pDevice, MTL::DeviceNotificationName notifyName); -using DeviceNotificationHandlerFunction = std::function; -using AutoreleasedComputePipelineReflection = MTL::ComputePipelineReflection*; -using AutoreleasedRenderPipelineReflection = MTL::RenderPipelineReflection*; -using NewLibraryCompletionHandler = void (^)(MTL::Library*, NS::Error*); -using NewLibraryCompletionHandlerFunction = std::function; -using NewRenderPipelineStateCompletionHandler = void (^)(MTL::RenderPipelineState*, NS::Error*); -using NewRenderPipelineStateCompletionHandlerFunction = std::function; -using NewRenderPipelineStateWithReflectionCompletionHandler = void (^)(MTL::RenderPipelineState*, MTL::RenderPipelineReflection*, NS::Error*); -using NewRenderPipelineStateWithReflectionCompletionHandlerFunction = std::function; -using NewComputePipelineStateCompletionHandler = void (^)(MTL::ComputePipelineState*, NS::Error*); -using NewComputePipelineStateCompletionHandlerFunction = std::function; -using NewComputePipelineStateWithReflectionCompletionHandler = void (^)(MTL::ComputePipelineState*, MTL::ComputePipelineReflection*, NS::Error*); -using NewComputePipelineStateWithReflectionCompletionHandlerFunction = std::function; -using Timestamp = std::uint64_t; - -_MTL_CONST(DeviceNotificationName, DeviceWasAddedNotification); -_MTL_CONST(DeviceNotificationName, DeviceRemovalRequestedNotification); -_MTL_CONST(DeviceNotificationName, DeviceWasRemovedNotification); -_MTL_CONST(NS::ErrorUserInfoKey, CommandBufferEncoderInfoErrorKey); -Device* CreateSystemDefaultDevice(); -NS::Array* CopyAllDevices(); -NS::Array* CopyAllDevicesWithObserver(NS::Object** pOutObserver, MTL::DeviceNotificationHandlerBlock handler); -NS::Array* CopyAllDevicesWithObserver(NS::Object** pOutObserver, const MTL::DeviceNotificationHandlerFunction& handler); -void RemoveDeviceObserver(const NS::Object* pObserver); -struct AccelerationStructureSizes -{ - NS::UInteger accelerationStructureSize; - NS::UInteger buildScratchBufferSize; - NS::UInteger refitScratchBufferSize; -} _MTL_PACKED; - -struct SizeAndAlign -{ - NS::UInteger size; - NS::UInteger align; -} _MTL_PACKED; + +class ArgumentDescriptor; +class Architecture; +class Device; class ArgumentDescriptor : public NS::Copying { public: - BindingAccess access() const; - static ArgumentDescriptor* alloc(); + ArgumentDescriptor* init() const; + + static MTL::ArgumentDescriptor* argumentDescriptor(); + + MTL::BindingAccess access() const; + NS::UInteger arrayLength() const; + NS::UInteger constantBlockAlignment() const; + MTL::DataType dataType() const; + NS::UInteger index() const; + void setAccess(MTL::BindingAccess access); + void setArrayLength(NS::UInteger arrayLength); + void setConstantBlockAlignment(NS::UInteger constantBlockAlignment); + void setDataType(MTL::DataType dataType); + void setIndex(NS::UInteger index); + void setTextureType(MTL::TextureType textureType); + MTL::TextureType textureType() const; - static ArgumentDescriptor* argumentDescriptor(); - - NS::UInteger arrayLength() const; - - NS::UInteger constantBlockAlignment() const; - - DataType dataType() const; - - NS::UInteger index() const; - - ArgumentDescriptor* init(); - - void setAccess(MTL::BindingAccess access); - - void setArrayLength(NS::UInteger arrayLength); - - void setConstantBlockAlignment(NS::UInteger constantBlockAlignment); - - void setDataType(MTL::DataType dataType); - - void setIndex(NS::UInteger index); - - void setTextureType(MTL::TextureType textureType); - TextureType textureType() const; }; + class Architecture : public NS::Copying { public: static Architecture* alloc(); + Architecture* init() const; - Architecture* init(); + NS::String* name() const; - NS::String* name() const; }; + class Device : public NS::Referencing { public: - AccelerationStructureSizes accelerationStructureSizes(const MTL::AccelerationStructureDescriptor* descriptor); - - Architecture* architecture() const; - - bool areBarycentricCoordsSupported() const; - - bool areProgrammableSamplePositionsSupported() const; - - bool areRasterOrderGroupsSupported() const; - - ArgumentBuffersTier argumentBuffersSupport() const; - - [[deprecated("please use areBarycentricCoordsSupported instead")]] - bool barycentricCoordsSupported() const; - - void convertSparsePixelRegions(const MTL::Region* pixelRegions, MTL::Region* tileRegions, MTL::Size tileSize, MTL::SparseTextureRegionAlignmentMode mode, NS::UInteger numRegions); - - void convertSparseTileRegions(const MTL::Region* tileRegions, MTL::Region* pixelRegions, MTL::Size tileSize, NS::UInteger numRegions); - - NS::Array* counterSets() const; - - NS::UInteger currentAllocatedSize() const; - - [[deprecated("please use isDepth24Stencil8PixelFormatSupported instead")]] - bool depth24Stencil8PixelFormatSupported() const; - - FunctionHandle* functionHandle(const MTL::Function* function); - FunctionHandle* functionHandle(const MTL4::BinaryFunction* function); - - void getDefaultSamplePositions(MTL::SamplePosition* positions, NS::UInteger count); - - bool hasUnifiedMemory() const; - - [[deprecated("please use isHeadless instead")]] - bool headless() const; - - SizeAndAlign heapAccelerationStructureSizeAndAlign(NS::UInteger size); - SizeAndAlign heapAccelerationStructureSizeAndAlign(const MTL::AccelerationStructureDescriptor* descriptor); - - SizeAndAlign heapBufferSizeAndAlign(NS::UInteger length, MTL::ResourceOptions options); - - SizeAndAlign heapTextureSizeAndAlign(const MTL::TextureDescriptor* desc); - - bool isDepth24Stencil8PixelFormatSupported() const; - - bool isHeadless() const; - - bool isLowPower() const; - - bool isRemovable() const; - - DeviceLocation location() const; - NS::UInteger locationNumber() const; - - [[deprecated("please use isLowPower instead")]] + MTL::AccelerationStructureSizes accelerationStructureSizes(MTL::AccelerationStructureDescriptor* descriptor); + MTL::Architecture* architecture() const; + bool areBarycentricCoordsSupported(); + bool areProgrammableSamplePositionsSupported(); + bool areRasterOrderGroupsSupported(); + MTL::ArgumentBuffersTier argumentBuffersSupport() const; + void convertSparsePixelRegions(const MTL::Region * pixelRegions, MTL::Region* tileRegions, MTL::Size tileSize, MTL::SparseTextureRegionAlignmentMode mode, NS::UInteger numRegions); + void convertSparseTileRegions(const MTL::Region * tileRegions, MTL::Region* pixelRegions, MTL::Size tileSize, NS::UInteger numRegions); + NS::Array* counterSets() const; + NS::UInteger currentAllocatedSize() const; + bool depth24Stencil8PixelFormatSupported() const; + MTL::FunctionHandle* functionHandle(MTL::Function* function); + MTL::FunctionHandle* functionHandle(MTL4::BinaryFunction* function); + void getDefaultSamplePositions(MTL::SamplePosition* positions, NS::UInteger count); + bool hasUnifiedMemory() const; + bool headless() const; + MTL::SizeAndAlign heapAccelerationStructureSizeAndAlign(NS::UInteger size); + MTL::SizeAndAlign heapAccelerationStructureSizeAndAlign(MTL::AccelerationStructureDescriptor* descriptor); + MTL::SizeAndAlign heapBufferSizeAndAlign(NS::UInteger length, MTL::ResourceOptions options); + MTL::SizeAndAlign heapTextureSizeAndAlign(MTL::TextureDescriptor* desc); + bool isDepth24Stencil8PixelFormatSupported(); + bool isHeadless(); + bool isLowPower(); + bool isRemovable(); + MTL::DeviceLocation location() const; + NS::UInteger locationNumber() const; bool lowPower() const; - NS::UInteger maxArgumentBufferSamplerCount() const; - NS::UInteger maxBufferLength() const; - NS::UInteger maxThreadgroupMemoryLength() const; - - Size maxThreadsPerThreadgroup() const; - + MTL::Size maxThreadsPerThreadgroup() const; uint64_t maxTransferRate() const; - NS::UInteger maximumConcurrentCompilationTaskCount() const; - NS::UInteger minimumLinearTextureAlignmentForPixelFormat(MTL::PixelFormat format); - NS::UInteger minimumTextureBufferAlignmentForPixelFormat(MTL::PixelFormat format); - NS::String* name() const; - - AccelerationStructure* newAccelerationStructure(NS::UInteger size); - AccelerationStructure* newAccelerationStructure(const MTL::AccelerationStructureDescriptor* descriptor); - - MTL4::Archive* newArchive(const NS::URL* url, NS::Error** error); - - ArgumentEncoder* newArgumentEncoder(const NS::Array* arguments); - ArgumentEncoder* newArgumentEncoder(const MTL::BufferBinding* bufferBinding); - - MTL4::ArgumentTable* newArgumentTable(const MTL4::ArgumentTableDescriptor* descriptor, NS::Error** error); - - BinaryArchive* newBinaryArchive(const MTL::BinaryArchiveDescriptor* descriptor, NS::Error** error); - - Buffer* newBuffer(NS::UInteger length, MTL::ResourceOptions options); - Buffer* newBuffer(const void* pointer, NS::UInteger length, MTL::ResourceOptions options); - Buffer* newBuffer(const void* pointer, NS::UInteger length, MTL::ResourceOptions options, void (^deallocator)(void*, NS::UInteger)); - Buffer* newBuffer(NS::UInteger length, MTL::ResourceOptions options, MTL::SparsePageSize placementSparsePageSize); - + MTL::AccelerationStructure* newAccelerationStructure(NS::UInteger size); + MTL::AccelerationStructure* newAccelerationStructure(MTL::AccelerationStructureDescriptor* descriptor); + MTL4::Archive* newArchive(NS::URL* url, NS::Error** error); + MTL::ArgumentEncoder* newArgumentEncoder(NS::Array* arguments); + MTL::ArgumentEncoder* newArgumentEncoder(MTL::BufferBinding* bufferBinding); + MTL4::ArgumentTable* newArgumentTable(MTL4::ArgumentTableDescriptor* descriptor, NS::Error** error); + MTL::BinaryArchive* newBinaryArchive(MTL::BinaryArchiveDescriptor* descriptor, NS::Error** error); + MTL::Buffer* newBuffer(NS::UInteger length, MTL::ResourceOptions options); + MTL::Buffer* newBuffer(const void * pointer, NS::UInteger length, MTL::ResourceOptions options); + MTL::Buffer* newBuffer(void * pointer, NS::UInteger length, MTL::ResourceOptions options, MTL::NewBufferBlock deallocator); + MTL::Buffer* newBuffer(void * pointer, NS::UInteger length, MTL::ResourceOptions options, const MTL::NewBufferFunction& deallocator); + MTL::Buffer* newBuffer(NS::UInteger length, MTL::ResourceOptions options, MTL::SparsePageSize placementSparsePageSize); MTL4::CommandAllocator* newCommandAllocator(); - MTL4::CommandAllocator* newCommandAllocator(const MTL4::CommandAllocatorDescriptor* descriptor, NS::Error** error); - + MTL4::CommandAllocator* newCommandAllocator(MTL4::CommandAllocatorDescriptor* descriptor, NS::Error** error); MTL4::CommandBuffer* newCommandBuffer(); - - CommandQueue* newCommandQueue(); - CommandQueue* newCommandQueue(NS::UInteger maxCommandBufferCount); - CommandQueue* newCommandQueue(const MTL::CommandQueueDescriptor* descriptor); - - MTL4::Compiler* newCompiler(const MTL4::CompilerDescriptor* descriptor, NS::Error** error); - - ComputePipelineState* newComputePipelineState(const MTL::Function* computeFunction, NS::Error** error); - ComputePipelineState* newComputePipelineState(const MTL::Function* computeFunction, MTL::PipelineOption options, const MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error); - void newComputePipelineState(const MTL::Function* computeFunction, const MTL::NewComputePipelineStateCompletionHandler completionHandler); - void newComputePipelineState(const MTL::Function* computeFunction, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler); - ComputePipelineState* newComputePipelineState(const MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error); - void newComputePipelineState(const MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler); - void newComputePipelineState(const MTL::Function* pFunction, const MTL::NewComputePipelineStateCompletionHandlerFunction& completionHandler); - void newComputePipelineState(const MTL::Function* pFunction, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler); - void newComputePipelineState(const MTL::ComputePipelineDescriptor* pDescriptor, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler); - - MTL4::CounterHeap* newCounterHeap(const MTL4::CounterHeapDescriptor* descriptor, NS::Error** error); - - CounterSampleBuffer* newCounterSampleBuffer(const MTL::CounterSampleBufferDescriptor* descriptor, NS::Error** error); - - Library* newDefaultLibrary(); - Library* newDefaultLibrary(const NS::Bundle* bundle, NS::Error** error); - - DepthStencilState* newDepthStencilState(const MTL::DepthStencilDescriptor* descriptor); - - DynamicLibrary* newDynamicLibrary(const MTL::Library* library, NS::Error** error); - DynamicLibrary* newDynamicLibrary(const NS::URL* url, NS::Error** error); - - Event* newEvent(); - - Fence* newFence(); - - Heap* newHeap(const MTL::HeapDescriptor* descriptor); - - IOCommandQueue* newIOCommandQueue(const MTL::IOCommandQueueDescriptor* descriptor, NS::Error** error); - - IOFileHandle* newIOFileHandle(const NS::URL* url, NS::Error** error); - IOFileHandle* newIOFileHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error); - - IOFileHandle* newIOHandle(const NS::URL* url, NS::Error** error); - IOFileHandle* newIOHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error); - - IndirectCommandBuffer* newIndirectCommandBuffer(const MTL::IndirectCommandBufferDescriptor* descriptor, NS::UInteger maxCount, MTL::ResourceOptions options); - - Library* newLibrary(const NS::String* filepath, NS::Error** error); - Library* newLibrary(const NS::URL* url, NS::Error** error); - Library* newLibrary(const dispatch_data_t data, NS::Error** error); - Library* newLibrary(const NS::String* source, const MTL::CompileOptions* options, NS::Error** error); - void newLibrary(const NS::String* source, const MTL::CompileOptions* options, const MTL::NewLibraryCompletionHandler completionHandler); - Library* newLibrary(const MTL::StitchedLibraryDescriptor* descriptor, NS::Error** error); - void newLibrary(const MTL::StitchedLibraryDescriptor* descriptor, const MTL::NewLibraryCompletionHandler completionHandler); - void newLibrary(const NS::String* pSource, const MTL::CompileOptions* pOptions, const MTL::NewLibraryCompletionHandlerFunction& completionHandler); - void newLibrary(const MTL::StitchedLibraryDescriptor* pDescriptor, const MTL::NewLibraryCompletionHandlerFunction& completionHandler); - - LogState* newLogState(const MTL::LogStateDescriptor* descriptor, NS::Error** error); - + MTL::CommandQueue* newCommandQueue(); + MTL::CommandQueue* newCommandQueue(NS::UInteger maxCommandBufferCount); + MTL::CommandQueue* newCommandQueue(MTL::CommandQueueDescriptor* descriptor); + MTL4::Compiler* newCompiler(MTL4::CompilerDescriptor* descriptor, NS::Error** error); + MTL::ComputePipelineState* newComputePipelineState(MTL::Function* computeFunction, NS::Error** error); + MTL::ComputePipelineState* newComputePipelineState(MTL::Function* computeFunction, MTL::PipelineOption options, MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error); + void newComputePipelineState(MTL::Function* computeFunction, MTL::NewComputePipelineStateCompletionHandler completionHandler); + void newComputePipelineState(MTL::Function* computeFunction, const MTL::NewComputePipelineStateCompletionHandlerFunction& completionHandler); + void newComputePipelineState(MTL::Function* computeFunction, MTL::PipelineOption options, MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler); + void newComputePipelineState(MTL::Function* computeFunction, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler); + MTL::ComputePipelineState* newComputePipelineState(MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error); + void newComputePipelineState(MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler); + void newComputePipelineState(MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler); + MTL4::CounterHeap* newCounterHeap(MTL4::CounterHeapDescriptor* descriptor, NS::Error** error); + MTL::CounterSampleBuffer* newCounterSampleBuffer(MTL::CounterSampleBufferDescriptor* descriptor, NS::Error** error); + MTL::Library* newDefaultLibrary(); + MTL::Library* newDefaultLibrary(NS::Bundle* bundle, NS::Error** error); + MTL::DepthStencilState* newDepthStencilState(MTL::DepthStencilDescriptor* descriptor); + MTL::DynamicLibrary* newDynamicLibrary(MTL::Library* library, NS::Error** error); + MTL::DynamicLibrary* newDynamicLibrary(NS::URL* url, NS::Error** error); + MTL::Event* newEvent(); + MTL::Fence* newFence(); + MTL::Heap* newHeap(MTL::HeapDescriptor* descriptor); + MTL::IOCommandQueue* newIOCommandQueue(MTL::IOCommandQueueDescriptor* descriptor, NS::Error** error); + MTL::IOFileHandle* newIOFileHandle(NS::URL* url, NS::Error** error); + MTL::IOFileHandle* newIOFileHandle(NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error); + MTL::IOFileHandle* newIOHandle(NS::URL* url, NS::Error** error); + MTL::IOFileHandle* newIOHandle(NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error); + MTL::IndirectCommandBuffer* newIndirectCommandBuffer(MTL::IndirectCommandBufferDescriptor* descriptor, NS::UInteger maxCount, MTL::ResourceOptions options); + MTL::Library* newLibrary(NS::String* filepath, NS::Error** error); + MTL::Library* newLibrary(NS::URL* url, NS::Error** error); + MTL::Library* newLibrary(dispatch_data_t data, NS::Error** error); + MTL::Library* newLibrary(NS::String* source, MTL::CompileOptions* options, NS::Error** error); + void newLibrary(NS::String* source, MTL::CompileOptions* options, MTL::NewLibraryCompletionHandler completionHandler); + void newLibrary(NS::String* source, MTL::CompileOptions* options, const MTL::NewLibraryCompletionHandlerFunction& completionHandler); + MTL::Library* newLibrary(MTL::StitchedLibraryDescriptor* descriptor, NS::Error** error); + void newLibrary(MTL::StitchedLibraryDescriptor* descriptor, MTL::NewLibraryCompletionHandler completionHandler); + void newLibrary(MTL::StitchedLibraryDescriptor* descriptor, const MTL::NewLibraryCompletionHandlerFunction& completionHandler); + MTL::LogState* newLogState(MTL::LogStateDescriptor* descriptor, NS::Error** error); MTL4::CommandQueue* newMTL4CommandQueue(); - MTL4::CommandQueue* newMTL4CommandQueue(const MTL4::CommandQueueDescriptor* descriptor, NS::Error** error); - - MTL4::PipelineDataSetSerializer* newPipelineDataSetSerializer(const MTL4::PipelineDataSetSerializerDescriptor* descriptor); - - RasterizationRateMap* newRasterizationRateMap(const MTL::RasterizationRateMapDescriptor* descriptor); - - RenderPipelineState* newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, NS::Error** error); - RenderPipelineState* newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error); - void newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, const MTL::NewRenderPipelineStateCompletionHandler completionHandler); - void newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler); - RenderPipelineState* newRenderPipelineState(const MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error); - void newRenderPipelineState(const MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler); - RenderPipelineState* newRenderPipelineState(const MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error); - void newRenderPipelineState(const MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler); - void newRenderPipelineState(const MTL::RenderPipelineDescriptor* pDescriptor, const MTL::NewRenderPipelineStateCompletionHandlerFunction& completionHandler); - void newRenderPipelineState(const MTL::RenderPipelineDescriptor* pDescriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler); - void newRenderPipelineState(const MTL::TileRenderPipelineDescriptor* pDescriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler); - - ResidencySet* newResidencySet(const MTL::ResidencySetDescriptor* desc, NS::Error** error); - - SamplerState* newSamplerState(const MTL::SamplerDescriptor* descriptor); - - SharedEvent* newSharedEvent(); - SharedEvent* newSharedEvent(const MTL::SharedEventHandle* sharedEventHandle); - - Texture* newSharedTexture(const MTL::TextureDescriptor* descriptor); - Texture* newSharedTexture(const MTL::SharedTextureHandle* sharedHandle); - - Tensor* newTensor(const MTL::TensorDescriptor* descriptor, NS::Error** error); - - Texture* newTexture(const MTL::TextureDescriptor* descriptor); - Texture* newTexture(const MTL::TextureDescriptor* descriptor, const IOSurfaceRef iosurface, NS::UInteger plane); - TextureViewPool* newTextureViewPool(const MTL::ResourceViewPoolDescriptor* descriptor, NS::Error** error); - + MTL4::CommandQueue* newMTL4CommandQueue(MTL4::CommandQueueDescriptor* descriptor, NS::Error** error); + MTL4::PipelineDataSetSerializer* newPipelineDataSetSerializer(MTL4::PipelineDataSetSerializerDescriptor* descriptor); + MTL::RasterizationRateMap* newRasterizationRateMap(MTL::RasterizationRateMapDescriptor* descriptor); + MTL::RenderPipelineState* newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, NS::Error** error); + MTL::RenderPipelineState* newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error); + void newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, MTL::NewRenderPipelineStateCompletionHandler completionHandler); + void newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, const MTL::NewRenderPipelineStateCompletionHandlerFunction& completionHandler); + void newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler); + void newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler); + MTL::RenderPipelineState* newRenderPipelineState(MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error); + void newRenderPipelineState(MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler); + void newRenderPipelineState(MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler); + MTL::RenderPipelineState* newRenderPipelineState(MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error); + void newRenderPipelineState(MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler); + void newRenderPipelineState(MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler); + MTL::ResidencySet* newResidencySet(MTL::ResidencySetDescriptor* desc, NS::Error** error); + MTL::SamplerState* newSamplerState(MTL::SamplerDescriptor* descriptor); + MTL::SharedEvent* newSharedEvent(); + MTL::SharedEvent* newSharedEvent(MTL::SharedEventHandle* sharedEventHandle); + MTL::Texture* newSharedTexture(MTL::TextureDescriptor* descriptor); + MTL::Texture* newSharedTexture(MTL::SharedTextureHandle* sharedHandle); + MTL::Tensor* newTensor(MTL::TensorDescriptor* descriptor, NS::Error** error); + MTL::Texture* newTexture(MTL::TextureDescriptor* descriptor); + MTL::Texture* newTexture(MTL::TextureDescriptor* descriptor, IOSurfaceRef iosurface, NS::UInteger plane); + MTL::TextureViewPool* newTextureViewPool(MTL::ResourceViewPoolDescriptor* descriptor, NS::Error** error); uint32_t peerCount() const; - uint64_t peerGroupID() const; - uint32_t peerIndex() const; + uint64_t queryTimestampFrequency(); + MTL::ReadWriteTextureTier readWriteTextureSupport() const; + uint64_t recommendedMaxWorkingSetSize() const; + uint64_t registryID() const; + bool removable() const; + void sampleTimestamps(MTL::Timestamp* cpuTimestamp, MTL::Timestamp* gpuTimestamp); + void setShouldMaximizeConcurrentCompilation(bool shouldMaximizeConcurrentCompilation); + bool shouldMaximizeConcurrentCompilation() const; + NS::UInteger sizeOfCounterHeapEntry(MTL4::CounterHeapType type); + MTL::Size sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount); + MTL::Size sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount, MTL::SparsePageSize sparsePageSize); + NS::UInteger sparseTileSizeInBytes() const; + NS::UInteger sparseTileSizeInBytes(MTL::SparsePageSize sparsePageSize); + bool supports32BitFloatFiltering() const; + bool supports32BitMSAA() const; + bool supportsBCTextureCompression() const; + bool supportsCounterSampling(MTL::CounterSamplingPoint samplingPoint); + bool supportsDynamicLibraries() const; + bool supportsFamily(MTL::GPUFamily gpuFamily); + bool supportsFeatureSet(MTL::FeatureSet featureSet); + bool supportsFunctionPointers() const; + bool supportsFunctionPointersFromRender() const; + bool supportsPrimitiveMotionBlur() const; + bool supportsPullModelInterpolation() const; + bool supportsQueryTextureLOD() const; + bool supportsRasterizationRateMap(NS::UInteger layerCount); + bool supportsRaytracing() const; + bool supportsRaytracingFromRender() const; + bool supportsRenderDynamicLibraries() const; + bool supportsShaderBarycentricCoordinates() const; + bool supportsTextureSampleCount(NS::UInteger sampleCount); + bool supportsVertexAmplificationCount(NS::UInteger count); + MTL::SizeAndAlign tensorSizeAndAlign(MTL::TensorDescriptor* descriptor); - [[deprecated("please use areProgrammableSamplePositionsSupported instead")]] - bool programmableSamplePositionsSupported() const; - - uint64_t queryTimestampFrequency(); - - [[deprecated("please use areRasterOrderGroupsSupported instead")]] - bool rasterOrderGroupsSupported() const; - - ReadWriteTextureTier readWriteTextureSupport() const; - - uint64_t recommendedMaxWorkingSetSize() const; - - uint64_t registryID() const; - - [[deprecated("please use isRemovable instead")]] - bool removable() const; - - void sampleTimestamps(MTL::Timestamp* cpuTimestamp, MTL::Timestamp* gpuTimestamp); - - void setShouldMaximizeConcurrentCompilation(bool shouldMaximizeConcurrentCompilation); - bool shouldMaximizeConcurrentCompilation() const; - - NS::UInteger sizeOfCounterHeapEntry(MTL4::CounterHeapType type); - - Size sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount); - Size sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount, MTL::SparsePageSize sparsePageSize); - NS::UInteger sparseTileSizeInBytes() const; - NS::UInteger sparseTileSizeInBytes(MTL::SparsePageSize sparsePageSize); - - bool supports32BitFloatFiltering() const; - - bool supports32BitMSAA() const; - - bool supportsBCTextureCompression() const; - - bool supportsCounterSampling(MTL::CounterSamplingPoint samplingPoint); - - bool supportsDynamicLibraries() const; - - bool supportsFamily(MTL::GPUFamily gpuFamily); - - bool supportsFeatureSet(MTL::FeatureSet featureSet); - - bool supportsFunctionPointers() const; - bool supportsFunctionPointersFromRender() const; - - bool supportsPrimitiveMotionBlur() const; - - bool supportsPullModelInterpolation() const; - - bool supportsQueryTextureLOD() const; - - bool supportsRasterizationRateMap(NS::UInteger layerCount); - - bool supportsRaytracing() const; - bool supportsRaytracingFromRender() const; - - bool supportsRenderDynamicLibraries() const; - - bool supportsShaderBarycentricCoordinates() const; - - bool supportsTextureSampleCount(NS::UInteger sampleCount); - - bool supportsVertexAmplificationCount(NS::UInteger count); - - SizeAndAlign tensorSizeAndAlign(const MTL::TensorDescriptor* descriptor); }; -} +} // namespace MTL -#if defined(MTL_PRIVATE_IMPLEMENTATION) -extern "C" MTL::Device* MTLCreateSystemDefaultDevice(); -extern "C" NS::Array* MTLCopyAllDevices(); -extern "C" NS::Array* MTLCopyAllDevicesWithObserver(NS::Object**, MTL::DeviceNotificationHandlerBlock); -extern "C" void MTLRemoveDeviceObserver(const NS::Object*); -_MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceWasAddedNotification); -_MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceRemovalRequestedNotification); -_MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceWasRemovedNotification); -_MTL_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, CommandBufferEncoderInfoErrorKey); -_NS_EXPORT MTL::Device* MTL::CreateSystemDefaultDevice() -{ - return ::MTLCreateSystemDefaultDevice(); -} - -_NS_EXPORT NS::Array* MTL::CopyAllDevices() -{ -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 180000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - return ::MTLCopyAllDevices(); -#else - return nullptr; -#endif -} - -_NS_EXPORT NS::Array* MTL::CopyAllDevicesWithObserver(NS::Object** pOutObserver, MTL::DeviceNotificationHandlerBlock handler) -{ -#if TARGET_OS_OSX - return ::MTLCopyAllDevicesWithObserver(pOutObserver, handler); -#else - (void)pOutObserver; - (void)handler; - return nullptr; -#endif // TARGET_OS_OSX -} +// --- Class symbols + inline implementations --- -_NS_EXPORT NS::Array* MTL::CopyAllDevicesWithObserver(NS::Object** pOutObserver, const MTL::DeviceNotificationHandlerFunction& handler) -{ - __block DeviceNotificationHandlerFunction function = handler; - return CopyAllDevicesWithObserver(pOutObserver, ^(Device* pDevice, DeviceNotificationName pNotificationName) { function(pDevice, pNotificationName); }); -} - -_NS_EXPORT void MTL::RemoveDeviceObserver(const NS::Object* pObserver) -{ - (void)pObserver; -#if TARGET_OS_OSX - ::MTLRemoveDeviceObserver(pObserver); -#endif // TARGET_OS_OSX -} - -#endif // MTL_PRIVATE_IMPLEMENTATION - -_MTL_INLINE MTL::BindingAccess MTL::ArgumentDescriptor::access() const -{ - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); -} +extern "C" void *OBJC_CLASS_$_MTLArgumentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLArchitecture; +extern "C" void *OBJC_CLASS_$_MTLDevice; _MTL_INLINE MTL::ArgumentDescriptor* MTL::ArgumentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLArgumentDescriptor)); + return _MTL_msg_MTL__ArgumentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLArgumentDescriptor, nullptr); } -_MTL_INLINE MTL::ArgumentDescriptor* MTL::ArgumentDescriptor::argumentDescriptor() +_MTL_INLINE MTL::ArgumentDescriptor* MTL::ArgumentDescriptor::init() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLArgumentDescriptor), _MTL_PRIVATE_SEL(argumentDescriptor)); + return _MTL_msg_MTL__ArgumentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::ArgumentDescriptor::arrayLength() const +_MTL_INLINE MTL::ArgumentDescriptor* MTL::ArgumentDescriptor::argumentDescriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(arrayLength)); + return _MTL_msg_MTL__ArgumentDescriptorp_argumentDescriptor((const void*)&OBJC_CLASS_$_MTLArgumentDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::ArgumentDescriptor::constantBlockAlignment() const +_MTL_INLINE MTL::DataType MTL::ArgumentDescriptor::dataType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(constantBlockAlignment)); + return _MTL_msg_MTL__DataType_dataType((const void*)this, nullptr); } -_MTL_INLINE MTL::DataType MTL::ArgumentDescriptor::dataType() const +_MTL_INLINE void MTL::ArgumentDescriptor::setDataType(MTL::DataType dataType) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dataType)); + _MTL_msg_v_setDataType__MTL__DataType((const void*)this, nullptr, dataType); } _MTL_INLINE NS::UInteger MTL::ArgumentDescriptor::index() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(index)); + return _MTL_msg_NS__UInteger_index((const void*)this, nullptr); } -_MTL_INLINE MTL::ArgumentDescriptor* MTL::ArgumentDescriptor::init() +_MTL_INLINE void MTL::ArgumentDescriptor::setIndex(NS::UInteger index) { - return NS::Object::init(); + _MTL_msg_v_setIndex__NS__UInteger((const void*)this, nullptr, index); } -_MTL_INLINE void MTL::ArgumentDescriptor::setAccess(MTL::BindingAccess access) +_MTL_INLINE NS::UInteger MTL::ArgumentDescriptor::arrayLength() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAccess_), access); + return _MTL_msg_NS__UInteger_arrayLength((const void*)this, nullptr); } _MTL_INLINE void MTL::ArgumentDescriptor::setArrayLength(NS::UInteger arrayLength) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setArrayLength_), arrayLength); + _MTL_msg_v_setArrayLength__NS__UInteger((const void*)this, nullptr, arrayLength); } -_MTL_INLINE void MTL::ArgumentDescriptor::setConstantBlockAlignment(NS::UInteger constantBlockAlignment) +_MTL_INLINE MTL::BindingAccess MTL::ArgumentDescriptor::access() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setConstantBlockAlignment_), constantBlockAlignment); + return _MTL_msg_MTL__BindingAccess_access((const void*)this, nullptr); } -_MTL_INLINE void MTL::ArgumentDescriptor::setDataType(MTL::DataType dataType) +_MTL_INLINE void MTL::ArgumentDescriptor::setAccess(MTL::BindingAccess access) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDataType_), dataType); + _MTL_msg_v_setAccess__MTL__BindingAccess((const void*)this, nullptr, access); } -_MTL_INLINE void MTL::ArgumentDescriptor::setIndex(NS::UInteger index) +_MTL_INLINE MTL::TextureType MTL::ArgumentDescriptor::textureType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndex_), index); + return _MTL_msg_MTL__TextureType_textureType((const void*)this, nullptr); } _MTL_INLINE void MTL::ArgumentDescriptor::setTextureType(MTL::TextureType textureType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTextureType_), textureType); + _MTL_msg_v_setTextureType__MTL__TextureType((const void*)this, nullptr, textureType); } -_MTL_INLINE MTL::TextureType MTL::ArgumentDescriptor::textureType() const +_MTL_INLINE NS::UInteger MTL::ArgumentDescriptor::constantBlockAlignment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureType)); + return _MTL_msg_NS__UInteger_constantBlockAlignment((const void*)this, nullptr); } -_MTL_INLINE MTL::Architecture* MTL::Architecture::alloc() +_MTL_INLINE void MTL::ArgumentDescriptor::setConstantBlockAlignment(NS::UInteger constantBlockAlignment) { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLArchitecture)); + _MTL_msg_v_setConstantBlockAlignment__NS__UInteger((const void*)this, nullptr, constantBlockAlignment); } -_MTL_INLINE MTL::Architecture* MTL::Architecture::init() +_MTL_INLINE MTL::Architecture* MTL::Architecture::alloc() { - return NS::Object::init(); + return _MTL_msg_MTL__Architecturep_alloc((const void*)&OBJC_CLASS_$_MTLArchitecture, nullptr); } -_MTL_INLINE NS::String* MTL::Architecture::name() const +_MTL_INLINE MTL::Architecture* MTL::Architecture::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_MTL__Architecturep_init((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructureSizes MTL::Device::accelerationStructureSizes(const MTL::AccelerationStructureDescriptor* descriptor) +_MTL_INLINE NS::String* MTL::Architecture::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(accelerationStructureSizesWithDescriptor_), descriptor); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE MTL::Architecture* MTL::Device::architecture() const +_MTL_INLINE NS::String* MTL::Device::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(architecture)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::areBarycentricCoordsSupported() const +_MTL_INLINE uint64_t MTL::Device::registryID() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(areBarycentricCoordsSupported)); + return _MTL_msg_uint64_t_registryID((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::areProgrammableSamplePositionsSupported() const +_MTL_INLINE MTL::Architecture* MTL::Device::architecture() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(areProgrammableSamplePositionsSupported)); + return _MTL_msg_MTL__Architecturep_architecture((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::areRasterOrderGroupsSupported() const +_MTL_INLINE MTL::Size MTL::Device::maxThreadsPerThreadgroup() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(areRasterOrderGroupsSupported)); + return _MTL_msg_MTL__Size_maxThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE MTL::ArgumentBuffersTier MTL::Device::argumentBuffersSupport() const +_MTL_INLINE bool MTL::Device::lowPower() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(argumentBuffersSupport)); + return _MTL_msg_bool_lowPower((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::barycentricCoordsSupported() const +_MTL_INLINE bool MTL::Device::headless() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(areBarycentricCoordsSupported)); + return _MTL_msg_bool_headless((const void*)this, nullptr); } -_MTL_INLINE void MTL::Device::convertSparsePixelRegions(const MTL::Region* pixelRegions, MTL::Region* tileRegions, MTL::Size tileSize, MTL::SparseTextureRegionAlignmentMode mode, NS::UInteger numRegions) +_MTL_INLINE bool MTL::Device::removable() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(convertSparsePixelRegions_toTileRegions_withTileSize_alignmentMode_numRegions_), pixelRegions, tileRegions, tileSize, mode, numRegions); + return _MTL_msg_bool_removable((const void*)this, nullptr); } -_MTL_INLINE void MTL::Device::convertSparseTileRegions(const MTL::Region* tileRegions, MTL::Region* pixelRegions, MTL::Size tileSize, NS::UInteger numRegions) +_MTL_INLINE bool MTL::Device::hasUnifiedMemory() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(convertSparseTileRegions_toPixelRegions_withTileSize_numRegions_), tileRegions, pixelRegions, tileSize, numRegions); + return _MTL_msg_bool_hasUnifiedMemory((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::Device::counterSets() const +_MTL_INLINE uint64_t MTL::Device::recommendedMaxWorkingSetSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(counterSets)); + return _MTL_msg_uint64_t_recommendedMaxWorkingSetSize((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Device::currentAllocatedSize() const +_MTL_INLINE MTL::DeviceLocation MTL::Device::location() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(currentAllocatedSize)); + return _MTL_msg_MTL__DeviceLocation_location((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::depth24Stencil8PixelFormatSupported() const +_MTL_INLINE NS::UInteger MTL::Device::locationNumber() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(isDepth24Stencil8PixelFormatSupported)); + return _MTL_msg_NS__UInteger_locationNumber((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionHandle* MTL::Device::functionHandle(const MTL::Function* function) +_MTL_INLINE uint64_t MTL::Device::maxTransferRate() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionHandleWithFunction_), function); + return _MTL_msg_uint64_t_maxTransferRate((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionHandle* MTL::Device::functionHandle(const MTL4::BinaryFunction* function) +_MTL_INLINE bool MTL::Device::depth24Stencil8PixelFormatSupported() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionHandleWithBinaryFunction_), function); + return _MTL_msg_bool_depth24Stencil8PixelFormatSupported((const void*)this, nullptr); } -_MTL_INLINE void MTL::Device::getDefaultSamplePositions(MTL::SamplePosition* positions, NS::UInteger count) +_MTL_INLINE MTL::ReadWriteTextureTier MTL::Device::readWriteTextureSupport() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(getDefaultSamplePositions_count_), positions, count); + return _MTL_msg_MTL__ReadWriteTextureTier_readWriteTextureSupport((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::hasUnifiedMemory() const +_MTL_INLINE MTL::ArgumentBuffersTier MTL::Device::argumentBuffersSupport() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(hasUnifiedMemory)); + return _MTL_msg_MTL__ArgumentBuffersTier_argumentBuffersSupport((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::headless() const +_MTL_INLINE bool MTL::Device::supports32BitFloatFiltering() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isHeadless)); + return _MTL_msg_bool_supports32BitFloatFiltering((const void*)this, nullptr); } -_MTL_INLINE MTL::SizeAndAlign MTL::Device::heapAccelerationStructureSizeAndAlign(NS::UInteger size) +_MTL_INLINE bool MTL::Device::supports32BitMSAA() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(heapAccelerationStructureSizeAndAlignWithSize_), size); + return _MTL_msg_bool_supports32BitMSAA((const void*)this, nullptr); } -_MTL_INLINE MTL::SizeAndAlign MTL::Device::heapAccelerationStructureSizeAndAlign(const MTL::AccelerationStructureDescriptor* descriptor) +_MTL_INLINE bool MTL::Device::supportsQueryTextureLOD() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(heapAccelerationStructureSizeAndAlignWithDescriptor_), descriptor); + return _MTL_msg_bool_supportsQueryTextureLOD((const void*)this, nullptr); } -_MTL_INLINE MTL::SizeAndAlign MTL::Device::heapBufferSizeAndAlign(NS::UInteger length, MTL::ResourceOptions options) +_MTL_INLINE bool MTL::Device::supportsBCTextureCompression() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(heapBufferSizeAndAlignWithLength_options_), length, options); + return _MTL_msg_bool_supportsBCTextureCompression((const void*)this, nullptr); } -_MTL_INLINE MTL::SizeAndAlign MTL::Device::heapTextureSizeAndAlign(const MTL::TextureDescriptor* desc) +_MTL_INLINE bool MTL::Device::supportsPullModelInterpolation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(heapTextureSizeAndAlignWithDescriptor_), desc); + return _MTL_msg_bool_supportsPullModelInterpolation((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::isDepth24Stencil8PixelFormatSupported() const +_MTL_INLINE bool MTL::Device::supportsShaderBarycentricCoordinates() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(isDepth24Stencil8PixelFormatSupported)); + return _MTL_msg_bool_supportsShaderBarycentricCoordinates((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::isHeadless() const +_MTL_INLINE NS::UInteger MTL::Device::currentAllocatedSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isHeadless)); + return _MTL_msg_NS__UInteger_currentAllocatedSize((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::isLowPower() const +_MTL_INLINE NS::UInteger MTL::Device::maxThreadgroupMemoryLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isLowPower)); + return _MTL_msg_NS__UInteger_maxThreadgroupMemoryLength((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::isRemovable() const +_MTL_INLINE NS::UInteger MTL::Device::maxArgumentBufferSamplerCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isRemovable)); + return _MTL_msg_NS__UInteger_maxArgumentBufferSamplerCount((const void*)this, nullptr); } -_MTL_INLINE MTL::DeviceLocation MTL::Device::location() const +_MTL_INLINE uint64_t MTL::Device::peerGroupID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(location)); + return _MTL_msg_uint64_t_peerGroupID((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Device::locationNumber() const +_MTL_INLINE uint32_t MTL::Device::peerIndex() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(locationNumber)); + return _MTL_msg_uint32_t_peerIndex((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::lowPower() const +_MTL_INLINE uint32_t MTL::Device::peerCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isLowPower)); + return _MTL_msg_uint32_t_peerCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Device::maxArgumentBufferSamplerCount() const +_MTL_INLINE NS::UInteger MTL::Device::sparseTileSizeInBytes() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxArgumentBufferSamplerCount)); + return _MTL_msg_NS__UInteger_sparseTileSizeInBytes((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::Device::maxBufferLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxBufferLength)); + return _MTL_msg_NS__UInteger_maxBufferLength((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Device::maxThreadgroupMemoryLength() const +_MTL_INLINE NS::Array* MTL::Device::counterSets() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxThreadgroupMemoryLength)); + return _MTL_msg_NS__Arrayp_counterSets((const void*)this, nullptr); } -_MTL_INLINE MTL::Size MTL::Device::maxThreadsPerThreadgroup() const +_MTL_INLINE bool MTL::Device::supportsDynamicLibraries() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxThreadsPerThreadgroup)); + return _MTL_msg_bool_supportsDynamicLibraries((const void*)this, nullptr); } -_MTL_INLINE uint64_t MTL::Device::maxTransferRate() const +_MTL_INLINE bool MTL::Device::supportsRenderDynamicLibraries() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTransferRate)); + return _MTL_msg_bool_supportsRenderDynamicLibraries((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Device::maximumConcurrentCompilationTaskCount() const +_MTL_INLINE bool MTL::Device::supportsRaytracing() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maximumConcurrentCompilationTaskCount)); + return _MTL_msg_bool_supportsRaytracing((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Device::minimumLinearTextureAlignmentForPixelFormat(MTL::PixelFormat format) +_MTL_INLINE bool MTL::Device::supportsFunctionPointers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(minimumLinearTextureAlignmentForPixelFormat_), format); + return _MTL_msg_bool_supportsFunctionPointers((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Device::minimumTextureBufferAlignmentForPixelFormat(MTL::PixelFormat format) +_MTL_INLINE bool MTL::Device::supportsFunctionPointersFromRender() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(minimumTextureBufferAlignmentForPixelFormat_), format); + return _MTL_msg_bool_supportsFunctionPointersFromRender((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::Device::name() const +_MTL_INLINE bool MTL::Device::supportsRaytracingFromRender() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_bool_supportsRaytracingFromRender((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructure* MTL::Device::newAccelerationStructure(NS::UInteger size) +_MTL_INLINE bool MTL::Device::supportsPrimitiveMotionBlur() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newAccelerationStructureWithSize_), size); + return _MTL_msg_bool_supportsPrimitiveMotionBlur((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructure* MTL::Device::newAccelerationStructure(const MTL::AccelerationStructureDescriptor* descriptor) +_MTL_INLINE bool MTL::Device::shouldMaximizeConcurrentCompilation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newAccelerationStructureWithDescriptor_), descriptor); + return _MTL_msg_bool_shouldMaximizeConcurrentCompilation((const void*)this, nullptr); } -_MTL_INLINE MTL4::Archive* MTL::Device::newArchive(const NS::URL* url, NS::Error** error) +_MTL_INLINE void MTL::Device::setShouldMaximizeConcurrentCompilation(bool shouldMaximizeConcurrentCompilation) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newArchiveWithURL_error_), url, error); + _MTL_msg_v_setShouldMaximizeConcurrentCompilation__bool((const void*)this, nullptr, shouldMaximizeConcurrentCompilation); } -_MTL_INLINE MTL::ArgumentEncoder* MTL::Device::newArgumentEncoder(const NS::Array* arguments) +_MTL_INLINE NS::UInteger MTL::Device::maximumConcurrentCompilationTaskCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newArgumentEncoderWithArguments_), arguments); + return _MTL_msg_NS__UInteger_maximumConcurrentCompilationTaskCount((const void*)this, nullptr); } -_MTL_INLINE MTL::ArgumentEncoder* MTL::Device::newArgumentEncoder(const MTL::BufferBinding* bufferBinding) +_MTL_INLINE MTL::LogState* MTL::Device::newLogState(MTL::LogStateDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newArgumentEncoderWithBufferBinding_), bufferBinding); + return _MTL_msg_MTL__LogStatep_newLogStateWithDescriptor_error__MTL__LogStateDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL4::ArgumentTable* MTL::Device::newArgumentTable(const MTL4::ArgumentTableDescriptor* descriptor, NS::Error** error) +_MTL_INLINE MTL::CommandQueue* MTL::Device::newCommandQueue() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newArgumentTableWithDescriptor_error_), descriptor, error); + return _MTL_msg_MTL__CommandQueuep_newCommandQueue((const void*)this, nullptr); } -_MTL_INLINE MTL::BinaryArchive* MTL::Device::newBinaryArchive(const MTL::BinaryArchiveDescriptor* descriptor, NS::Error** error) +_MTL_INLINE MTL::CommandQueue* MTL::Device::newCommandQueue(NS::UInteger maxCommandBufferCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBinaryArchiveWithDescriptor_error_), descriptor, error); + return _MTL_msg_MTL__CommandQueuep_newCommandQueueWithMaxCommandBufferCount__NS__UInteger((const void*)this, nullptr, maxCommandBufferCount); } -_MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(NS::UInteger length, MTL::ResourceOptions options) +_MTL_INLINE MTL::CommandQueue* MTL::Device::newCommandQueue(MTL::CommandQueueDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBufferWithLength_options_), length, options); + return _MTL_msg_MTL__CommandQueuep_newCommandQueueWithDescriptor__MTL__CommandQueueDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(const void* pointer, NS::UInteger length, MTL::ResourceOptions options) +_MTL_INLINE MTL::SizeAndAlign MTL::Device::heapTextureSizeAndAlign(MTL::TextureDescriptor* desc) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBufferWithBytes_length_options_), pointer, length, options); + return _MTL_msg_MTL__SizeAndAlign_heapTextureSizeAndAlignWithDescriptor__MTL__TextureDescriptorp((const void*)this, nullptr, desc); } -_MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(const void* pointer, NS::UInteger length, MTL::ResourceOptions options, void (^deallocator)(void*, NS::UInteger)) +_MTL_INLINE MTL::SizeAndAlign MTL::Device::heapBufferSizeAndAlign(NS::UInteger length, MTL::ResourceOptions options) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBufferWithBytesNoCopy_length_options_deallocator_), pointer, length, options, deallocator); + return _MTL_msg_MTL__SizeAndAlign_heapBufferSizeAndAlignWithLength_options__NS__UInteger_MTL__ResourceOptions((const void*)this, nullptr, length, options); } -_MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(NS::UInteger length, MTL::ResourceOptions options, MTL::SparsePageSize placementSparsePageSize) +_MTL_INLINE MTL::Heap* MTL::Device::newHeap(MTL::HeapDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBufferWithLength_options_placementSparsePageSize_), length, options, placementSparsePageSize); + return _MTL_msg_MTL__Heapp_newHeapWithDescriptor__MTL__HeapDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE MTL4::CommandAllocator* MTL::Device::newCommandAllocator() +_MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(NS::UInteger length, MTL::ResourceOptions options) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCommandAllocator)); + return _MTL_msg_MTL__Bufferp_newBufferWithLength_options__NS__UInteger_MTL__ResourceOptions((const void*)this, nullptr, length, options); } -_MTL_INLINE MTL4::CommandAllocator* MTL::Device::newCommandAllocator(const MTL4::CommandAllocatorDescriptor* descriptor, NS::Error** error) +_MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(const void * pointer, NS::UInteger length, MTL::ResourceOptions options) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCommandAllocatorWithDescriptor_error_), descriptor, error); + return _MTL_msg_MTL__Bufferp_newBufferWithBytes_length_options__constvoidp_NS__UInteger_MTL__ResourceOptions((const void*)this, nullptr, pointer, length, options); } -_MTL_INLINE MTL4::CommandBuffer* MTL::Device::newCommandBuffer() +_MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(void * pointer, NS::UInteger length, MTL::ResourceOptions options, MTL::NewBufferBlock deallocator) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCommandBuffer)); + return _MTL_msg_MTL__Bufferp_newBufferWithBytesNoCopy_length_options_deallocator__voidp_NS__UInteger_MTL__ResourceOptions_MTL__NewBufferBlock((const void*)this, nullptr, pointer, length, options, deallocator); } -_MTL_INLINE MTL::CommandQueue* MTL::Device::newCommandQueue() +_MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(void * pointer, NS::UInteger length, MTL::ResourceOptions options, const MTL::NewBufferFunction& deallocator) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCommandQueue)); + __block MTL::NewBufferFunction blockFunction = deallocator; + return newBuffer(pointer, length, options, ^(void * x0, NS::UInteger x1) { blockFunction(x0, x1); }); } -_MTL_INLINE MTL::CommandQueue* MTL::Device::newCommandQueue(NS::UInteger maxCommandBufferCount) +_MTL_INLINE MTL::DepthStencilState* MTL::Device::newDepthStencilState(MTL::DepthStencilDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCommandQueueWithMaxCommandBufferCount_), maxCommandBufferCount); + return _MTL_msg_MTL__DepthStencilStatep_newDepthStencilStateWithDescriptor__MTL__DepthStencilDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE MTL::CommandQueue* MTL::Device::newCommandQueue(const MTL::CommandQueueDescriptor* descriptor) +_MTL_INLINE MTL::Texture* MTL::Device::newTexture(MTL::TextureDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCommandQueueWithDescriptor_), descriptor); + return _MTL_msg_MTL__Texturep_newTextureWithDescriptor__MTL__TextureDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE MTL4::Compiler* MTL::Device::newCompiler(const MTL4::CompilerDescriptor* descriptor, NS::Error** error) +_MTL_INLINE MTL::Texture* MTL::Device::newTexture(MTL::TextureDescriptor* descriptor, IOSurfaceRef iosurface, NS::UInteger plane) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCompilerWithDescriptor_error_), descriptor, error); + return _MTL_msg_MTL__Texturep_newTextureWithDescriptor_iosurface_plane__MTL__TextureDescriptorp_IOSurfaceRef_NS__UInteger((const void*)this, nullptr, descriptor, iosurface, plane); } -_MTL_INLINE MTL::ComputePipelineState* MTL::Device::newComputePipelineState(const MTL::Function* computeFunction, NS::Error** error) +_MTL_INLINE MTL::Texture* MTL::Device::newSharedTexture(MTL::TextureDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithFunction_error_), computeFunction, error); + return _MTL_msg_MTL__Texturep_newSharedTextureWithDescriptor__MTL__TextureDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE MTL::ComputePipelineState* MTL::Device::newComputePipelineState(const MTL::Function* computeFunction, MTL::PipelineOption options, const MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error) +_MTL_INLINE MTL::Texture* MTL::Device::newSharedTexture(MTL::SharedTextureHandle* sharedHandle) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithFunction_options_reflection_error_), computeFunction, options, reflection, error); + return _MTL_msg_MTL__Texturep_newSharedTextureWithHandle__MTL__SharedTextureHandlep((const void*)this, nullptr, sharedHandle); } -_MTL_INLINE void MTL::Device::newComputePipelineState(const MTL::Function* computeFunction, const MTL::NewComputePipelineStateCompletionHandler completionHandler) +_MTL_INLINE MTL::SamplerState* MTL::Device::newSamplerState(MTL::SamplerDescriptor* descriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithFunction_completionHandler_), computeFunction, completionHandler); + return _MTL_msg_MTL__SamplerStatep_newSamplerStateWithDescriptor__MTL__SamplerDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE void MTL::Device::newComputePipelineState(const MTL::Function* computeFunction, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler) +_MTL_INLINE MTL::Library* MTL::Device::newDefaultLibrary() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithFunction_options_completionHandler_), computeFunction, options, completionHandler); + return _MTL_msg_MTL__Libraryp_newDefaultLibrary((const void*)this, nullptr); } -_MTL_INLINE MTL::ComputePipelineState* MTL::Device::newComputePipelineState(const MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error) +_MTL_INLINE MTL::Library* MTL::Device::newDefaultLibrary(NS::Bundle* bundle, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithDescriptor_options_reflection_error_), descriptor, options, reflection, error); + return _MTL_msg_MTL__Libraryp_newDefaultLibraryWithBundle_error__NS__Bundlep_NS__Errorpp((const void*)this, nullptr, bundle, error); } -_MTL_INLINE void MTL::Device::newComputePipelineState(const MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler) +_MTL_INLINE MTL::Library* MTL::Device::newLibrary(NS::String* filepath, NS::Error** error) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithDescriptor_options_completionHandler_), descriptor, options, completionHandler); + return _MTL_msg_MTL__Libraryp_newLibraryWithFile_error__NS__Stringp_NS__Errorpp((const void*)this, nullptr, filepath, error); } -_MTL_INLINE void MTL::Device::newComputePipelineState(const MTL::Function* pFunction, const MTL::NewComputePipelineStateCompletionHandlerFunction& completionHandler) +_MTL_INLINE MTL::Library* MTL::Device::newLibrary(NS::URL* url, NS::Error** error) { - __block MTL::NewComputePipelineStateCompletionHandlerFunction blockCompletionHandler = completionHandler; - newComputePipelineState(pFunction, ^(MTL::ComputePipelineState* pPipelineState, NS::Error* pError) { blockCompletionHandler(pPipelineState, pError); }); + return _MTL_msg_MTL__Libraryp_newLibraryWithURL_error__NS__URLp_NS__Errorpp((const void*)this, nullptr, url, error); } -_MTL_INLINE void MTL::Device::newComputePipelineState(const MTL::Function* pFunction, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler) +_MTL_INLINE MTL::Library* MTL::Device::newLibrary(dispatch_data_t data, NS::Error** error) { - __block MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction blockCompletionHandler = completionHandler; - newComputePipelineState(pFunction, options, ^(MTL::ComputePipelineState* pPipelineState, MTL::ComputePipelineReflection* pReflection, NS::Error* pError) { blockCompletionHandler(pPipelineState, pReflection, pError); }); + return _MTL_msg_MTL__Libraryp_newLibraryWithData_error__dispatch_data_t_NS__Errorpp((const void*)this, nullptr, data, error); } -_MTL_INLINE void MTL::Device::newComputePipelineState(const MTL::ComputePipelineDescriptor* pDescriptor, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler) +_MTL_INLINE MTL::Library* MTL::Device::newLibrary(NS::String* source, MTL::CompileOptions* options, NS::Error** error) { - __block NewComputePipelineStateWithReflectionCompletionHandlerFunction blockCompletionHandler = completionHandler; - newComputePipelineState(pDescriptor, options, ^(ComputePipelineState* pPipelineState, ComputePipelineReflection* pReflection, NS::Error* pError) { blockCompletionHandler(pPipelineState, pReflection, pError); }); + return _MTL_msg_MTL__Libraryp_newLibraryWithSource_options_error__NS__Stringp_MTL__CompileOptionsp_NS__Errorpp((const void*)this, nullptr, source, options, error); } -_MTL_INLINE MTL4::CounterHeap* MTL::Device::newCounterHeap(const MTL4::CounterHeapDescriptor* descriptor, NS::Error** error) +_MTL_INLINE void MTL::Device::newLibrary(NS::String* source, MTL::CompileOptions* options, MTL::NewLibraryCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCounterHeapWithDescriptor_error_), descriptor, error); + _MTL_msg_v_newLibraryWithSource_options_completionHandler__NS__Stringp_MTL__CompileOptionsp_MTL__NewLibraryCompletionHandler((const void*)this, nullptr, source, options, completionHandler); } -_MTL_INLINE MTL::CounterSampleBuffer* MTL::Device::newCounterSampleBuffer(const MTL::CounterSampleBufferDescriptor* descriptor, NS::Error** error) +_MTL_INLINE void MTL::Device::newLibrary(NS::String* source, MTL::CompileOptions* options, const MTL::NewLibraryCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newCounterSampleBufferWithDescriptor_error_), descriptor, error); + __block MTL::NewLibraryCompletionHandlerFunction blockFunction = completionHandler; + newLibrary(source, options, ^(MTL::Library* x0, NS::Error* x1) { blockFunction(x0, x1); }); } -_MTL_INLINE MTL::Library* MTL::Device::newDefaultLibrary() +_MTL_INLINE MTL::Library* MTL::Device::newLibrary(MTL::StitchedLibraryDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newDefaultLibrary)); + return _MTL_msg_MTL__Libraryp_newLibraryWithStitchedDescriptor_error__MTL__StitchedLibraryDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL::Library* MTL::Device::newDefaultLibrary(const NS::Bundle* bundle, NS::Error** error) +_MTL_INLINE void MTL::Device::newLibrary(MTL::StitchedLibraryDescriptor* descriptor, MTL::NewLibraryCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newDefaultLibraryWithBundle_error_), bundle, error); + _MTL_msg_v_newLibraryWithStitchedDescriptor_completionHandler__MTL__StitchedLibraryDescriptorp_MTL__NewLibraryCompletionHandler((const void*)this, nullptr, descriptor, completionHandler); } -_MTL_INLINE MTL::DepthStencilState* MTL::Device::newDepthStencilState(const MTL::DepthStencilDescriptor* descriptor) +_MTL_INLINE void MTL::Device::newLibrary(MTL::StitchedLibraryDescriptor* descriptor, const MTL::NewLibraryCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newDepthStencilStateWithDescriptor_), descriptor); + __block MTL::NewLibraryCompletionHandlerFunction blockFunction = completionHandler; + newLibrary(descriptor, ^(MTL::Library* x0, NS::Error* x1) { blockFunction(x0, x1); }); } -_MTL_INLINE MTL::DynamicLibrary* MTL::Device::newDynamicLibrary(const MTL::Library* library, NS::Error** error) +_MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newDynamicLibrary_error_), library, error); + return _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_error__MTL__RenderPipelineDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL::DynamicLibrary* MTL::Device::newDynamicLibrary(const NS::URL* url, NS::Error** error) +_MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newDynamicLibraryWithURL_error_), url, error); + return _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithDescriptor_options_reflection_error__MTL__RenderPipelineDescriptorp_MTL__PipelineOption_MTL__RenderPipelineReflectionpp_NS__Errorpp((const void*)this, nullptr, descriptor, options, reflection, error); } -_MTL_INLINE MTL::Event* MTL::Device::newEvent() +_MTL_INLINE void MTL::Device::newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, MTL::NewRenderPipelineStateCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newEvent)); + _MTL_msg_v_newRenderPipelineStateWithDescriptor_completionHandler__MTL__RenderPipelineDescriptorp_MTL__NewRenderPipelineStateCompletionHandler((const void*)this, nullptr, descriptor, completionHandler); } -_MTL_INLINE MTL::Fence* MTL::Device::newFence() +_MTL_INLINE void MTL::Device::newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, const MTL::NewRenderPipelineStateCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newFence)); + __block MTL::NewRenderPipelineStateCompletionHandlerFunction blockFunction = completionHandler; + newRenderPipelineState(descriptor, ^(MTL::RenderPipelineState* x0, NS::Error* x1) { blockFunction(x0, x1); }); } -_MTL_INLINE MTL::Heap* MTL::Device::newHeap(const MTL::HeapDescriptor* descriptor) +_MTL_INLINE void MTL::Device::newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newHeapWithDescriptor_), descriptor); + _MTL_msg_v_newRenderPipelineStateWithDescriptor_options_completionHandler__MTL__RenderPipelineDescriptorp_MTL__PipelineOption_MTL__NewRenderPipelineStateWithReflectionCompletionHandler((const void*)this, nullptr, descriptor, options, completionHandler); } -_MTL_INLINE MTL::IOCommandQueue* MTL::Device::newIOCommandQueue(const MTL::IOCommandQueueDescriptor* descriptor, NS::Error** error) +_MTL_INLINE void MTL::Device::newRenderPipelineState(MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOCommandQueueWithDescriptor_error_), descriptor, error); + __block MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction blockFunction = completionHandler; + newRenderPipelineState(descriptor, options, ^(MTL::RenderPipelineState* x0, void* x1, NS::Error* x2) { blockFunction(x0, x1, x2); }); } -_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOFileHandle(const NS::URL* url, NS::Error** error) +_MTL_INLINE MTL::ComputePipelineState* MTL::Device::newComputePipelineState(MTL::Function* computeFunction, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOFileHandleWithURL_error_), url, error); + return _MTL_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithFunction_error__MTL__Functionp_NS__Errorpp((const void*)this, nullptr, computeFunction, error); } -_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOFileHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error) +_MTL_INLINE MTL::ComputePipelineState* MTL::Device::newComputePipelineState(MTL::Function* computeFunction, MTL::PipelineOption options, MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOFileHandleWithURL_compressionMethod_error_), url, compressionMethod, error); + return _MTL_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithFunction_options_reflection_error__MTL__Functionp_MTL__PipelineOption_MTL__ComputePipelineReflectionpp_NS__Errorpp((const void*)this, nullptr, computeFunction, options, reflection, error); } -_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOHandle(const NS::URL* url, NS::Error** error) +_MTL_INLINE void MTL::Device::newComputePipelineState(MTL::Function* computeFunction, MTL::NewComputePipelineStateCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOHandleWithURL_error_), url, error); + _MTL_msg_v_newComputePipelineStateWithFunction_completionHandler__MTL__Functionp_MTL__NewComputePipelineStateCompletionHandler((const void*)this, nullptr, computeFunction, completionHandler); } -_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error) +_MTL_INLINE void MTL::Device::newComputePipelineState(MTL::Function* computeFunction, const MTL::NewComputePipelineStateCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOHandleWithURL_compressionMethod_error_), url, compressionMethod, error); + __block MTL::NewComputePipelineStateCompletionHandlerFunction blockFunction = completionHandler; + newComputePipelineState(computeFunction, ^(MTL::ComputePipelineState* x0, NS::Error* x1) { blockFunction(x0, x1); }); } -_MTL_INLINE MTL::IndirectCommandBuffer* MTL::Device::newIndirectCommandBuffer(const MTL::IndirectCommandBufferDescriptor* descriptor, NS::UInteger maxCount, MTL::ResourceOptions options) +_MTL_INLINE void MTL::Device::newComputePipelineState(MTL::Function* computeFunction, MTL::PipelineOption options, MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIndirectCommandBufferWithDescriptor_maxCommandCount_options_), descriptor, maxCount, options); + _MTL_msg_v_newComputePipelineStateWithFunction_options_completionHandler__MTL__Functionp_MTL__PipelineOption_MTL__NewComputePipelineStateWithReflectionCompletionHandler((const void*)this, nullptr, computeFunction, options, completionHandler); } -_MTL_INLINE MTL::Library* MTL::Device::newLibrary(const NS::String* filepath, NS::Error** error) +_MTL_INLINE void MTL::Device::newComputePipelineState(MTL::Function* computeFunction, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newLibraryWithFile_error_), filepath, error); + __block MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction blockFunction = completionHandler; + newComputePipelineState(computeFunction, options, ^(MTL::ComputePipelineState* x0, void* x1, NS::Error* x2) { blockFunction(x0, x1, x2); }); } -_MTL_INLINE MTL::Library* MTL::Device::newLibrary(const NS::URL* url, NS::Error** error) +_MTL_INLINE MTL::ComputePipelineState* MTL::Device::newComputePipelineState(MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newLibraryWithURL_error_), url, error); + return _MTL_msg_MTL__ComputePipelineStatep_newComputePipelineStateWithDescriptor_options_reflection_error__MTL__ComputePipelineDescriptorp_MTL__PipelineOption_MTL__ComputePipelineReflectionpp_NS__Errorpp((const void*)this, nullptr, descriptor, options, reflection, error); } -_MTL_INLINE MTL::Library* MTL::Device::newLibrary(const dispatch_data_t data, NS::Error** error) +_MTL_INLINE void MTL::Device::newComputePipelineState(MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newLibraryWithData_error_), data, error); + _MTL_msg_v_newComputePipelineStateWithDescriptor_options_completionHandler__MTL__ComputePipelineDescriptorp_MTL__PipelineOption_MTL__NewComputePipelineStateWithReflectionCompletionHandler((const void*)this, nullptr, descriptor, options, completionHandler); } -_MTL_INLINE MTL::Library* MTL::Device::newLibrary(const NS::String* source, const MTL::CompileOptions* options, NS::Error** error) +_MTL_INLINE void MTL::Device::newComputePipelineState(MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newLibraryWithSource_options_error_), source, options, error); + __block MTL::NewComputePipelineStateWithReflectionCompletionHandlerFunction blockFunction = completionHandler; + newComputePipelineState(descriptor, options, ^(MTL::ComputePipelineState* x0, void* x1, NS::Error* x2) { blockFunction(x0, x1, x2); }); } -_MTL_INLINE void MTL::Device::newLibrary(const NS::String* source, const MTL::CompileOptions* options, const MTL::NewLibraryCompletionHandler completionHandler) +_MTL_INLINE MTL::Fence* MTL::Device::newFence() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newLibraryWithSource_options_completionHandler_), source, options, completionHandler); + return _MTL_msg_MTL__Fencep_newFence((const void*)this, nullptr); } -_MTL_INLINE MTL::Library* MTL::Device::newLibrary(const MTL::StitchedLibraryDescriptor* descriptor, NS::Error** error) +_MTL_INLINE bool MTL::Device::supportsFeatureSet(MTL::FeatureSet featureSet) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newLibraryWithStitchedDescriptor_error_), descriptor, error); + return _MTL_msg_bool_supportsFeatureSet__MTL__FeatureSet((const void*)this, nullptr, featureSet); } -_MTL_INLINE void MTL::Device::newLibrary(const MTL::StitchedLibraryDescriptor* descriptor, const MTL::NewLibraryCompletionHandler completionHandler) +_MTL_INLINE bool MTL::Device::supportsFamily(MTL::GPUFamily gpuFamily) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newLibraryWithStitchedDescriptor_completionHandler_), descriptor, completionHandler); + return _MTL_msg_bool_supportsFamily__MTL__GPUFamily((const void*)this, nullptr, gpuFamily); } -_MTL_INLINE void MTL::Device::newLibrary(const NS::String* pSource, const MTL::CompileOptions* pOptions, const MTL::NewLibraryCompletionHandlerFunction& completionHandler) +_MTL_INLINE bool MTL::Device::supportsTextureSampleCount(NS::UInteger sampleCount) { - __block MTL::NewLibraryCompletionHandlerFunction blockCompletionHandler = completionHandler; - newLibrary(pSource, pOptions, ^(MTL::Library* pLibrary, NS::Error* pError) { blockCompletionHandler(pLibrary, pError); }); + return _MTL_msg_bool_supportsTextureSampleCount__NS__UInteger((const void*)this, nullptr, sampleCount); } -_MTL_INLINE void MTL::Device::newLibrary(const MTL::StitchedLibraryDescriptor* pDescriptor, const MTL::NewLibraryCompletionHandlerFunction& completionHandler) +_MTL_INLINE NS::UInteger MTL::Device::minimumLinearTextureAlignmentForPixelFormat(MTL::PixelFormat format) { - __block MTL::NewLibraryCompletionHandlerFunction blockCompletionHandler = completionHandler; - newLibrary(pDescriptor, ^(MTL::Library* pLibrary, NS::Error* pError) { blockCompletionHandler(pLibrary, pError); }); + return _MTL_msg_NS__UInteger_minimumLinearTextureAlignmentForPixelFormat__MTL__PixelFormat((const void*)this, nullptr, format); } -_MTL_INLINE MTL::LogState* MTL::Device::newLogState(const MTL::LogStateDescriptor* descriptor, NS::Error** error) +_MTL_INLINE NS::UInteger MTL::Device::minimumTextureBufferAlignmentForPixelFormat(MTL::PixelFormat format) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newLogStateWithDescriptor_error_), descriptor, error); + return _MTL_msg_NS__UInteger_minimumTextureBufferAlignmentForPixelFormat__MTL__PixelFormat((const void*)this, nullptr, format); } -_MTL_INLINE MTL4::CommandQueue* MTL::Device::newMTL4CommandQueue() +_MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newMTL4CommandQueue)); + return _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithTileDescriptor_options_reflection_error__MTL__TileRenderPipelineDescriptorp_MTL__PipelineOption_MTL__RenderPipelineReflectionpp_NS__Errorpp((const void*)this, nullptr, descriptor, options, reflection, error); } -_MTL_INLINE MTL4::CommandQueue* MTL::Device::newMTL4CommandQueue(const MTL4::CommandQueueDescriptor* descriptor, NS::Error** error) +_MTL_INLINE void MTL::Device::newRenderPipelineState(MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newMTL4CommandQueueWithDescriptor_error_), descriptor, error); + _MTL_msg_v_newRenderPipelineStateWithTileDescriptor_options_completionHandler__MTL__TileRenderPipelineDescriptorp_MTL__PipelineOption_MTL__NewRenderPipelineStateWithReflectionCompletionHandler((const void*)this, nullptr, descriptor, options, completionHandler); } -_MTL_INLINE MTL4::PipelineDataSetSerializer* MTL::Device::newPipelineDataSetSerializer(const MTL4::PipelineDataSetSerializerDescriptor* descriptor) +_MTL_INLINE void MTL::Device::newRenderPipelineState(MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newPipelineDataSetSerializerWithDescriptor_), descriptor); + __block MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction blockFunction = completionHandler; + newRenderPipelineState(descriptor, options, ^(MTL::RenderPipelineState* x0, void* x1, NS::Error* x2) { blockFunction(x0, x1, x2); }); } -_MTL_INLINE MTL::RasterizationRateMap* MTL::Device::newRasterizationRateMap(const MTL::RasterizationRateMapDescriptor* descriptor) +_MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRasterizationRateMapWithDescriptor_), descriptor); + return _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithMeshDescriptor_options_reflection_error__MTL__MeshRenderPipelineDescriptorp_MTL__PipelineOption_MTL__RenderPipelineReflectionpp_NS__Errorpp((const void*)this, nullptr, descriptor, options, reflection, error); } -_MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, NS::Error** error) +_MTL_INLINE void MTL::Device::newRenderPipelineState(MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_error_), descriptor, error); + _MTL_msg_v_newRenderPipelineStateWithMeshDescriptor_options_completionHandler__MTL__MeshRenderPipelineDescriptorp_MTL__PipelineOption_MTL__NewRenderPipelineStateWithReflectionCompletionHandler((const void*)this, nullptr, descriptor, options, completionHandler); } -_MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error) +_MTL_INLINE void MTL::Device::newRenderPipelineState(MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_options_reflection_error_), descriptor, options, reflection, error); + __block MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction blockFunction = completionHandler; + newRenderPipelineState(descriptor, options, ^(MTL::RenderPipelineState* x0, void* x1, NS::Error* x2) { blockFunction(x0, x1, x2); }); } -_MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, const MTL::NewRenderPipelineStateCompletionHandler completionHandler) +_MTL_INLINE void MTL::Device::getDefaultSamplePositions(MTL::SamplePosition* positions, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_completionHandler_), descriptor, completionHandler); + _MTL_msg_v_getDefaultSamplePositions_count__MTL__SamplePositionp_NS__UInteger((const void*)this, nullptr, positions, count); } -_MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler) +_MTL_INLINE MTL::ArgumentEncoder* MTL::Device::newArgumentEncoder(NS::Array* arguments) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_options_completionHandler_), descriptor, options, completionHandler); + return _MTL_msg_MTL__ArgumentEncoderp_newArgumentEncoderWithArguments__NS__Arrayp((const void*)this, nullptr, arguments); } -_MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(const MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error) +_MTL_INLINE bool MTL::Device::supportsRasterizationRateMap(NS::UInteger layerCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithTileDescriptor_options_reflection_error_), descriptor, options, reflection, error); + return _MTL_msg_bool_supportsRasterizationRateMapWithLayerCount__NS__UInteger((const void*)this, nullptr, layerCount); } -_MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler) +_MTL_INLINE MTL::RasterizationRateMap* MTL::Device::newRasterizationRateMap(MTL::RasterizationRateMapDescriptor* descriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithTileDescriptor_options_completionHandler_), descriptor, options, completionHandler); + return _MTL_msg_MTL__RasterizationRateMapp_newRasterizationRateMapWithDescriptor__MTL__RasterizationRateMapDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(const MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error) +_MTL_INLINE MTL::IndirectCommandBuffer* MTL::Device::newIndirectCommandBuffer(MTL::IndirectCommandBufferDescriptor* descriptor, NS::UInteger maxCount, MTL::ResourceOptions options) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithMeshDescriptor_options_reflection_error_), descriptor, options, reflection, error); + return _MTL_msg_MTL__IndirectCommandBufferp_newIndirectCommandBufferWithDescriptor_maxCommandCount_options__MTL__IndirectCommandBufferDescriptorp_NS__UInteger_MTL__ResourceOptions((const void*)this, nullptr, descriptor, maxCount, options); } -_MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler) +_MTL_INLINE MTL::Event* MTL::Device::newEvent() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithMeshDescriptor_options_completionHandler_), descriptor, options, completionHandler); + return _MTL_msg_MTL__Eventp_newEvent((const void*)this, nullptr); } -_MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::RenderPipelineDescriptor* pDescriptor, const MTL::NewRenderPipelineStateCompletionHandlerFunction& completionHandler) +_MTL_INLINE MTL::SharedEvent* MTL::Device::newSharedEvent() { - __block MTL::NewRenderPipelineStateCompletionHandlerFunction blockCompletionHandler = completionHandler; - newRenderPipelineState(pDescriptor, ^(MTL::RenderPipelineState* pPipelineState, NS::Error* pError) { blockCompletionHandler(pPipelineState, pError); }); + return _MTL_msg_MTL__SharedEventp_newSharedEvent((const void*)this, nullptr); } -_MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::RenderPipelineDescriptor* pDescriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler) +_MTL_INLINE MTL::SharedEvent* MTL::Device::newSharedEvent(MTL::SharedEventHandle* sharedEventHandle) { - __block MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction blockCompletionHandler = completionHandler; - newRenderPipelineState(pDescriptor, options, ^(MTL::RenderPipelineState* pPipelineState, MTL::RenderPipelineReflection* pReflection, NS::Error* pError) { blockCompletionHandler(pPipelineState, pReflection, pError); }); + return _MTL_msg_MTL__SharedEventp_newSharedEventWithHandle__MTL__SharedEventHandlep((const void*)this, nullptr, sharedEventHandle); } -_MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::TileRenderPipelineDescriptor* pDescriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler) +_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOHandle(NS::URL* url, NS::Error** error) { - __block MTL::NewRenderPipelineStateWithReflectionCompletionHandlerFunction blockCompletionHandler = completionHandler; - newRenderPipelineState(pDescriptor, options, ^(MTL::RenderPipelineState* pPipelineState, MTL::RenderPipelineReflection* pReflection, NS::Error* pError) { blockCompletionHandler(pPipelineState, pReflection, pError); }); + return _MTL_msg_MTL__IOFileHandlep_newIOHandleWithURL_error__NS__URLp_NS__Errorpp((const void*)this, nullptr, url, error); } -_MTL_INLINE MTL::ResidencySet* MTL::Device::newResidencySet(const MTL::ResidencySetDescriptor* desc, NS::Error** error) +_MTL_INLINE MTL::IOCommandQueue* MTL::Device::newIOCommandQueue(MTL::IOCommandQueueDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newResidencySetWithDescriptor_error_), desc, error); + return _MTL_msg_MTL__IOCommandQueuep_newIOCommandQueueWithDescriptor_error__MTL__IOCommandQueueDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL::SamplerState* MTL::Device::newSamplerState(const MTL::SamplerDescriptor* descriptor) +_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOHandle(NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newSamplerStateWithDescriptor_), descriptor); + return _MTL_msg_MTL__IOFileHandlep_newIOHandleWithURL_compressionMethod_error__NS__URLp_MTL__IOCompressionMethod_NS__Errorpp((const void*)this, nullptr, url, compressionMethod, error); } -_MTL_INLINE MTL::SharedEvent* MTL::Device::newSharedEvent() +_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOFileHandle(NS::URL* url, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newSharedEvent)); + return _MTL_msg_MTL__IOFileHandlep_newIOFileHandleWithURL_error__NS__URLp_NS__Errorpp((const void*)this, nullptr, url, error); } -_MTL_INLINE MTL::SharedEvent* MTL::Device::newSharedEvent(const MTL::SharedEventHandle* sharedEventHandle) +_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOFileHandle(NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newSharedEventWithHandle_), sharedEventHandle); + return _MTL_msg_MTL__IOFileHandlep_newIOFileHandleWithURL_compressionMethod_error__NS__URLp_MTL__IOCompressionMethod_NS__Errorpp((const void*)this, nullptr, url, compressionMethod, error); } -_MTL_INLINE MTL::Texture* MTL::Device::newSharedTexture(const MTL::TextureDescriptor* descriptor) +_MTL_INLINE MTL::Size MTL::Device::sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newSharedTextureWithDescriptor_), descriptor); + return _MTL_msg_MTL__Size_sparseTileSizeWithTextureType_pixelFormat_sampleCount__MTL__TextureType_MTL__PixelFormat_NS__UInteger((const void*)this, nullptr, textureType, pixelFormat, sampleCount); } -_MTL_INLINE MTL::Texture* MTL::Device::newSharedTexture(const MTL::SharedTextureHandle* sharedHandle) +_MTL_INLINE void MTL::Device::convertSparsePixelRegions(const MTL::Region * pixelRegions, MTL::Region* tileRegions, MTL::Size tileSize, MTL::SparseTextureRegionAlignmentMode mode, NS::UInteger numRegions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newSharedTextureWithHandle_), sharedHandle); + _MTL_msg_v_convertSparsePixelRegions_toTileRegions_withTileSize_alignmentMode_numRegions__constMTL__Regionp_MTL__Regionp_MTL__Size_MTL__SparseTextureRegionAlignmentMode_NS__UInteger((const void*)this, nullptr, pixelRegions, tileRegions, tileSize, mode, numRegions); } -_MTL_INLINE MTL::Tensor* MTL::Device::newTensor(const MTL::TensorDescriptor* descriptor, NS::Error** error) +_MTL_INLINE void MTL::Device::convertSparseTileRegions(const MTL::Region * tileRegions, MTL::Region* pixelRegions, MTL::Size tileSize, NS::UInteger numRegions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTensorWithDescriptor_error_), descriptor, error); + _MTL_msg_v_convertSparseTileRegions_toPixelRegions_withTileSize_numRegions__constMTL__Regionp_MTL__Regionp_MTL__Size_NS__UInteger((const void*)this, nullptr, tileRegions, pixelRegions, tileSize, numRegions); } -_MTL_INLINE MTL::Texture* MTL::Device::newTexture(const MTL::TextureDescriptor* descriptor) +_MTL_INLINE NS::UInteger MTL::Device::sparseTileSizeInBytes(MTL::SparsePageSize sparsePageSize) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_), descriptor); + return _MTL_msg_NS__UInteger_sparseTileSizeInBytesForSparsePageSize__MTL__SparsePageSize((const void*)this, nullptr, sparsePageSize); } -_MTL_INLINE MTL::Texture* MTL::Device::newTexture(const MTL::TextureDescriptor* descriptor, const IOSurfaceRef iosurface, NS::UInteger plane) +_MTL_INLINE MTL::Size MTL::Device::sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount, MTL::SparsePageSize sparsePageSize) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_iosurface_plane_), descriptor, iosurface, plane); + return _MTL_msg_MTL__Size_sparseTileSizeWithTextureType_pixelFormat_sampleCount_sparsePageSize__MTL__TextureType_MTL__PixelFormat_NS__UInteger_MTL__SparsePageSize((const void*)this, nullptr, textureType, pixelFormat, sampleCount, sparsePageSize); } -_MTL_INLINE MTL::TextureViewPool* MTL::Device::newTextureViewPool(const MTL::ResourceViewPoolDescriptor* descriptor, NS::Error** error) +_MTL_INLINE MTL::CounterSampleBuffer* MTL::Device::newCounterSampleBuffer(MTL::CounterSampleBufferDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureViewPoolWithDescriptor_error_), descriptor, error); + return _MTL_msg_MTL__CounterSampleBufferp_newCounterSampleBufferWithDescriptor_error__MTL__CounterSampleBufferDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE uint32_t MTL::Device::peerCount() const +_MTL_INLINE void MTL::Device::sampleTimestamps(MTL::Timestamp* cpuTimestamp, MTL::Timestamp* gpuTimestamp) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(peerCount)); + _MTL_msg_v_sampleTimestamps_gpuTimestamp__uint64_tp_uint64_tp((const void*)this, nullptr, cpuTimestamp, gpuTimestamp); } -_MTL_INLINE uint64_t MTL::Device::peerGroupID() const +_MTL_INLINE MTL::ArgumentEncoder* MTL::Device::newArgumentEncoder(MTL::BufferBinding* bufferBinding) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(peerGroupID)); + return _MTL_msg_MTL__ArgumentEncoderp_newArgumentEncoderWithBufferBinding__MTL__BufferBindingp((const void*)this, nullptr, bufferBinding); } -_MTL_INLINE uint32_t MTL::Device::peerIndex() const +_MTL_INLINE bool MTL::Device::supportsCounterSampling(MTL::CounterSamplingPoint samplingPoint) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(peerIndex)); + return _MTL_msg_bool_supportsCounterSampling__MTL__CounterSamplingPoint((const void*)this, nullptr, samplingPoint); } -_MTL_INLINE bool MTL::Device::programmableSamplePositionsSupported() const +_MTL_INLINE bool MTL::Device::supportsVertexAmplificationCount(NS::UInteger count) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(areProgrammableSamplePositionsSupported)); + return _MTL_msg_bool_supportsVertexAmplificationCount__NS__UInteger((const void*)this, nullptr, count); } -_MTL_INLINE uint64_t MTL::Device::queryTimestampFrequency() +_MTL_INLINE MTL::DynamicLibrary* MTL::Device::newDynamicLibrary(MTL::Library* library, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(queryTimestampFrequency)); + return _MTL_msg_MTL__DynamicLibraryp_newDynamicLibrary_error__MTL__Libraryp_NS__Errorpp((const void*)this, nullptr, library, error); } -_MTL_INLINE bool MTL::Device::rasterOrderGroupsSupported() const +_MTL_INLINE MTL::DynamicLibrary* MTL::Device::newDynamicLibrary(NS::URL* url, NS::Error** error) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(areRasterOrderGroupsSupported)); + return _MTL_msg_MTL__DynamicLibraryp_newDynamicLibraryWithURL_error__NS__URLp_NS__Errorpp((const void*)this, nullptr, url, error); } -_MTL_INLINE MTL::ReadWriteTextureTier MTL::Device::readWriteTextureSupport() const +_MTL_INLINE MTL::BinaryArchive* MTL::Device::newBinaryArchive(MTL::BinaryArchiveDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(readWriteTextureSupport)); + return _MTL_msg_MTL__BinaryArchivep_newBinaryArchiveWithDescriptor_error__MTL__BinaryArchiveDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE uint64_t MTL::Device::recommendedMaxWorkingSetSize() const +_MTL_INLINE MTL::AccelerationStructureSizes MTL::Device::accelerationStructureSizes(MTL::AccelerationStructureDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(recommendedMaxWorkingSetSize)); + return _MTL_msg_MTL__AccelerationStructureSizes_accelerationStructureSizesWithDescriptor__MTL__AccelerationStructureDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE uint64_t MTL::Device::registryID() const +_MTL_INLINE MTL::AccelerationStructure* MTL::Device::newAccelerationStructure(NS::UInteger size) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(registryID)); + return _MTL_msg_MTL__AccelerationStructurep_newAccelerationStructureWithSize__NS__UInteger((const void*)this, nullptr, size); } -_MTL_INLINE bool MTL::Device::removable() const +_MTL_INLINE MTL::AccelerationStructure* MTL::Device::newAccelerationStructure(MTL::AccelerationStructureDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isRemovable)); + return _MTL_msg_MTL__AccelerationStructurep_newAccelerationStructureWithDescriptor__MTL__AccelerationStructureDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE void MTL::Device::sampleTimestamps(MTL::Timestamp* cpuTimestamp, MTL::Timestamp* gpuTimestamp) +_MTL_INLINE MTL::SizeAndAlign MTL::Device::heapAccelerationStructureSizeAndAlign(NS::UInteger size) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleTimestamps_gpuTimestamp_), cpuTimestamp, gpuTimestamp); + return _MTL_msg_MTL__SizeAndAlign_heapAccelerationStructureSizeAndAlignWithSize__NS__UInteger((const void*)this, nullptr, size); } -_MTL_INLINE void MTL::Device::setShouldMaximizeConcurrentCompilation(bool shouldMaximizeConcurrentCompilation) +_MTL_INLINE MTL::SizeAndAlign MTL::Device::heapAccelerationStructureSizeAndAlign(MTL::AccelerationStructureDescriptor* descriptor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setShouldMaximizeConcurrentCompilation_), shouldMaximizeConcurrentCompilation); + return _MTL_msg_MTL__SizeAndAlign_heapAccelerationStructureSizeAndAlignWithDescriptor__MTL__AccelerationStructureDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE bool MTL::Device::shouldMaximizeConcurrentCompilation() const +_MTL_INLINE MTL::ResidencySet* MTL::Device::newResidencySet(MTL::ResidencySetDescriptor* desc, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(shouldMaximizeConcurrentCompilation)); + return _MTL_msg_MTL__ResidencySetp_newResidencySetWithDescriptor_error__MTL__ResidencySetDescriptorp_NS__Errorpp((const void*)this, nullptr, desc, error); } -_MTL_INLINE NS::UInteger MTL::Device::sizeOfCounterHeapEntry(MTL4::CounterHeapType type) +_MTL_INLINE MTL::SizeAndAlign MTL::Device::tensorSizeAndAlign(MTL::TensorDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sizeOfCounterHeapEntry_), type); + return _MTL_msg_MTL__SizeAndAlign_tensorSizeAndAlignWithDescriptor__MTL__TensorDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE MTL::Size MTL::Device::sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount) +_MTL_INLINE MTL::Tensor* MTL::Device::newTensor(MTL::TensorDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sparseTileSizeWithTextureType_pixelFormat_sampleCount_), textureType, pixelFormat, sampleCount); + return _MTL_msg_MTL__Tensorp_newTensorWithDescriptor_error__MTL__TensorDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL::Size MTL::Device::sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount, MTL::SparsePageSize sparsePageSize) +_MTL_INLINE MTL::FunctionHandle* MTL::Device::functionHandle(MTL::Function* function) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sparseTileSizeWithTextureType_pixelFormat_sampleCount_sparsePageSize_), textureType, pixelFormat, sampleCount, sparsePageSize); + return _MTL_msg_MTL__FunctionHandlep_functionHandleWithFunction__MTL__Functionp((const void*)this, nullptr, function); } -_MTL_INLINE NS::UInteger MTL::Device::sparseTileSizeInBytes() const +_MTL_INLINE MTL4::CommandAllocator* MTL::Device::newCommandAllocator() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sparseTileSizeInBytes)); + return _MTL_msg_MTL4__CommandAllocatorp_newCommandAllocator((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Device::sparseTileSizeInBytes(MTL::SparsePageSize sparsePageSize) +_MTL_INLINE MTL4::CommandAllocator* MTL::Device::newCommandAllocator(MTL4::CommandAllocatorDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sparseTileSizeInBytesForSparsePageSize_), sparsePageSize); + return _MTL_msg_MTL4__CommandAllocatorp_newCommandAllocatorWithDescriptor_error__MTL4__CommandAllocatorDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE bool MTL::Device::supports32BitFloatFiltering() const +_MTL_INLINE MTL4::CommandQueue* MTL::Device::newMTL4CommandQueue() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supports32BitFloatFiltering)); + return _MTL_msg_MTL4__CommandQueuep_newMTL4CommandQueue((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::supports32BitMSAA() const +_MTL_INLINE MTL4::CommandQueue* MTL::Device::newMTL4CommandQueue(MTL4::CommandQueueDescriptor* descriptor, NS::Error** error) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supports32BitMSAA)); + return _MTL_msg_MTL4__CommandQueuep_newMTL4CommandQueueWithDescriptor_error__MTL4__CommandQueueDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE bool MTL::Device::supportsBCTextureCompression() const +_MTL_INLINE MTL4::CommandBuffer* MTL::Device::newCommandBuffer() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsBCTextureCompression)); + return _MTL_msg_MTL4__CommandBufferp_newCommandBuffer((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::supportsCounterSampling(MTL::CounterSamplingPoint samplingPoint) +_MTL_INLINE MTL4::ArgumentTable* MTL::Device::newArgumentTable(MTL4::ArgumentTableDescriptor* descriptor, NS::Error** error) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsCounterSampling_), samplingPoint); + return _MTL_msg_MTL4__ArgumentTablep_newArgumentTableWithDescriptor_error__MTL4__ArgumentTableDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE bool MTL::Device::supportsDynamicLibraries() const +_MTL_INLINE MTL::TextureViewPool* MTL::Device::newTextureViewPool(MTL::ResourceViewPoolDescriptor* descriptor, NS::Error** error) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsDynamicLibraries)); + return _MTL_msg_MTL__TextureViewPoolp_newTextureViewPoolWithDescriptor_error__MTL__ResourceViewPoolDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE bool MTL::Device::supportsFamily(MTL::GPUFamily gpuFamily) +_MTL_INLINE MTL4::Compiler* MTL::Device::newCompiler(MTL4::CompilerDescriptor* descriptor, NS::Error** error) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsFamily_), gpuFamily); + return _MTL_msg_MTL4__Compilerp_newCompilerWithDescriptor_error__MTL4__CompilerDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE bool MTL::Device::supportsFeatureSet(MTL::FeatureSet featureSet) +_MTL_INLINE MTL4::Archive* MTL::Device::newArchive(NS::URL* url, NS::Error** error) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsFeatureSet_), featureSet); + return _MTL_msg_MTL4__Archivep_newArchiveWithURL_error__NS__URLp_NS__Errorpp((const void*)this, nullptr, url, error); } -_MTL_INLINE bool MTL::Device::supportsFunctionPointers() const +_MTL_INLINE MTL4::PipelineDataSetSerializer* MTL::Device::newPipelineDataSetSerializer(MTL4::PipelineDataSetSerializerDescriptor* descriptor) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsFunctionPointers)); + return _MTL_msg_MTL4__PipelineDataSetSerializerp_newPipelineDataSetSerializerWithDescriptor__MTL4__PipelineDataSetSerializerDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE bool MTL::Device::supportsFunctionPointersFromRender() const +_MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(NS::UInteger length, MTL::ResourceOptions options, MTL::SparsePageSize placementSparsePageSize) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsFunctionPointersFromRender)); + return _MTL_msg_MTL__Bufferp_newBufferWithLength_options_placementSparsePageSize__NS__UInteger_MTL__ResourceOptions_MTL__SparsePageSize((const void*)this, nullptr, length, options, placementSparsePageSize); } -_MTL_INLINE bool MTL::Device::supportsPrimitiveMotionBlur() const +_MTL_INLINE MTL4::CounterHeap* MTL::Device::newCounterHeap(MTL4::CounterHeapDescriptor* descriptor, NS::Error** error) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsPrimitiveMotionBlur)); + return _MTL_msg_MTL4__CounterHeapp_newCounterHeapWithDescriptor_error__MTL4__CounterHeapDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE bool MTL::Device::supportsPullModelInterpolation() const +_MTL_INLINE NS::UInteger MTL::Device::sizeOfCounterHeapEntry(MTL4::CounterHeapType type) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsPullModelInterpolation)); + return _MTL_msg_NS__UInteger_sizeOfCounterHeapEntry__MTL4__CounterHeapType((const void*)this, nullptr, type); } -_MTL_INLINE bool MTL::Device::supportsQueryTextureLOD() const +_MTL_INLINE uint64_t MTL::Device::queryTimestampFrequency() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsQueryTextureLOD)); + return _MTL_msg_uint64_t_queryTimestampFrequency((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::supportsRasterizationRateMap(NS::UInteger layerCount) +_MTL_INLINE MTL::FunctionHandle* MTL::Device::functionHandle(MTL4::BinaryFunction* function) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsRasterizationRateMapWithLayerCount_), layerCount); + return _MTL_msg_MTL__FunctionHandlep_functionHandleWithBinaryFunction__MTL4__BinaryFunctionp((const void*)this, nullptr, function); } -_MTL_INLINE bool MTL::Device::supportsRaytracing() const +_MTL_INLINE bool MTL::Device::isLowPower() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsRaytracing)); + return _MTL_msg_bool_isLowPower((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::supportsRaytracingFromRender() const +_MTL_INLINE bool MTL::Device::isHeadless() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsRaytracingFromRender)); + return _MTL_msg_bool_isHeadless((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::supportsRenderDynamicLibraries() const +_MTL_INLINE bool MTL::Device::isRemovable() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsRenderDynamicLibraries)); + return _MTL_msg_bool_isRemovable((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::supportsShaderBarycentricCoordinates() const +_MTL_INLINE bool MTL::Device::isDepth24Stencil8PixelFormatSupported() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsShaderBarycentricCoordinates)); + return _MTL_msg_bool_isDepth24Stencil8PixelFormatSupported((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::supportsTextureSampleCount(NS::UInteger sampleCount) +_MTL_INLINE bool MTL::Device::areRasterOrderGroupsSupported() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsTextureSampleCount_), sampleCount); + return _MTL_msg_bool_areRasterOrderGroupsSupported((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Device::supportsVertexAmplificationCount(NS::UInteger count) +_MTL_INLINE bool MTL::Device::areBarycentricCoordsSupported() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportsVertexAmplificationCount_), count); + return _MTL_msg_bool_areBarycentricCoordsSupported((const void*)this, nullptr); } -_MTL_INLINE MTL::SizeAndAlign MTL::Device::tensorSizeAndAlign(const MTL::TensorDescriptor* descriptor) +_MTL_INLINE bool MTL::Device::areProgrammableSamplePositionsSupported() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tensorSizeAndAlignWithDescriptor_), descriptor); + return _MTL_msg_bool_areProgrammableSamplePositionsSupported((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLDeviceCertification.hpp b/thirdparty/metal-cpp/Metal/MTLDeviceCertification.hpp new file mode 100644 index 000000000000..668cd963f3c3 --- /dev/null +++ b/thirdparty/metal-cpp/Metal/MTLDeviceCertification.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include "MTLDefines.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL +{ + +} // namespace MTL diff --git a/thirdparty/metal-cpp/Metal/MTLDeviceExtras.hpp b/thirdparty/metal-cpp/Metal/MTLDeviceExtras.hpp new file mode 100644 index 000000000000..df47468cea44 --- /dev/null +++ b/thirdparty/metal-cpp/Metal/MTLDeviceExtras.hpp @@ -0,0 +1,16 @@ +#pragma once + +// Hand-written supplement to the generated `Metal/` headers. Surfaces +// `MTL::CreateSystemDefaultDevice()`, whose definition lives in +// `thirdparty/metal-cpp/metal_cpp.cpp` (kept out of any `.hpp` so that +// `.mm` translation units that also import Apple's `` +// don't see two declarations of `MTLCreateSystemDefaultDevice` — +// Apple's carries an ARC-relevant `NS_RETURNS_RETAINED` attribute that +// would conflict with a plain `extern "C"` redeclaration here). + +namespace MTL +{ +class Device; + +Device* CreateSystemDefaultDevice(); +} // namespace MTL diff --git a/thirdparty/metal-cpp/Metal/MTLDrawable.hpp b/thirdparty/metal-cpp/Metal/MTLDrawable.hpp index fad4feda980d..f18889215a12 100644 --- a/thirdparty/metal-cpp/Metal/MTLDrawable.hpp +++ b/thirdparty/metal-cpp/Metal/MTLDrawable.hpp @@ -1,90 +1,67 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLDrawable.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include - -#include -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" namespace MTL { -class Drawable; - -using DrawablePresentedHandler = void (^)(MTL::Drawable*); -using DrawablePresentedHandlerFunction = std::function; class Drawable : public NS::Referencing { public: - void addPresentedHandler(const MTL::DrawablePresentedHandler block); - void addPresentedHandler(const MTL::DrawablePresentedHandlerFunction& function); - + void addPresentedHandler(MTL::DrawablePresentedHandler block); + void addPresentedHandler(const MTL::DrawablePresentedHandlerFunction& block); NS::UInteger drawableID() const; - void present(); + void present(CFTimeInterval presentationTime); void presentAfterMinimumDuration(CFTimeInterval duration); - - void presentAtTime(CFTimeInterval presentationTime); - CFTimeInterval presentedTime() const; + }; -} -_MTL_INLINE void MTL::Drawable::addPresentedHandler(const MTL::DrawablePresentedHandler block) -{ - Object::sendMessage(this, _MTL_PRIVATE_SEL(addPresentedHandler_), block); -} +} // namespace MTL + +// --- Class symbols + inline implementations --- -_MTL_INLINE void MTL::Drawable::addPresentedHandler(const MTL::DrawablePresentedHandlerFunction& function) +extern "C" void *OBJC_CLASS_$_MTLDrawable; + +_MTL_INLINE CFTimeInterval MTL::Drawable::presentedTime() const { - __block DrawablePresentedHandlerFunction blockFunction = function; - addPresentedHandler(^(Drawable* pDrawable) { blockFunction(pDrawable); }); + return _MTL_msg_CFTimeInterval_presentedTime((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::Drawable::drawableID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(drawableID)); + return _MTL_msg_NS__UInteger_drawableID((const void*)this, nullptr); } _MTL_INLINE void MTL::Drawable::present() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(present)); + _MTL_msg_v_present((const void*)this, nullptr); +} + +_MTL_INLINE void MTL::Drawable::present(CFTimeInterval presentationTime) +{ + _MTL_msg_v_presentAtTime__CFTimeInterval((const void*)this, nullptr, presentationTime); } _MTL_INLINE void MTL::Drawable::presentAfterMinimumDuration(CFTimeInterval duration) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(presentAfterMinimumDuration_), duration); + _MTL_msg_v_presentAfterMinimumDuration__CFTimeInterval((const void*)this, nullptr, duration); } -_MTL_INLINE void MTL::Drawable::presentAtTime(CFTimeInterval presentationTime) +_MTL_INLINE void MTL::Drawable::addPresentedHandler(MTL::DrawablePresentedHandler block) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(presentAtTime_), presentationTime); + _MTL_msg_v_addPresentedHandler__MTL__DrawablePresentedHandler((const void*)this, nullptr, block); } -_MTL_INLINE CFTimeInterval MTL::Drawable::presentedTime() const +_MTL_INLINE void MTL::Drawable::addPresentedHandler(const MTL::DrawablePresentedHandlerFunction& block) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(presentedTime)); + __block MTL::DrawablePresentedHandlerFunction blockFunction = block; + addPresentedHandler(^(MTL::Drawable* x0) { blockFunction(x0); }); } diff --git a/thirdparty/metal-cpp/Metal/MTLDynamicLibrary.hpp b/thirdparty/metal-cpp/Metal/MTLDynamicLibrary.hpp index 0726acc1b8c0..ab40aeab4bc2 100644 --- a/thirdparty/metal-cpp/Metal/MTLDynamicLibrary.hpp +++ b/thirdparty/metal-cpp/Metal/MTLDynamicLibrary.hpp @@ -1,33 +1,26 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLDynamicLibrary.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Device; +} +namespace NS { + class Error; + class String; + class URL; +} namespace MTL { -class Device; + +extern NS::ErrorDomain const DynamicLibraryDomain __asm__("_MTLDynamicLibraryDomain"); _MTL_ENUM(NS::UInteger, DynamicLibraryError) { DynamicLibraryErrorNone = 0, DynamicLibraryErrorInvalidFile = 1, @@ -37,42 +30,45 @@ _MTL_ENUM(NS::UInteger, DynamicLibraryError) { DynamicLibraryErrorUnsupported = 5, }; + class DynamicLibrary : public NS::Referencing { public: - Device* device() const; + MTL::Device* device() const; + NS::String* installName() const; + NS::String* label() const; + bool serializeToURL(NS::URL* url, NS::Error** error); + void setLabel(NS::String* label); - NS::String* installName() const; +}; - NS::String* label() const; +} // namespace MTL - bool serializeToURL(const NS::URL* url, NS::Error** error); +// --- Class symbols + inline implementations --- - void setLabel(const NS::String* label); -}; +extern "C" void *OBJC_CLASS_$_MTLDynamicLibrary; -} -_MTL_INLINE MTL::Device* MTL::DynamicLibrary::device() const +_MTL_INLINE NS::String* MTL::DynamicLibrary::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::DynamicLibrary::installName() const +_MTL_INLINE void MTL::DynamicLibrary::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(installName)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE NS::String* MTL::DynamicLibrary::label() const +_MTL_INLINE MTL::Device* MTL::DynamicLibrary::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE bool MTL::DynamicLibrary::serializeToURL(const NS::URL* url, NS::Error** error) +_MTL_INLINE NS::String* MTL::DynamicLibrary::installName() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(serializeToURL_error_), url, error); + return _MTL_msg_NS__Stringp_installName((const void*)this, nullptr); } -_MTL_INLINE void MTL::DynamicLibrary::setLabel(const NS::String* label) +_MTL_INLINE bool MTL::DynamicLibrary::serializeToURL(NS::URL* url, NS::Error** error) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_bool_serializeToURL_error__NS__URLp_NS__Errorpp((const void*)this, nullptr, url, error); } diff --git a/thirdparty/metal-cpp/Metal/MTLEvent.hpp b/thirdparty/metal-cpp/Metal/MTLEvent.hpp index d06b9693427b..397757b6dcd7 100644 --- a/thirdparty/metal-cpp/Metal/MTLEvent.hpp +++ b/thirdparty/metal-cpp/Metal/MTLEvent.hpp @@ -1,170 +1,163 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLEvent.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" -#include -#include +namespace MTL { + class Device; +} +namespace NS { + class String; +} namespace MTL { -class Device; + +class Event; +class SharedEventListener; class SharedEvent; class SharedEventHandle; -class SharedEventListener; - -using SharedEventNotificationBlock = void (^)(SharedEvent* pEvent, std::uint64_t value); -using SharedEventNotificationFunction = std::function; class Event : public NS::Referencing { public: - Device* device() const; + MTL::Device* device() const; + NS::String* label() const; + void setLabel(NS::String* label); - NS::String* label() const; - void setLabel(const NS::String* label); }; + class SharedEventListener : public NS::Referencing { public: static SharedEventListener* alloc(); + SharedEventListener* init() const; - dispatch_queue_t dispatchQueue() const; + static MTL::SharedEventListener* sharedListener(); - SharedEventListener* init(); - SharedEventListener* init(const dispatch_queue_t dispatchQueue); + dispatch_queue_t dispatchQueue() const; + MTL::SharedEventListener* init(dispatch_queue_t dispatchQueue); - static SharedEventListener* sharedListener(); }; -class SharedEvent : public NS::Referencing + +class SharedEvent : public NS::Referencing { public: - SharedEventHandle* newSharedEventHandle(); - - void notifyListener(const MTL::SharedEventListener* listener, uint64_t value, const MTL::SharedEventNotificationBlock block); - void notifyListener(const MTL::SharedEventListener* listener, uint64_t value, const MTL::SharedEventNotificationFunction& function); + MTL::SharedEventHandle* newSharedEventHandle(); + void notifyListener(MTL::SharedEventListener* listener, uint64_t value, MTL::SharedEventNotificationBlock block); + void notifyListener(MTL::SharedEventListener* listener, uint64_t value, const MTL::SharedEventNotificationFunction& block); + void setSignaledValue(uint64_t signaledValue); + uint64_t signaledValue() const; + bool waitUntilSignaledValue(uint64_t value, uint64_t milliseconds); - void setSignaledValue(uint64_t signaledValue); - uint64_t signaledValue() const; - bool waitUntilSignaledValue(uint64_t value, uint64_t milliseconds); }; + class SharedEventHandle : public NS::SecureCoding { public: static SharedEventHandle* alloc(); + SharedEventHandle* init() const; - SharedEventHandle* init(); + NS::String* label() const; - NS::String* label() const; }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLEvent; +extern "C" void *OBJC_CLASS_$_MTLSharedEventListener; +extern "C" void *OBJC_CLASS_$_MTLSharedEvent; +extern "C" void *OBJC_CLASS_$_MTLSharedEventHandle; + _MTL_INLINE MTL::Device* MTL::Event::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } _MTL_INLINE NS::String* MTL::Event::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::Event::setLabel(const NS::String* label) +_MTL_INLINE void MTL::Event::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } _MTL_INLINE MTL::SharedEventListener* MTL::SharedEventListener::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLSharedEventListener)); + return _MTL_msg_MTL__SharedEventListenerp_alloc((const void*)&OBJC_CLASS_$_MTLSharedEventListener, nullptr); } -_MTL_INLINE dispatch_queue_t MTL::SharedEventListener::dispatchQueue() const +_MTL_INLINE MTL::SharedEventListener* MTL::SharedEventListener::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchQueue)); + return _MTL_msg_MTL__SharedEventListenerp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::SharedEventListener* MTL::SharedEventListener::init() +_MTL_INLINE MTL::SharedEventListener* MTL::SharedEventListener::sharedListener() { - return NS::Object::init(); + return _MTL_msg_MTL__SharedEventListenerp_sharedListener((const void*)&OBJC_CLASS_$_MTLSharedEventListener, nullptr); } -_MTL_INLINE MTL::SharedEventListener* MTL::SharedEventListener::init(const dispatch_queue_t dispatchQueue) +_MTL_INLINE dispatch_queue_t MTL::SharedEventListener::dispatchQueue() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(initWithDispatchQueue_), dispatchQueue); + return _MTL_msg_dispatch_queue_t_dispatchQueue((const void*)this, nullptr); } -_MTL_INLINE MTL::SharedEventListener* MTL::SharedEventListener::sharedListener() +_MTL_INLINE MTL::SharedEventListener* MTL::SharedEventListener::init(dispatch_queue_t dispatchQueue) { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLSharedEventListener), _MTL_PRIVATE_SEL(sharedListener)); + return _MTL_msg_MTL__SharedEventListenerp_initWithDispatchQueue__dispatch_queue_t((const void*)this, nullptr, dispatchQueue); } -_MTL_INLINE MTL::SharedEventHandle* MTL::SharedEvent::newSharedEventHandle() +_MTL_INLINE uint64_t MTL::SharedEvent::signaledValue() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newSharedEventHandle)); + return _MTL_msg_uint64_t_signaledValue((const void*)this, nullptr); } -_MTL_INLINE void MTL::SharedEvent::notifyListener(const MTL::SharedEventListener* listener, uint64_t value, const MTL::SharedEventNotificationBlock block) +_MTL_INLINE void MTL::SharedEvent::setSignaledValue(uint64_t signaledValue) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(notifyListener_atValue_block_), listener, value, block); + _MTL_msg_v_setSignaledValue__uint64_t((const void*)this, nullptr, signaledValue); } -_MTL_INLINE void MTL::SharedEvent::notifyListener(const MTL::SharedEventListener* listener, uint64_t value, const MTL::SharedEventNotificationFunction& function) +_MTL_INLINE void MTL::SharedEvent::notifyListener(MTL::SharedEventListener* listener, uint64_t value, MTL::SharedEventNotificationBlock block) { - __block MTL::SharedEventNotificationFunction callback = function; - notifyListener(listener, value, ^void(SharedEvent* pEvent, std::uint64_t innerValue) { callback(pEvent, innerValue); }); + _MTL_msg_v_notifyListener_atValue_block__MTL__SharedEventListenerp_uint64_t_MTL__SharedEventNotificationBlock((const void*)this, nullptr, listener, value, block); } -_MTL_INLINE void MTL::SharedEvent::setSignaledValue(uint64_t signaledValue) +_MTL_INLINE void MTL::SharedEvent::notifyListener(MTL::SharedEventListener* listener, uint64_t value, const MTL::SharedEventNotificationFunction& block) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSignaledValue_), signaledValue); + __block MTL::SharedEventNotificationFunction blockFunction = block; + notifyListener(listener, value, ^(MTL::SharedEvent* x0, uint64_t x1) { blockFunction(x0, x1); }); } -_MTL_INLINE uint64_t MTL::SharedEvent::signaledValue() const +_MTL_INLINE MTL::SharedEventHandle* MTL::SharedEvent::newSharedEventHandle() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(signaledValue)); + return _MTL_msg_MTL__SharedEventHandlep_newSharedEventHandle((const void*)this, nullptr); } _MTL_INLINE bool MTL::SharedEvent::waitUntilSignaledValue(uint64_t value, uint64_t milliseconds) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(waitUntilSignaledValue_timeoutMS_), value, milliseconds); + return _MTL_msg_bool_waitUntilSignaledValue_timeoutMS__uint64_t_uint64_t((const void*)this, nullptr, value, milliseconds); } _MTL_INLINE MTL::SharedEventHandle* MTL::SharedEventHandle::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLSharedEventHandle)); + return _MTL_msg_MTL__SharedEventHandlep_alloc((const void*)&OBJC_CLASS_$_MTLSharedEventHandle, nullptr); } -_MTL_INLINE MTL::SharedEventHandle* MTL::SharedEventHandle::init() +_MTL_INLINE MTL::SharedEventHandle* MTL::SharedEventHandle::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__SharedEventHandlep_init((const void*)this, nullptr); } _MTL_INLINE NS::String* MTL::SharedEventHandle::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLFence.hpp b/thirdparty/metal-cpp/Metal/MTLFence.hpp index f31df4ce8c48..b8e0d3db9b61 100644 --- a/thirdparty/metal-cpp/Metal/MTLFence.hpp +++ b/thirdparty/metal-cpp/Metal/MTLFence.hpp @@ -1,55 +1,49 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLFence.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Device; +} +namespace NS { + class String; +} namespace MTL { -class Device; class Fence : public NS::Referencing { public: - Device* device() const; + MTL::Device* device() const; + NS::String* label() const; + void setLabel(NS::String* label); - NS::String* label() const; - void setLabel(const NS::String* label); }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLFence; + _MTL_INLINE MTL::Device* MTL::Fence::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } _MTL_INLINE NS::String* MTL::Fence::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::Fence::setLabel(const NS::String* label) +_MTL_INLINE void MTL::Fence::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } diff --git a/thirdparty/metal-cpp/Metal/MTLFunctionConstantValues.hpp b/thirdparty/metal-cpp/Metal/MTLFunctionConstantValues.hpp index dce89d15f711..9e74ac72a566 100644 --- a/thirdparty/metal-cpp/Metal/MTLFunctionConstantValues.hpp +++ b/thirdparty/metal-cpp/Metal/MTLFunctionConstantValues.hpp @@ -1,76 +1,68 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLFunctionConstantValues.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDataType.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + enum DataType : NS::UInteger; +} +namespace NS { + class String; +} namespace MTL { -class FunctionConstantValues; class FunctionConstantValues : public NS::Copying { public: static FunctionConstantValues* alloc(); + FunctionConstantValues* init() const; - FunctionConstantValues* init(); - - void reset(); + void reset(); + void setConstantValue(const void * value, MTL::DataType type, NS::UInteger index); + void setConstantValue(const void * value, MTL::DataType type, NS::String* name); + void setConstantValues(const void * values, MTL::DataType type, NS::Range range); - void setConstantValue(const void* value, MTL::DataType type, NS::UInteger index); - void setConstantValue(const void* value, MTL::DataType type, const NS::String* name); - void setConstantValues(const void* values, MTL::DataType type, NS::Range range); }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLFunctionConstantValues; + _MTL_INLINE MTL::FunctionConstantValues* MTL::FunctionConstantValues::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLFunctionConstantValues)); + return _MTL_msg_MTL__FunctionConstantValuesp_alloc((const void*)&OBJC_CLASS_$_MTLFunctionConstantValues, nullptr); } -_MTL_INLINE MTL::FunctionConstantValues* MTL::FunctionConstantValues::init() +_MTL_INLINE MTL::FunctionConstantValues* MTL::FunctionConstantValues::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__FunctionConstantValuesp_init((const void*)this, nullptr); } -_MTL_INLINE void MTL::FunctionConstantValues::reset() +_MTL_INLINE void MTL::FunctionConstantValues::setConstantValue(const void * value, MTL::DataType type, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL_msg_v_setConstantValue_type_atIndex__constvoidp_MTL__DataType_NS__UInteger((const void*)this, nullptr, value, type, index); } -_MTL_INLINE void MTL::FunctionConstantValues::setConstantValue(const void* value, MTL::DataType type, NS::UInteger index) +_MTL_INLINE void MTL::FunctionConstantValues::setConstantValues(const void * values, MTL::DataType type, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setConstantValue_type_atIndex_), value, type, index); + _MTL_msg_v_setConstantValues_type_withRange__constvoidp_MTL__DataType_NS__Range((const void*)this, nullptr, values, type, range); } -_MTL_INLINE void MTL::FunctionConstantValues::setConstantValue(const void* value, MTL::DataType type, const NS::String* name) +_MTL_INLINE void MTL::FunctionConstantValues::setConstantValue(const void * value, MTL::DataType type, NS::String* name) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setConstantValue_type_withName_), value, type, name); + _MTL_msg_v_setConstantValue_type_withName__constvoidp_MTL__DataType_NS__Stringp((const void*)this, nullptr, value, type, name); } -_MTL_INLINE void MTL::FunctionConstantValues::setConstantValues(const void* values, MTL::DataType type, NS::Range range) +_MTL_INLINE void MTL::FunctionConstantValues::reset() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setConstantValues_type_withRange_), values, type, range); + _MTL_msg_v_reset((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLFunctionDescriptor.hpp b/thirdparty/metal-cpp/Metal/MTLFunctionDescriptor.hpp index aa296b5ce77b..a945da35c412 100644 --- a/thirdparty/metal-cpp/Metal/MTLFunctionDescriptor.hpp +++ b/thirdparty/metal-cpp/Metal/MTLFunctionDescriptor.hpp @@ -1,153 +1,144 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLFunctionDescriptor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class FunctionConstantValues; +} +namespace NS { + class Array; + class String; +} namespace MTL { -class FunctionConstantValues; -class FunctionDescriptor; -class IntersectionFunctionDescriptor; _MTL_OPTIONS(NS::UInteger, FunctionOptions) { FunctionOptionNone = 0, - FunctionOptionCompileToBinary = 1, + FunctionOptionCompileToBinary = 1 << 0, FunctionOptionStoreFunctionInMetalPipelinesScript = 1 << 1, FunctionOptionStoreFunctionInMetalScript = 1 << 1, FunctionOptionFailOnBinaryArchiveMiss = 1 << 2, FunctionOptionPipelineIndependent = 1 << 3, }; + +class FunctionDescriptor; +class IntersectionFunctionDescriptor; + class FunctionDescriptor : public NS::Copying { public: static FunctionDescriptor* alloc(); + FunctionDescriptor* init() const; - NS::Array* binaryArchives() const; - - FunctionConstantValues* constantValues() const; - - static FunctionDescriptor* functionDescriptor(); - - FunctionDescriptor* init(); - - NS::String* name() const; - - FunctionOptions options() const; - - void setBinaryArchives(const NS::Array* binaryArchives); - - void setConstantValues(const MTL::FunctionConstantValues* constantValues); - - void setName(const NS::String* name); + static MTL::FunctionDescriptor* functionDescriptor(); - void setOptions(MTL::FunctionOptions options); + NS::Array* binaryArchives() const; + MTL::FunctionConstantValues* constantValues() const; + NS::String* name() const; + MTL::FunctionOptions options() const; + void setBinaryArchives(NS::Array* binaryArchives); + void setConstantValues(MTL::FunctionConstantValues* constantValues); + void setName(NS::String* name); + void setOptions(MTL::FunctionOptions options); + void setSpecializedName(NS::String* specializedName); + NS::String* specializedName() const; - void setSpecializedName(const NS::String* specializedName); - NS::String* specializedName() const; }; -class IntersectionFunctionDescriptor : public NS::Copying + +class IntersectionFunctionDescriptor : public NS::Copying { public: static IntersectionFunctionDescriptor* alloc(); + IntersectionFunctionDescriptor* init() const; - IntersectionFunctionDescriptor* init(); }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLFunctionDescriptor; +extern "C" void *OBJC_CLASS_$_MTLIntersectionFunctionDescriptor; + _MTL_INLINE MTL::FunctionDescriptor* MTL::FunctionDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLFunctionDescriptor)); + return _MTL_msg_MTL__FunctionDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLFunctionDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL::FunctionDescriptor::binaryArchives() const +_MTL_INLINE MTL::FunctionDescriptor* MTL::FunctionDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(binaryArchives)); + return _MTL_msg_MTL__FunctionDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionConstantValues* MTL::FunctionDescriptor::constantValues() const +_MTL_INLINE MTL::FunctionDescriptor* MTL::FunctionDescriptor::functionDescriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(constantValues)); + return _MTL_msg_MTL__FunctionDescriptorp_functionDescriptor((const void*)&OBJC_CLASS_$_MTLFunctionDescriptor, nullptr); } -_MTL_INLINE MTL::FunctionDescriptor* MTL::FunctionDescriptor::functionDescriptor() +_MTL_INLINE NS::String* MTL::FunctionDescriptor::name() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLFunctionDescriptor), _MTL_PRIVATE_SEL(functionDescriptor)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionDescriptor* MTL::FunctionDescriptor::init() +_MTL_INLINE void MTL::FunctionDescriptor::setName(NS::String* name) { - return NS::Object::init(); + _MTL_msg_v_setName__NS__Stringp((const void*)this, nullptr, name); } -_MTL_INLINE NS::String* MTL::FunctionDescriptor::name() const +_MTL_INLINE NS::String* MTL::FunctionDescriptor::specializedName() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_NS__Stringp_specializedName((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionOptions MTL::FunctionDescriptor::options() const +_MTL_INLINE void MTL::FunctionDescriptor::setSpecializedName(NS::String* specializedName) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(options)); + _MTL_msg_v_setSpecializedName__NS__Stringp((const void*)this, nullptr, specializedName); } -_MTL_INLINE void MTL::FunctionDescriptor::setBinaryArchives(const NS::Array* binaryArchives) +_MTL_INLINE MTL::FunctionConstantValues* MTL::FunctionDescriptor::constantValues() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBinaryArchives_), binaryArchives); + return _MTL_msg_MTL__FunctionConstantValuesp_constantValues((const void*)this, nullptr); } -_MTL_INLINE void MTL::FunctionDescriptor::setConstantValues(const MTL::FunctionConstantValues* constantValues) +_MTL_INLINE void MTL::FunctionDescriptor::setConstantValues(MTL::FunctionConstantValues* constantValues) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setConstantValues_), constantValues); + _MTL_msg_v_setConstantValues__MTL__FunctionConstantValuesp((const void*)this, nullptr, constantValues); } -_MTL_INLINE void MTL::FunctionDescriptor::setName(const NS::String* name) +_MTL_INLINE MTL::FunctionOptions MTL::FunctionDescriptor::options() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setName_), name); + return _MTL_msg_MTL__FunctionOptions_options((const void*)this, nullptr); } _MTL_INLINE void MTL::FunctionDescriptor::setOptions(MTL::FunctionOptions options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOptions_), options); + _MTL_msg_v_setOptions__MTL__FunctionOptions((const void*)this, nullptr, options); } -_MTL_INLINE void MTL::FunctionDescriptor::setSpecializedName(const NS::String* specializedName) +_MTL_INLINE NS::Array* MTL::FunctionDescriptor::binaryArchives() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSpecializedName_), specializedName); + return _MTL_msg_NS__Arrayp_binaryArchives((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::FunctionDescriptor::specializedName() const +_MTL_INLINE void MTL::FunctionDescriptor::setBinaryArchives(NS::Array* binaryArchives) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(specializedName)); + _MTL_msg_v_setBinaryArchives__NS__Arrayp((const void*)this, nullptr, binaryArchives); } _MTL_INLINE MTL::IntersectionFunctionDescriptor* MTL::IntersectionFunctionDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLIntersectionFunctionDescriptor)); + return _MTL_msg_MTL__IntersectionFunctionDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLIntersectionFunctionDescriptor, nullptr); } -_MTL_INLINE MTL::IntersectionFunctionDescriptor* MTL::IntersectionFunctionDescriptor::init() +_MTL_INLINE MTL::IntersectionFunctionDescriptor* MTL::IntersectionFunctionDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__IntersectionFunctionDescriptorp_init((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLFunctionHandle.hpp b/thirdparty/metal-cpp/Metal/MTLFunctionHandle.hpp index 7a3ff95d6c23..19757d5c8897 100644 --- a/thirdparty/metal-cpp/Metal/MTLFunctionHandle.hpp +++ b/thirdparty/metal-cpp/Metal/MTLFunctionHandle.hpp @@ -1,65 +1,56 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLFunctionHandle.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLLibrary.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Device; + enum FunctionType : NS::UInteger; +} +namespace NS { + class String; +} namespace MTL { -class Device; class FunctionHandle : public NS::Referencing { public: - Device* device() const; + MTL::Device* device() const; + MTL::FunctionType functionType() const; + MTL::ResourceID gpuResourceID() const; + NS::String* name() const; + +}; - FunctionType functionType() const; +} // namespace MTL - ResourceID gpuResourceID() const; +// --- Class symbols + inline implementations --- - NS::String* name() const; -}; +extern "C" void *OBJC_CLASS_$_MTLFunctionHandle; -} -_MTL_INLINE MTL::Device* MTL::FunctionHandle::device() const +_MTL_INLINE MTL::FunctionType MTL::FunctionHandle::functionType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_MTL__FunctionType_functionType((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionType MTL::FunctionHandle::functionType() const +_MTL_INLINE NS::String* MTL::FunctionHandle::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionType)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceID MTL::FunctionHandle::gpuResourceID() const +_MTL_INLINE MTL::Device* MTL::FunctionHandle::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::FunctionHandle::name() const +_MTL_INLINE MTL::ResourceID MTL::FunctionHandle::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLFunctionLog.hpp b/thirdparty/metal-cpp/Metal/MTLFunctionLog.hpp index 454e60585fbd..82e72dec3b90 100644 --- a/thirdparty/metal-cpp/Metal/MTLFunctionLog.hpp +++ b/thirdparty/metal-cpp/Metal/MTLFunctionLog.hpp @@ -1,101 +1,102 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLFunctionLog.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Function; +} +namespace NS { + class String; + class URL; +} namespace MTL { -class Function; -class FunctionLogDebugLocation; + _MTL_ENUM(NS::UInteger, FunctionLogType) { FunctionLogTypeValidation = 0, }; -class LogContainer : public NS::Referencing + +class LogContainer; +class FunctionLogDebugLocation; +class FunctionLog; + +class LogContainer : public NS::Referencing { +public: }; + class FunctionLogDebugLocation : public NS::Referencing { public: NS::URL* URL() const; - NS::UInteger column() const; - NS::String* functionName() const; - NS::UInteger line() const; + }; + class FunctionLog : public NS::Referencing { public: - FunctionLogDebugLocation* debugLocation() const; + MTL::FunctionLogDebugLocation* debugLocation() const; + NS::String* encoderLabel() const; + MTL::Function* function() const; + MTL::FunctionLogType type() const; - NS::String* encoderLabel() const; +}; - Function* function() const; +} // namespace MTL - FunctionLogType type() const; -}; +// --- Class symbols + inline implementations --- -} -_MTL_INLINE NS::URL* MTL::FunctionLogDebugLocation::URL() const +extern "C" void *OBJC_CLASS_$_MTLLogContainer; +extern "C" void *OBJC_CLASS_$_MTLFunctionLogDebugLocation; +extern "C" void *OBJC_CLASS_$_MTLFunctionLog; + +_MTL_INLINE NS::String* MTL::FunctionLogDebugLocation::functionName() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(URL)); + return _MTL_msg_NS__Stringp_functionName((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::FunctionLogDebugLocation::column() const +_MTL_INLINE NS::URL* MTL::FunctionLogDebugLocation::URL() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(column)); + return _MTL_msg_NS__URLp_URL((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::FunctionLogDebugLocation::functionName() const +_MTL_INLINE NS::UInteger MTL::FunctionLogDebugLocation::line() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionName)); + return _MTL_msg_NS__UInteger_line((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::FunctionLogDebugLocation::line() const +_MTL_INLINE NS::UInteger MTL::FunctionLogDebugLocation::column() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(line)); + return _MTL_msg_NS__UInteger_column((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionLogDebugLocation* MTL::FunctionLog::debugLocation() const +_MTL_INLINE MTL::FunctionLogType MTL::FunctionLog::type() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(debugLocation)); + return _MTL_msg_MTL__FunctionLogType_type((const void*)this, nullptr); } _MTL_INLINE NS::String* MTL::FunctionLog::encoderLabel() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(encoderLabel)); + return _MTL_msg_NS__Stringp_encoderLabel((const void*)this, nullptr); } _MTL_INLINE MTL::Function* MTL::FunctionLog::function() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(function)); + return _MTL_msg_MTL__Functionp_function((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionLogType MTL::FunctionLog::type() const +_MTL_INLINE MTL::FunctionLogDebugLocation* MTL::FunctionLog::debugLocation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); + return _MTL_msg_MTL__FunctionLogDebugLocationp_debugLocation((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLFunctionStitching.hpp b/thirdparty/metal-cpp/Metal/MTLFunctionStitching.hpp index 8dd5fd290232..ee1eea8d9c63 100644 --- a/thirdparty/metal-cpp/Metal/MTLFunctionStitching.hpp +++ b/thirdparty/metal-cpp/Metal/MTLFunctionStitching.hpp @@ -1,319 +1,310 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLFunctionStitching.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace NS { + class Array; + class String; +} namespace MTL { -class FunctionStitchingAttributeAlwaysInline; -class FunctionStitchingFunctionNode; -class FunctionStitchingGraph; -class FunctionStitchingInputNode; -class StitchedLibraryDescriptor; _MTL_OPTIONS(NS::UInteger, StitchedLibraryOptions) { StitchedLibraryOptionNone = 0, - StitchedLibraryOptionFailOnBinaryArchiveMiss = 1, + StitchedLibraryOptionFailOnBinaryArchiveMiss = 1 << 0, StitchedLibraryOptionStoreLibraryInMetalPipelinesScript = 1 << 1, }; + +class FunctionStitchingAttribute; +class FunctionStitchingAttributeAlwaysInline; +class FunctionStitchingNode; +class FunctionStitchingInputNode; +class FunctionStitchingFunctionNode; +class FunctionStitchingGraph; +class StitchedLibraryDescriptor; + class FunctionStitchingAttribute : public NS::Referencing { +public: }; -class FunctionStitchingAttributeAlwaysInline : public NS::Referencing + +class FunctionStitchingAttributeAlwaysInline : public NS::Referencing { public: static FunctionStitchingAttributeAlwaysInline* alloc(); + FunctionStitchingAttributeAlwaysInline* init() const; - FunctionStitchingAttributeAlwaysInline* init(); }; + class FunctionStitchingNode : public NS::Copying { +public: }; -class FunctionStitchingInputNode : public NS::Referencing + +class FunctionStitchingInputNode : public NS::Referencing { public: static FunctionStitchingInputNode* alloc(); + FunctionStitchingInputNode* init() const; - NS::UInteger argumentIndex() const; - - FunctionStitchingInputNode* init(); - FunctionStitchingInputNode* init(NS::UInteger argument); + NS::UInteger argumentIndex() const; + MTL::FunctionStitchingInputNode* init(NS::UInteger argument); + void setArgumentIndex(NS::UInteger argumentIndex); - void setArgumentIndex(NS::UInteger argumentIndex); }; -class FunctionStitchingFunctionNode : public NS::Referencing + +class FunctionStitchingFunctionNode : public NS::Referencing { public: static FunctionStitchingFunctionNode* alloc(); + FunctionStitchingFunctionNode* init() const; - NS::Array* arguments() const; - - NS::Array* controlDependencies() const; - - FunctionStitchingFunctionNode* init(); - FunctionStitchingFunctionNode* init(const NS::String* name, const NS::Array* arguments, const NS::Array* controlDependencies); - - NS::String* name() const; + NS::Array* arguments() const; + NS::Array* controlDependencies() const; + MTL::FunctionStitchingFunctionNode* init(NS::String* name, NS::Array* arguments, NS::Array* controlDependencies); + NS::String* name() const; + void setArguments(NS::Array* arguments); + void setControlDependencies(NS::Array* controlDependencies); + void setName(NS::String* name); - void setArguments(const NS::Array* arguments); - - void setControlDependencies(const NS::Array* controlDependencies); - - void setName(const NS::String* name); }; + class FunctionStitchingGraph : public NS::Copying { public: static FunctionStitchingGraph* alloc(); + FunctionStitchingGraph* init() const; + + NS::Array* attributes() const; + NS::String* functionName() const; + MTL::FunctionStitchingGraph* init(NS::String* functionName, NS::Array* nodes, MTL::FunctionStitchingFunctionNode* outputNode, NS::Array* attributes); + NS::Array* nodes() const; + MTL::FunctionStitchingFunctionNode* outputNode() const; + void setAttributes(NS::Array* attributes); + void setFunctionName(NS::String* functionName); + void setNodes(NS::Array* nodes); + void setOutputNode(MTL::FunctionStitchingFunctionNode* outputNode); - NS::Array* attributes() const; - - NS::String* functionName() const; - - FunctionStitchingGraph* init(); - FunctionStitchingGraph* init(const NS::String* functionName, const NS::Array* nodes, const MTL::FunctionStitchingFunctionNode* outputNode, const NS::Array* attributes); - - NS::Array* nodes() const; - - FunctionStitchingFunctionNode* outputNode() const; - - void setAttributes(const NS::Array* attributes); - - void setFunctionName(const NS::String* functionName); - - void setNodes(const NS::Array* nodes); - - void setOutputNode(const MTL::FunctionStitchingFunctionNode* outputNode); }; + class StitchedLibraryDescriptor : public NS::Copying { public: static StitchedLibraryDescriptor* alloc(); + StitchedLibraryDescriptor* init() const; - NS::Array* binaryArchives() const; - - NS::Array* functionGraphs() const; + NS::Array* binaryArchives() const; + NS::Array* functionGraphs() const; + NS::Array* functions() const; + MTL::StitchedLibraryOptions options() const; + void setBinaryArchives(NS::Array* binaryArchives); + void setFunctionGraphs(NS::Array* functionGraphs); + void setFunctions(NS::Array* functions); + void setOptions(MTL::StitchedLibraryOptions options); - NS::Array* functions() const; - - StitchedLibraryDescriptor* init(); - - StitchedLibraryOptions options() const; +}; - void setBinaryArchives(const NS::Array* binaryArchives); +} // namespace MTL - void setFunctionGraphs(const NS::Array* functionGraphs); +// --- Class symbols + inline implementations --- - void setFunctions(const NS::Array* functions); +extern "C" void *OBJC_CLASS_$_MTLFunctionStitchingAttribute; +extern "C" void *OBJC_CLASS_$_MTLFunctionStitchingAttributeAlwaysInline; +extern "C" void *OBJC_CLASS_$_MTLFunctionStitchingNode; +extern "C" void *OBJC_CLASS_$_MTLFunctionStitchingInputNode; +extern "C" void *OBJC_CLASS_$_MTLFunctionStitchingFunctionNode; +extern "C" void *OBJC_CLASS_$_MTLFunctionStitchingGraph; +extern "C" void *OBJC_CLASS_$_MTLStitchedLibraryDescriptor; - void setOptions(MTL::StitchedLibraryOptions options); -}; - -} _MTL_INLINE MTL::FunctionStitchingAttributeAlwaysInline* MTL::FunctionStitchingAttributeAlwaysInline::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLFunctionStitchingAttributeAlwaysInline)); + return _MTL_msg_MTL__FunctionStitchingAttributeAlwaysInlinep_alloc((const void*)&OBJC_CLASS_$_MTLFunctionStitchingAttributeAlwaysInline, nullptr); } -_MTL_INLINE MTL::FunctionStitchingAttributeAlwaysInline* MTL::FunctionStitchingAttributeAlwaysInline::init() +_MTL_INLINE MTL::FunctionStitchingAttributeAlwaysInline* MTL::FunctionStitchingAttributeAlwaysInline::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__FunctionStitchingAttributeAlwaysInlinep_init((const void*)this, nullptr); } _MTL_INLINE MTL::FunctionStitchingInputNode* MTL::FunctionStitchingInputNode::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLFunctionStitchingInputNode)); + return _MTL_msg_MTL__FunctionStitchingInputNodep_alloc((const void*)&OBJC_CLASS_$_MTLFunctionStitchingInputNode, nullptr); } -_MTL_INLINE NS::UInteger MTL::FunctionStitchingInputNode::argumentIndex() const +_MTL_INLINE MTL::FunctionStitchingInputNode* MTL::FunctionStitchingInputNode::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(argumentIndex)); + return _MTL_msg_MTL__FunctionStitchingInputNodep_init((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionStitchingInputNode* MTL::FunctionStitchingInputNode::init() +_MTL_INLINE NS::UInteger MTL::FunctionStitchingInputNode::argumentIndex() const { - return NS::Object::init(); + return _MTL_msg_NS__UInteger_argumentIndex((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionStitchingInputNode* MTL::FunctionStitchingInputNode::init(NS::UInteger argument) +_MTL_INLINE void MTL::FunctionStitchingInputNode::setArgumentIndex(NS::UInteger argumentIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(initWithArgumentIndex_), argument); + _MTL_msg_v_setArgumentIndex__NS__UInteger((const void*)this, nullptr, argumentIndex); } -_MTL_INLINE void MTL::FunctionStitchingInputNode::setArgumentIndex(NS::UInteger argumentIndex) +_MTL_INLINE MTL::FunctionStitchingInputNode* MTL::FunctionStitchingInputNode::init(NS::UInteger argument) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setArgumentIndex_), argumentIndex); + return _MTL_msg_MTL__FunctionStitchingInputNodep_initWithArgumentIndex__NS__UInteger((const void*)this, nullptr, argument); } _MTL_INLINE MTL::FunctionStitchingFunctionNode* MTL::FunctionStitchingFunctionNode::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLFunctionStitchingFunctionNode)); + return _MTL_msg_MTL__FunctionStitchingFunctionNodep_alloc((const void*)&OBJC_CLASS_$_MTLFunctionStitchingFunctionNode, nullptr); } -_MTL_INLINE NS::Array* MTL::FunctionStitchingFunctionNode::arguments() const +_MTL_INLINE MTL::FunctionStitchingFunctionNode* MTL::FunctionStitchingFunctionNode::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(arguments)); + return _MTL_msg_MTL__FunctionStitchingFunctionNodep_init((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::FunctionStitchingFunctionNode::controlDependencies() const +_MTL_INLINE NS::String* MTL::FunctionStitchingFunctionNode::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlDependencies)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionStitchingFunctionNode* MTL::FunctionStitchingFunctionNode::init() +_MTL_INLINE void MTL::FunctionStitchingFunctionNode::setName(NS::String* name) { - return NS::Object::init(); + _MTL_msg_v_setName__NS__Stringp((const void*)this, nullptr, name); } -_MTL_INLINE MTL::FunctionStitchingFunctionNode* MTL::FunctionStitchingFunctionNode::init(const NS::String* name, const NS::Array* arguments, const NS::Array* controlDependencies) +_MTL_INLINE NS::Array* MTL::FunctionStitchingFunctionNode::arguments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(initWithName_arguments_controlDependencies_), name, arguments, controlDependencies); + return _MTL_msg_NS__Arrayp_arguments((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::FunctionStitchingFunctionNode::name() const +_MTL_INLINE void MTL::FunctionStitchingFunctionNode::setArguments(NS::Array* arguments) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + _MTL_msg_v_setArguments__NS__Arrayp((const void*)this, nullptr, arguments); } -_MTL_INLINE void MTL::FunctionStitchingFunctionNode::setArguments(const NS::Array* arguments) +_MTL_INLINE NS::Array* MTL::FunctionStitchingFunctionNode::controlDependencies() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setArguments_), arguments); + return _MTL_msg_NS__Arrayp_controlDependencies((const void*)this, nullptr); } -_MTL_INLINE void MTL::FunctionStitchingFunctionNode::setControlDependencies(const NS::Array* controlDependencies) +_MTL_INLINE void MTL::FunctionStitchingFunctionNode::setControlDependencies(NS::Array* controlDependencies) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlDependencies_), controlDependencies); + _MTL_msg_v_setControlDependencies__NS__Arrayp((const void*)this, nullptr, controlDependencies); } -_MTL_INLINE void MTL::FunctionStitchingFunctionNode::setName(const NS::String* name) +_MTL_INLINE MTL::FunctionStitchingFunctionNode* MTL::FunctionStitchingFunctionNode::init(NS::String* name, NS::Array* arguments, NS::Array* controlDependencies) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setName_), name); + return _MTL_msg_MTL__FunctionStitchingFunctionNodep_initWithName_arguments_controlDependencies__NS__Stringp_NS__Arrayp_NS__Arrayp((const void*)this, nullptr, name, arguments, controlDependencies); } _MTL_INLINE MTL::FunctionStitchingGraph* MTL::FunctionStitchingGraph::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLFunctionStitchingGraph)); + return _MTL_msg_MTL__FunctionStitchingGraphp_alloc((const void*)&OBJC_CLASS_$_MTLFunctionStitchingGraph, nullptr); } -_MTL_INLINE NS::Array* MTL::FunctionStitchingGraph::attributes() const +_MTL_INLINE MTL::FunctionStitchingGraph* MTL::FunctionStitchingGraph::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(attributes)); + return _MTL_msg_MTL__FunctionStitchingGraphp_init((const void*)this, nullptr); } _MTL_INLINE NS::String* MTL::FunctionStitchingGraph::functionName() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionName)); + return _MTL_msg_NS__Stringp_functionName((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionStitchingGraph* MTL::FunctionStitchingGraph::init() +_MTL_INLINE void MTL::FunctionStitchingGraph::setFunctionName(NS::String* functionName) { - return NS::Object::init(); + _MTL_msg_v_setFunctionName__NS__Stringp((const void*)this, nullptr, functionName); } -_MTL_INLINE MTL::FunctionStitchingGraph* MTL::FunctionStitchingGraph::init(const NS::String* functionName, const NS::Array* nodes, const MTL::FunctionStitchingFunctionNode* outputNode, const NS::Array* attributes) +_MTL_INLINE NS::Array* MTL::FunctionStitchingGraph::nodes() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(initWithFunctionName_nodes_outputNode_attributes_), functionName, nodes, outputNode, attributes); + return _MTL_msg_NS__Arrayp_nodes((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::FunctionStitchingGraph::nodes() const +_MTL_INLINE void MTL::FunctionStitchingGraph::setNodes(NS::Array* nodes) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(nodes)); + _MTL_msg_v_setNodes__NS__Arrayp((const void*)this, nullptr, nodes); } _MTL_INLINE MTL::FunctionStitchingFunctionNode* MTL::FunctionStitchingGraph::outputNode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(outputNode)); + return _MTL_msg_MTL__FunctionStitchingFunctionNodep_outputNode((const void*)this, nullptr); } -_MTL_INLINE void MTL::FunctionStitchingGraph::setAttributes(const NS::Array* attributes) +_MTL_INLINE void MTL::FunctionStitchingGraph::setOutputNode(MTL::FunctionStitchingFunctionNode* outputNode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAttributes_), attributes); + _MTL_msg_v_setOutputNode__MTL__FunctionStitchingFunctionNodep((const void*)this, nullptr, outputNode); } -_MTL_INLINE void MTL::FunctionStitchingGraph::setFunctionName(const NS::String* functionName) +_MTL_INLINE NS::Array* MTL::FunctionStitchingGraph::attributes() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctionName_), functionName); + return _MTL_msg_NS__Arrayp_attributes((const void*)this, nullptr); } -_MTL_INLINE void MTL::FunctionStitchingGraph::setNodes(const NS::Array* nodes) +_MTL_INLINE void MTL::FunctionStitchingGraph::setAttributes(NS::Array* attributes) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setNodes_), nodes); + _MTL_msg_v_setAttributes__NS__Arrayp((const void*)this, nullptr, attributes); } -_MTL_INLINE void MTL::FunctionStitchingGraph::setOutputNode(const MTL::FunctionStitchingFunctionNode* outputNode) +_MTL_INLINE MTL::FunctionStitchingGraph* MTL::FunctionStitchingGraph::init(NS::String* functionName, NS::Array* nodes, MTL::FunctionStitchingFunctionNode* outputNode, NS::Array* attributes) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOutputNode_), outputNode); + return _MTL_msg_MTL__FunctionStitchingGraphp_initWithFunctionName_nodes_outputNode_attributes__NS__Stringp_NS__Arrayp_MTL__FunctionStitchingFunctionNodep_NS__Arrayp((const void*)this, nullptr, functionName, nodes, outputNode, attributes); } _MTL_INLINE MTL::StitchedLibraryDescriptor* MTL::StitchedLibraryDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLStitchedLibraryDescriptor)); + return _MTL_msg_MTL__StitchedLibraryDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLStitchedLibraryDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL::StitchedLibraryDescriptor::binaryArchives() const +_MTL_INLINE MTL::StitchedLibraryDescriptor* MTL::StitchedLibraryDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(binaryArchives)); + return _MTL_msg_MTL__StitchedLibraryDescriptorp_init((const void*)this, nullptr); } _MTL_INLINE NS::Array* MTL::StitchedLibraryDescriptor::functionGraphs() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionGraphs)); + return _MTL_msg_NS__Arrayp_functionGraphs((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::StitchedLibraryDescriptor::functions() const +_MTL_INLINE void MTL::StitchedLibraryDescriptor::setFunctionGraphs(NS::Array* functionGraphs) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functions)); + _MTL_msg_v_setFunctionGraphs__NS__Arrayp((const void*)this, nullptr, functionGraphs); } -_MTL_INLINE MTL::StitchedLibraryDescriptor* MTL::StitchedLibraryDescriptor::init() +_MTL_INLINE NS::Array* MTL::StitchedLibraryDescriptor::functions() const { - return NS::Object::init(); + return _MTL_msg_NS__Arrayp_functions((const void*)this, nullptr); } -_MTL_INLINE MTL::StitchedLibraryOptions MTL::StitchedLibraryDescriptor::options() const +_MTL_INLINE void MTL::StitchedLibraryDescriptor::setFunctions(NS::Array* functions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(options)); + _MTL_msg_v_setFunctions__NS__Arrayp((const void*)this, nullptr, functions); } -_MTL_INLINE void MTL::StitchedLibraryDescriptor::setBinaryArchives(const NS::Array* binaryArchives) +_MTL_INLINE NS::Array* MTL::StitchedLibraryDescriptor::binaryArchives() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBinaryArchives_), binaryArchives); + return _MTL_msg_NS__Arrayp_binaryArchives((const void*)this, nullptr); } -_MTL_INLINE void MTL::StitchedLibraryDescriptor::setFunctionGraphs(const NS::Array* functionGraphs) +_MTL_INLINE void MTL::StitchedLibraryDescriptor::setBinaryArchives(NS::Array* binaryArchives) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctionGraphs_), functionGraphs); + _MTL_msg_v_setBinaryArchives__NS__Arrayp((const void*)this, nullptr, binaryArchives); } -_MTL_INLINE void MTL::StitchedLibraryDescriptor::setFunctions(const NS::Array* functions) +_MTL_INLINE MTL::StitchedLibraryOptions MTL::StitchedLibraryDescriptor::options() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctions_), functions); + return _MTL_msg_MTL__StitchedLibraryOptions_options((const void*)this, nullptr); } _MTL_INLINE void MTL::StitchedLibraryDescriptor::setOptions(MTL::StitchedLibraryOptions options) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOptions_), options); + _MTL_msg_v_setOptions__MTL__StitchedLibraryOptions((const void*)this, nullptr, options); } diff --git a/thirdparty/metal-cpp/Metal/MTLHeaderBridge.hpp b/thirdparty/metal-cpp/Metal/MTLHeaderBridge.hpp deleted file mode 100644 index 6a3a142234c5..000000000000 --- a/thirdparty/metal-cpp/Metal/MTLHeaderBridge.hpp +++ /dev/null @@ -1,3120 +0,0 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLHeaderBridge.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#pragma once -#include "MTLPrivate.hpp" - -namespace MTL::Private::Class -{ - -_MTL_PRIVATE_DEF_CLS(MTL4AccelerationStructureBoundingBoxGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4AccelerationStructureCurveGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4AccelerationStructureDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4AccelerationStructureGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4AccelerationStructureMotionBoundingBoxGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4AccelerationStructureMotionCurveGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4AccelerationStructureMotionTriangleGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4AccelerationStructureTriangleGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4ArgumentTableDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4BinaryFunctionDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4CommandAllocatorDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4CommandBufferOptions); -_MTL_PRIVATE_DEF_CLS(MTL4CommandQueueDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4CommitOptions); -_MTL_PRIVATE_DEF_CLS(MTL4CompilerDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4CompilerTaskOptions); -_MTL_PRIVATE_DEF_CLS(MTL4ComputePipelineDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4CounterHeapDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4FunctionDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4IndirectInstanceAccelerationStructureDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4InstanceAccelerationStructureDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4LibraryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4LibraryFunctionDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4MachineLearningPipelineDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4MachineLearningPipelineReflection); -_MTL_PRIVATE_DEF_CLS(MTL4MeshRenderPipelineDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4PipelineDataSetSerializerDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4PipelineDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4PipelineOptions); -_MTL_PRIVATE_DEF_CLS(MTL4PipelineStageDynamicLinkingDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4PrimitiveAccelerationStructureDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4RenderPassDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4RenderPipelineBinaryFunctionsDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4RenderPipelineColorAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4RenderPipelineColorAttachmentDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTL4RenderPipelineDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4RenderPipelineDynamicLinkingDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4SpecializedFunctionDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4StaticLinkingDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4StitchedFunctionDescriptor); -_MTL_PRIVATE_DEF_CLS(MTL4TileRenderPipelineDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureBoundingBoxGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureCurveGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureMotionCurveGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureMotionTriangleGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructurePassDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructurePassSampleBufferAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureTriangleGeometryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLArchitecture); -_MTL_PRIVATE_DEF_CLS(MTLArgument); -_MTL_PRIVATE_DEF_CLS(MTLArgumentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLArrayType); -_MTL_PRIVATE_DEF_CLS(MTLAttribute); -_MTL_PRIVATE_DEF_CLS(MTLAttributeDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLAttributeDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLBinaryArchiveDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLBlitPassDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLBlitPassSampleBufferAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLBlitPassSampleBufferAttachmentDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLBufferLayoutDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLBufferLayoutDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLCaptureDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLCaptureManager); -_MTL_PRIVATE_DEF_CLS(MTLCommandBufferDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLCommandQueueDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLCompileOptions); -_MTL_PRIVATE_DEF_CLS(MTLComputePassDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLComputePassSampleBufferAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLComputePassSampleBufferAttachmentDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLComputePipelineDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLComputePipelineReflection); -_MTL_PRIVATE_DEF_CLS(MTLCounterSampleBufferDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLDepthStencilDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLFunctionConstant); -_MTL_PRIVATE_DEF_CLS(MTLFunctionConstantValues); -_MTL_PRIVATE_DEF_CLS(MTLFunctionDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLFunctionReflection); -_MTL_PRIVATE_DEF_CLS(MTLFunctionStitchingAttributeAlwaysInline); -_MTL_PRIVATE_DEF_CLS(MTLFunctionStitchingFunctionNode); -_MTL_PRIVATE_DEF_CLS(MTLFunctionStitchingGraph); -_MTL_PRIVATE_DEF_CLS(MTLFunctionStitchingInputNode); -_MTL_PRIVATE_DEF_CLS(MTLHeapDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLIOCommandQueueDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLIndirectCommandBufferDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLIndirectInstanceAccelerationStructureDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLInstanceAccelerationStructureDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLIntersectionFunctionDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLIntersectionFunctionTableDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLLinkedFunctions); -_MTL_PRIVATE_DEF_CLS(MTLLogStateDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLLogicalToPhysicalColorAttachmentMap); -_MTL_PRIVATE_DEF_CLS(MTLMeshRenderPipelineDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLMotionKeyframeData); -_MTL_PRIVATE_DEF_CLS(MTLPipelineBufferDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLPipelineBufferDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLPointerType); -_MTL_PRIVATE_DEF_CLS(MTLPrimitiveAccelerationStructureDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRasterizationRateLayerArray); -_MTL_PRIVATE_DEF_CLS(MTLRasterizationRateLayerDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRasterizationRateMapDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRasterizationRateSampleArray); -_MTL_PRIVATE_DEF_CLS(MTLRenderPassAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRenderPassColorAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRenderPassColorAttachmentDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLRenderPassDepthAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRenderPassDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRenderPassSampleBufferAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRenderPassSampleBufferAttachmentDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLRenderPassStencilAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRenderPipelineColorAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRenderPipelineColorAttachmentDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLRenderPipelineDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRenderPipelineFunctionsDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLRenderPipelineReflection); -_MTL_PRIVATE_DEF_CLS(MTLResidencySetDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLResourceStatePassDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLResourceStatePassSampleBufferAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLResourceStatePassSampleBufferAttachmentDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLResourceViewPoolDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLSamplerDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLSharedEventHandle); -_MTL_PRIVATE_DEF_CLS(MTLSharedEventListener); -_MTL_PRIVATE_DEF_CLS(MTLSharedTextureHandle); -_MTL_PRIVATE_DEF_CLS(MTLStageInputOutputDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLStencilDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLStitchedLibraryDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLStructMember); -_MTL_PRIVATE_DEF_CLS(MTLStructType); -_MTL_PRIVATE_DEF_CLS(MTLTensorDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLTensorExtents); -_MTL_PRIVATE_DEF_CLS(MTLTensorReferenceType); -_MTL_PRIVATE_DEF_CLS(MTLTextureDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLTextureReferenceType); -_MTL_PRIVATE_DEF_CLS(MTLTextureViewDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLTileRenderPipelineColorAttachmentDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLTileRenderPipelineColorAttachmentDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLTileRenderPipelineDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLType); -_MTL_PRIVATE_DEF_CLS(MTLVertexAttribute); -_MTL_PRIVATE_DEF_CLS(MTLVertexAttributeDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLVertexAttributeDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLVertexBufferLayoutDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLVertexBufferLayoutDescriptorArray); -_MTL_PRIVATE_DEF_CLS(MTLVertexDescriptor); -_MTL_PRIVATE_DEF_CLS(MTLVisibleFunctionTableDescriptor); - -} - -namespace MTL::Private::Protocol -{ - -_MTL_PRIVATE_DEF_PRO(MTL4Archive); -_MTL_PRIVATE_DEF_PRO(MTL4ArgumentTable); -_MTL_PRIVATE_DEF_PRO(MTL4BinaryFunction); -_MTL_PRIVATE_DEF_PRO(MTL4CommandAllocator); -_MTL_PRIVATE_DEF_PRO(MTL4CommandBuffer); -_MTL_PRIVATE_DEF_PRO(MTL4CommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTL4CommandQueue); -_MTL_PRIVATE_DEF_PRO(MTL4CommitFeedback); -_MTL_PRIVATE_DEF_PRO(MTL4Compiler); -_MTL_PRIVATE_DEF_PRO(MTL4CompilerTask); -_MTL_PRIVATE_DEF_PRO(MTL4ComputeCommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTL4CounterHeap); -_MTL_PRIVATE_DEF_PRO(MTL4MachineLearningCommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTL4MachineLearningPipelineState); -_MTL_PRIVATE_DEF_PRO(MTL4PipelineDataSetSerializer); -_MTL_PRIVATE_DEF_PRO(MTL4RenderCommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTLAccelerationStructure); -_MTL_PRIVATE_DEF_PRO(MTLAccelerationStructureCommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTLAllocation); -_MTL_PRIVATE_DEF_PRO(MTLArgumentEncoder); -_MTL_PRIVATE_DEF_PRO(MTLBinaryArchive); -_MTL_PRIVATE_DEF_PRO(MTLBinding); -_MTL_PRIVATE_DEF_PRO(MTLBlitCommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTLBuffer); -_MTL_PRIVATE_DEF_PRO(MTLBufferBinding); -_MTL_PRIVATE_DEF_PRO(MTLCommandBuffer); -_MTL_PRIVATE_DEF_PRO(MTLCommandBufferEncoderInfo); -_MTL_PRIVATE_DEF_PRO(MTLCommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTLCommandQueue); -_MTL_PRIVATE_DEF_PRO(MTLComputeCommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTLComputePipelineState); -_MTL_PRIVATE_DEF_PRO(MTLCounter); -_MTL_PRIVATE_DEF_PRO(MTLCounterSampleBuffer); -_MTL_PRIVATE_DEF_PRO(MTLCounterSet); -_MTL_PRIVATE_DEF_PRO(MTLDepthStencilState); -_MTL_PRIVATE_DEF_PRO(MTLDevice); -_MTL_PRIVATE_DEF_PRO(MTLDrawable); -_MTL_PRIVATE_DEF_PRO(MTLDynamicLibrary); -_MTL_PRIVATE_DEF_PRO(MTLEvent); -_MTL_PRIVATE_DEF_PRO(MTLFence); -_MTL_PRIVATE_DEF_PRO(MTLFunction); -_MTL_PRIVATE_DEF_PRO(MTLFunctionHandle); -_MTL_PRIVATE_DEF_PRO(MTLFunctionLog); -_MTL_PRIVATE_DEF_PRO(MTLFunctionLogDebugLocation); -_MTL_PRIVATE_DEF_PRO(MTLFunctionStitchingAttribute); -_MTL_PRIVATE_DEF_PRO(MTLFunctionStitchingNode); -_MTL_PRIVATE_DEF_PRO(MTLHeap); -_MTL_PRIVATE_DEF_PRO(MTLIOCommandBuffer); -_MTL_PRIVATE_DEF_PRO(MTLIOCommandQueue); -_MTL_PRIVATE_DEF_PRO(MTLIOFileHandle); -_MTL_PRIVATE_DEF_PRO(MTLIOScratchBuffer); -_MTL_PRIVATE_DEF_PRO(MTLIOScratchBufferAllocator); -_MTL_PRIVATE_DEF_PRO(MTLIndirectCommandBuffer); -_MTL_PRIVATE_DEF_PRO(MTLIndirectComputeCommand); -_MTL_PRIVATE_DEF_PRO(MTLIndirectRenderCommand); -_MTL_PRIVATE_DEF_PRO(MTLIntersectionFunctionTable); -_MTL_PRIVATE_DEF_PRO(MTLLibrary); -_MTL_PRIVATE_DEF_PRO(MTLLogContainer); -_MTL_PRIVATE_DEF_PRO(MTLLogState); -_MTL_PRIVATE_DEF_PRO(MTLObjectPayloadBinding); -_MTL_PRIVATE_DEF_PRO(MTLParallelRenderCommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTLRasterizationRateMap); -_MTL_PRIVATE_DEF_PRO(MTLRenderCommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTLRenderPipelineState); -_MTL_PRIVATE_DEF_PRO(MTLResidencySet); -_MTL_PRIVATE_DEF_PRO(MTLResource); -_MTL_PRIVATE_DEF_PRO(MTLResourceStateCommandEncoder); -_MTL_PRIVATE_DEF_PRO(MTLResourceViewPool); -_MTL_PRIVATE_DEF_PRO(MTLSamplerState); -_MTL_PRIVATE_DEF_PRO(MTLSharedEvent); -_MTL_PRIVATE_DEF_PRO(MTLTensor); -_MTL_PRIVATE_DEF_PRO(MTLTensorBinding); -_MTL_PRIVATE_DEF_PRO(MTLTexture); -_MTL_PRIVATE_DEF_PRO(MTLTextureBinding); -_MTL_PRIVATE_DEF_PRO(MTLTextureViewPool); -_MTL_PRIVATE_DEF_PRO(MTLThreadgroupBinding); -_MTL_PRIVATE_DEF_PRO(MTLVisibleFunctionTable); - -} - -namespace MTL::Private::Selector -{ - -_MTL_PRIVATE_DEF_SEL(GPUEndTime, - "GPUEndTime"); -_MTL_PRIVATE_DEF_SEL(GPUStartTime, - "GPUStartTime"); -_MTL_PRIVATE_DEF_SEL(URL, - "URL"); -_MTL_PRIVATE_DEF_SEL(accelerationStructureCommandEncoder, - "accelerationStructureCommandEncoder"); -_MTL_PRIVATE_DEF_SEL(accelerationStructureCommandEncoderWithDescriptor_, - "accelerationStructureCommandEncoderWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(accelerationStructurePassDescriptor, - "accelerationStructurePassDescriptor"); -_MTL_PRIVATE_DEF_SEL(accelerationStructureSizesWithDescriptor_, - "accelerationStructureSizesWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(access, - "access"); -_MTL_PRIVATE_DEF_SEL(addAllocation_, - "addAllocation:"); -_MTL_PRIVATE_DEF_SEL(addAllocations_count_, - "addAllocations:count:"); -_MTL_PRIVATE_DEF_SEL(addBarrier, - "addBarrier"); -_MTL_PRIVATE_DEF_SEL(addCompletedHandler_, - "addCompletedHandler:"); -_MTL_PRIVATE_DEF_SEL(addComputePipelineFunctionsWithDescriptor_error_, - "addComputePipelineFunctionsWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(addDebugMarker_range_, - "addDebugMarker:range:"); -_MTL_PRIVATE_DEF_SEL(addFeedbackHandler_, - "addFeedbackHandler:"); -_MTL_PRIVATE_DEF_SEL(addFunctionWithDescriptor_library_error_, - "addFunctionWithDescriptor:library:error:"); -_MTL_PRIVATE_DEF_SEL(addLibraryWithDescriptor_error_, - "addLibraryWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(addLogHandler_, - "addLogHandler:"); -_MTL_PRIVATE_DEF_SEL(addMeshRenderPipelineFunctionsWithDescriptor_error_, - "addMeshRenderPipelineFunctionsWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(addPresentedHandler_, - "addPresentedHandler:"); -_MTL_PRIVATE_DEF_SEL(addRenderPipelineFunctionsWithDescriptor_error_, - "addRenderPipelineFunctionsWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(addResidencySet_, - "addResidencySet:"); -_MTL_PRIVATE_DEF_SEL(addResidencySets_count_, - "addResidencySets:count:"); -_MTL_PRIVATE_DEF_SEL(addScheduledHandler_, - "addScheduledHandler:"); -_MTL_PRIVATE_DEF_SEL(addTileRenderPipelineFunctionsWithDescriptor_error_, - "addTileRenderPipelineFunctionsWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(alignment, - "alignment"); -_MTL_PRIVATE_DEF_SEL(allAllocations, - "allAllocations"); -_MTL_PRIVATE_DEF_SEL(allocatedSize, - "allocatedSize"); -_MTL_PRIVATE_DEF_SEL(allocationCount, - "allocationCount"); -_MTL_PRIVATE_DEF_SEL(allowDuplicateIntersectionFunctionInvocation, - "allowDuplicateIntersectionFunctionInvocation"); -_MTL_PRIVATE_DEF_SEL(allowGPUOptimizedContents, - "allowGPUOptimizedContents"); -_MTL_PRIVATE_DEF_SEL(allowReferencingUndefinedSymbols, - "allowReferencingUndefinedSymbols"); -_MTL_PRIVATE_DEF_SEL(alphaBlendOperation, - "alphaBlendOperation"); -_MTL_PRIVATE_DEF_SEL(alphaToCoverageState, - "alphaToCoverageState"); -_MTL_PRIVATE_DEF_SEL(alphaToOneState, - "alphaToOneState"); -_MTL_PRIVATE_DEF_SEL(architecture, - "architecture"); -_MTL_PRIVATE_DEF_SEL(areBarycentricCoordsSupported, - "areBarycentricCoordsSupported"); -_MTL_PRIVATE_DEF_SEL(areProgrammableSamplePositionsSupported, - "areProgrammableSamplePositionsSupported"); -_MTL_PRIVATE_DEF_SEL(areRasterOrderGroupsSupported, - "areRasterOrderGroupsSupported"); -_MTL_PRIVATE_DEF_SEL(argumentBuffersSupport, - "argumentBuffersSupport"); -_MTL_PRIVATE_DEF_SEL(argumentDescriptor, - "argumentDescriptor"); -_MTL_PRIVATE_DEF_SEL(argumentIndex, - "argumentIndex"); -_MTL_PRIVATE_DEF_SEL(argumentIndexStride, - "argumentIndexStride"); -_MTL_PRIVATE_DEF_SEL(arguments, - "arguments"); -_MTL_PRIVATE_DEF_SEL(arrayLength, - "arrayLength"); -_MTL_PRIVATE_DEF_SEL(arrayType, - "arrayType"); -_MTL_PRIVATE_DEF_SEL(attributeIndex, - "attributeIndex"); -_MTL_PRIVATE_DEF_SEL(attributeType, - "attributeType"); -_MTL_PRIVATE_DEF_SEL(attributes, - "attributes"); -_MTL_PRIVATE_DEF_SEL(backFaceStencil, - "backFaceStencil"); -_MTL_PRIVATE_DEF_SEL(barrierAfterEncoderStages_beforeEncoderStages_visibilityOptions_, - "barrierAfterEncoderStages:beforeEncoderStages:visibilityOptions:"); -_MTL_PRIVATE_DEF_SEL(barrierAfterQueueStages_beforeStages_, - "barrierAfterQueueStages:beforeStages:"); -_MTL_PRIVATE_DEF_SEL(barrierAfterQueueStages_beforeStages_visibilityOptions_, - "barrierAfterQueueStages:beforeStages:visibilityOptions:"); -_MTL_PRIVATE_DEF_SEL(barrierAfterStages_beforeQueueStages_visibilityOptions_, - "barrierAfterStages:beforeQueueStages:visibilityOptions:"); -_MTL_PRIVATE_DEF_SEL(baseResourceID, - "baseResourceID"); -_MTL_PRIVATE_DEF_SEL(beginCommandBufferWithAllocator_, - "beginCommandBufferWithAllocator:"); -_MTL_PRIVATE_DEF_SEL(beginCommandBufferWithAllocator_options_, - "beginCommandBufferWithAllocator:options:"); -_MTL_PRIVATE_DEF_SEL(binaryArchives, - "binaryArchives"); -_MTL_PRIVATE_DEF_SEL(binaryFunctions, - "binaryFunctions"); -_MTL_PRIVATE_DEF_SEL(binaryLinkedFunctions, - "binaryLinkedFunctions"); -_MTL_PRIVATE_DEF_SEL(bindings, - "bindings"); -_MTL_PRIVATE_DEF_SEL(blendingState, - "blendingState"); -_MTL_PRIVATE_DEF_SEL(blitCommandEncoder, - "blitCommandEncoder"); -_MTL_PRIVATE_DEF_SEL(blitCommandEncoderWithDescriptor_, - "blitCommandEncoderWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(blitPassDescriptor, - "blitPassDescriptor"); -_MTL_PRIVATE_DEF_SEL(borderColor, - "borderColor"); -_MTL_PRIVATE_DEF_SEL(boundingBoxBuffer, - "boundingBoxBuffer"); -_MTL_PRIVATE_DEF_SEL(boundingBoxBufferOffset, - "boundingBoxBufferOffset"); -_MTL_PRIVATE_DEF_SEL(boundingBoxBuffers, - "boundingBoxBuffers"); -_MTL_PRIVATE_DEF_SEL(boundingBoxCount, - "boundingBoxCount"); -_MTL_PRIVATE_DEF_SEL(boundingBoxStride, - "boundingBoxStride"); -_MTL_PRIVATE_DEF_SEL(buffer, - "buffer"); -_MTL_PRIVATE_DEF_SEL(bufferAlignment, - "bufferAlignment"); -_MTL_PRIVATE_DEF_SEL(bufferBytesPerRow, - "bufferBytesPerRow"); -_MTL_PRIVATE_DEF_SEL(bufferDataSize, - "bufferDataSize"); -_MTL_PRIVATE_DEF_SEL(bufferDataType, - "bufferDataType"); -_MTL_PRIVATE_DEF_SEL(bufferIndex, - "bufferIndex"); -_MTL_PRIVATE_DEF_SEL(bufferOffset, - "bufferOffset"); -_MTL_PRIVATE_DEF_SEL(bufferPointerType, - "bufferPointerType"); -_MTL_PRIVATE_DEF_SEL(bufferSize, - "bufferSize"); -_MTL_PRIVATE_DEF_SEL(bufferStructType, - "bufferStructType"); -_MTL_PRIVATE_DEF_SEL(buffers, - "buffers"); -_MTL_PRIVATE_DEF_SEL(buildAccelerationStructure_descriptor_scratchBuffer_, - "buildAccelerationStructure:descriptor:scratchBuffer:"); -_MTL_PRIVATE_DEF_SEL(buildAccelerationStructure_descriptor_scratchBuffer_scratchBufferOffset_, - "buildAccelerationStructure:descriptor:scratchBuffer:scratchBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(captureObject, - "captureObject"); -_MTL_PRIVATE_DEF_SEL(clearBarrier, - "clearBarrier"); -_MTL_PRIVATE_DEF_SEL(clearColor, - "clearColor"); -_MTL_PRIVATE_DEF_SEL(clearDepth, - "clearDepth"); -_MTL_PRIVATE_DEF_SEL(clearStencil, - "clearStencil"); -_MTL_PRIVATE_DEF_SEL(colorAttachmentMappingState, - "colorAttachmentMappingState"); -_MTL_PRIVATE_DEF_SEL(colorAttachments, - "colorAttachments"); -_MTL_PRIVATE_DEF_SEL(column, - "column"); -_MTL_PRIVATE_DEF_SEL(commandBuffer, - "commandBuffer"); -_MTL_PRIVATE_DEF_SEL(commandBufferWithDescriptor_, - "commandBufferWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(commandBufferWithUnretainedReferences, - "commandBufferWithUnretainedReferences"); -_MTL_PRIVATE_DEF_SEL(commandQueue, - "commandQueue"); -_MTL_PRIVATE_DEF_SEL(commandTypes, - "commandTypes"); -_MTL_PRIVATE_DEF_SEL(commit, - "commit"); -_MTL_PRIVATE_DEF_SEL(commit_count_, - "commit:count:"); -_MTL_PRIVATE_DEF_SEL(commit_count_options_, - "commit:count:options:"); -_MTL_PRIVATE_DEF_SEL(compareFunction, - "compareFunction"); -_MTL_PRIVATE_DEF_SEL(compileSymbolVisibility, - "compileSymbolVisibility"); -_MTL_PRIVATE_DEF_SEL(compiler, - "compiler"); -_MTL_PRIVATE_DEF_SEL(compressionType, - "compressionType"); -_MTL_PRIVATE_DEF_SEL(computeCommandEncoder, - "computeCommandEncoder"); -_MTL_PRIVATE_DEF_SEL(computeCommandEncoderWithDescriptor_, - "computeCommandEncoderWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(computeCommandEncoderWithDispatchType_, - "computeCommandEncoderWithDispatchType:"); -_MTL_PRIVATE_DEF_SEL(computeFunction, - "computeFunction"); -_MTL_PRIVATE_DEF_SEL(computeFunctionDescriptor, - "computeFunctionDescriptor"); -_MTL_PRIVATE_DEF_SEL(computePassDescriptor, - "computePassDescriptor"); -_MTL_PRIVATE_DEF_SEL(concurrentDispatchThreadgroups_threadsPerThreadgroup_, - "concurrentDispatchThreadgroups:threadsPerThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(concurrentDispatchThreads_threadsPerThreadgroup_, - "concurrentDispatchThreads:threadsPerThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(configuration, - "configuration"); -_MTL_PRIVATE_DEF_SEL(constantBlockAlignment, - "constantBlockAlignment"); -_MTL_PRIVATE_DEF_SEL(constantDataAtIndex_, - "constantDataAtIndex:"); -_MTL_PRIVATE_DEF_SEL(constantValues, - "constantValues"); -_MTL_PRIVATE_DEF_SEL(containsAllocation_, - "containsAllocation:"); -_MTL_PRIVATE_DEF_SEL(contents, - "contents"); -_MTL_PRIVATE_DEF_SEL(controlDependencies, - "controlDependencies"); -_MTL_PRIVATE_DEF_SEL(controlPointBuffer, - "controlPointBuffer"); -_MTL_PRIVATE_DEF_SEL(controlPointBufferOffset, - "controlPointBufferOffset"); -_MTL_PRIVATE_DEF_SEL(controlPointBuffers, - "controlPointBuffers"); -_MTL_PRIVATE_DEF_SEL(controlPointCount, - "controlPointCount"); -_MTL_PRIVATE_DEF_SEL(controlPointFormat, - "controlPointFormat"); -_MTL_PRIVATE_DEF_SEL(controlPointStride, - "controlPointStride"); -_MTL_PRIVATE_DEF_SEL(convertSparsePixelRegions_toTileRegions_withTileSize_alignmentMode_numRegions_, - "convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions:"); -_MTL_PRIVATE_DEF_SEL(convertSparseTileRegions_toPixelRegions_withTileSize_numRegions_, - "convertSparseTileRegions:toPixelRegions:withTileSize:numRegions:"); -_MTL_PRIVATE_DEF_SEL(copyAccelerationStructure_toAccelerationStructure_, - "copyAccelerationStructure:toAccelerationStructure:"); -_MTL_PRIVATE_DEF_SEL(copyAndCompactAccelerationStructure_toAccelerationStructure_, - "copyAndCompactAccelerationStructure:toAccelerationStructure:"); -_MTL_PRIVATE_DEF_SEL(copyBufferMappingsFromBuffer_toBuffer_operations_count_, - "copyBufferMappingsFromBuffer:toBuffer:operations:count:"); -_MTL_PRIVATE_DEF_SEL(copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_, - "copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:"); -_MTL_PRIVATE_DEF_SEL(copyFromBuffer_sourceOffset_sourceBytesPerRow_sourceBytesPerImage_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_options_, - "copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:"); -_MTL_PRIVATE_DEF_SEL(copyFromBuffer_sourceOffset_toBuffer_destinationOffset_size_, - "copyFromBuffer:sourceOffset:toBuffer:destinationOffset:size:"); -_MTL_PRIVATE_DEF_SEL(copyFromTensor_sourceOrigin_sourceDimensions_toTensor_destinationOrigin_destinationDimensions_, - "copyFromTensor:sourceOrigin:sourceDimensions:toTensor:destinationOrigin:destinationDimensions:"); -_MTL_PRIVATE_DEF_SEL(copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage_, - "copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage:"); -_MTL_PRIVATE_DEF_SEL(copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toBuffer_destinationOffset_destinationBytesPerRow_destinationBytesPerImage_options_, - "copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage:options:"); -_MTL_PRIVATE_DEF_SEL(copyFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_, - "copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:"); -_MTL_PRIVATE_DEF_SEL(copyFromTexture_sourceSlice_sourceLevel_toTexture_destinationSlice_destinationLevel_sliceCount_levelCount_, - "copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount:"); -_MTL_PRIVATE_DEF_SEL(copyFromTexture_toTexture_, - "copyFromTexture:toTexture:"); -_MTL_PRIVATE_DEF_SEL(copyIndirectCommandBuffer_sourceRange_destination_destinationIndex_, - "copyIndirectCommandBuffer:sourceRange:destination:destinationIndex:"); -_MTL_PRIVATE_DEF_SEL(copyParameterDataToBuffer_offset_, - "copyParameterDataToBuffer:offset:"); -_MTL_PRIVATE_DEF_SEL(copyResourceViewsFromPool_sourceRange_destinationIndex_, - "copyResourceViewsFromPool:sourceRange:destinationIndex:"); -_MTL_PRIVATE_DEF_SEL(copyStatusToBuffer_offset_, - "copyStatusToBuffer:offset:"); -_MTL_PRIVATE_DEF_SEL(copyTextureMappingsFromTexture_toTexture_operations_count_, - "copyTextureMappingsFromTexture:toTexture:operations:count:"); -_MTL_PRIVATE_DEF_SEL(count, - "count"); -_MTL_PRIVATE_DEF_SEL(counterSet, - "counterSet"); -_MTL_PRIVATE_DEF_SEL(counterSets, - "counterSets"); -_MTL_PRIVATE_DEF_SEL(counters, - "counters"); -_MTL_PRIVATE_DEF_SEL(cpuCacheMode, - "cpuCacheMode"); -_MTL_PRIVATE_DEF_SEL(currentAllocatedSize, - "currentAllocatedSize"); -_MTL_PRIVATE_DEF_SEL(curveBasis, - "curveBasis"); -_MTL_PRIVATE_DEF_SEL(curveEndCaps, - "curveEndCaps"); -_MTL_PRIVATE_DEF_SEL(curveType, - "curveType"); -_MTL_PRIVATE_DEF_SEL(data, - "data"); -_MTL_PRIVATE_DEF_SEL(dataSize, - "dataSize"); -_MTL_PRIVATE_DEF_SEL(dataType, - "dataType"); -_MTL_PRIVATE_DEF_SEL(dealloc, - "dealloc"); -_MTL_PRIVATE_DEF_SEL(debugLocation, - "debugLocation"); -_MTL_PRIVATE_DEF_SEL(debugSignposts, - "debugSignposts"); -_MTL_PRIVATE_DEF_SEL(defaultCaptureScope, - "defaultCaptureScope"); -_MTL_PRIVATE_DEF_SEL(defaultRasterSampleCount, - "defaultRasterSampleCount"); -_MTL_PRIVATE_DEF_SEL(depth, - "depth"); -_MTL_PRIVATE_DEF_SEL(depthAttachment, - "depthAttachment"); -_MTL_PRIVATE_DEF_SEL(depthAttachmentPixelFormat, - "depthAttachmentPixelFormat"); -_MTL_PRIVATE_DEF_SEL(depthCompareFunction, - "depthCompareFunction"); -_MTL_PRIVATE_DEF_SEL(depthFailureOperation, - "depthFailureOperation"); -_MTL_PRIVATE_DEF_SEL(depthPlane, - "depthPlane"); -_MTL_PRIVATE_DEF_SEL(depthResolveFilter, - "depthResolveFilter"); -_MTL_PRIVATE_DEF_SEL(depthStencilPassOperation, - "depthStencilPassOperation"); -_MTL_PRIVATE_DEF_SEL(descriptor, - "descriptor"); -_MTL_PRIVATE_DEF_SEL(destination, - "destination"); -_MTL_PRIVATE_DEF_SEL(destinationAlphaBlendFactor, - "destinationAlphaBlendFactor"); -_MTL_PRIVATE_DEF_SEL(destinationRGBBlendFactor, - "destinationRGBBlendFactor"); -_MTL_PRIVATE_DEF_SEL(device, - "device"); -_MTL_PRIVATE_DEF_SEL(didModifyRange_, - "didModifyRange:"); -_MTL_PRIVATE_DEF_SEL(dimensions, - "dimensions"); -_MTL_PRIVATE_DEF_SEL(dispatchNetworkWithIntermediatesHeap_, - "dispatchNetworkWithIntermediatesHeap:"); -_MTL_PRIVATE_DEF_SEL(dispatchQueue, - "dispatchQueue"); -_MTL_PRIVATE_DEF_SEL(dispatchThreadgroups_threadsPerThreadgroup_, - "dispatchThreadgroups:threadsPerThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(dispatchThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerThreadgroup_, - "dispatchThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(dispatchThreadgroupsWithIndirectBuffer_threadsPerThreadgroup_, - "dispatchThreadgroupsWithIndirectBuffer:threadsPerThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(dispatchThreads_threadsPerThreadgroup_, - "dispatchThreads:threadsPerThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(dispatchThreadsPerTile_, - "dispatchThreadsPerTile:"); -_MTL_PRIVATE_DEF_SEL(dispatchThreadsWithIndirectBuffer_, - "dispatchThreadsWithIndirectBuffer:"); -_MTL_PRIVATE_DEF_SEL(dispatchType, - "dispatchType"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPatches_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_indirectBuffer_indirectBufferOffset_, - "drawIndexedPatches:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:indirectBuffer:indirectBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance_, - "drawIndexedPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:instanceCount:baseInstance:"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance_tessellationFactorBuffer_tessellationFactorBufferOffset_tessellationFactorBufferInstanceStride_, - "drawIndexedPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:instanceCount:baseInstance:tessellationFactorBuffer:tessellationFactorBufferOffset:tessellationFactorBufferInstanceStride:"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength_, - "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferLength:"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength_instanceCount_, - "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferLength:instanceCount:"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferLength_instanceCount_baseVertex_baseInstance_, - "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferLength:instanceCount:baseVertex:baseInstance:"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_, - "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_, - "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance_, - "drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:baseVertex:baseInstance:"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPrimitives_indexType_indexBuffer_indexBufferLength_indirectBuffer_, - "drawIndexedPrimitives:indexType:indexBuffer:indexBufferLength:indirectBuffer:"); -_MTL_PRIVATE_DEF_SEL(drawIndexedPrimitives_indexType_indexBuffer_indexBufferOffset_indirectBuffer_indirectBufferOffset_, - "drawIndexedPrimitives:indexType:indexBuffer:indexBufferOffset:indirectBuffer:indirectBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_, - "drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(drawMeshThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_, - "drawMeshThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(drawMeshThreadgroupsWithIndirectBuffer_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_, - "drawMeshThreadgroupsWithIndirectBuffer:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_, - "drawMeshThreads:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(drawPatches_patchIndexBuffer_patchIndexBufferOffset_indirectBuffer_indirectBufferOffset_, - "drawPatches:patchIndexBuffer:patchIndexBufferOffset:indirectBuffer:indirectBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance_, - "drawPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance:"); -_MTL_PRIVATE_DEF_SEL(drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance_tessellationFactorBuffer_tessellationFactorBufferOffset_tessellationFactorBufferInstanceStride_, - "drawPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance:tessellationFactorBuffer:tessellationFactorBufferOffset:tessellationFactorBufferInstanceStride:"); -_MTL_PRIVATE_DEF_SEL(drawPrimitives_indirectBuffer_, - "drawPrimitives:indirectBuffer:"); -_MTL_PRIVATE_DEF_SEL(drawPrimitives_indirectBuffer_indirectBufferOffset_, - "drawPrimitives:indirectBuffer:indirectBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(drawPrimitives_vertexStart_vertexCount_, - "drawPrimitives:vertexStart:vertexCount:"); -_MTL_PRIVATE_DEF_SEL(drawPrimitives_vertexStart_vertexCount_instanceCount_, - "drawPrimitives:vertexStart:vertexCount:instanceCount:"); -_MTL_PRIVATE_DEF_SEL(drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance_, - "drawPrimitives:vertexStart:vertexCount:instanceCount:baseInstance:"); -_MTL_PRIVATE_DEF_SEL(drawableID, - "drawableID"); -_MTL_PRIVATE_DEF_SEL(elementArrayType, - "elementArrayType"); -_MTL_PRIVATE_DEF_SEL(elementIsArgumentBuffer, - "elementIsArgumentBuffer"); -_MTL_PRIVATE_DEF_SEL(elementPointerType, - "elementPointerType"); -_MTL_PRIVATE_DEF_SEL(elementStructType, - "elementStructType"); -_MTL_PRIVATE_DEF_SEL(elementTensorReferenceType, - "elementTensorReferenceType"); -_MTL_PRIVATE_DEF_SEL(elementTextureReferenceType, - "elementTextureReferenceType"); -_MTL_PRIVATE_DEF_SEL(elementType, - "elementType"); -_MTL_PRIVATE_DEF_SEL(enableLogging, - "enableLogging"); -_MTL_PRIVATE_DEF_SEL(encodeSignalEvent_value_, - "encodeSignalEvent:value:"); -_MTL_PRIVATE_DEF_SEL(encodeWaitForEvent_value_, - "encodeWaitForEvent:value:"); -_MTL_PRIVATE_DEF_SEL(encodedLength, - "encodedLength"); -_MTL_PRIVATE_DEF_SEL(encoderLabel, - "encoderLabel"); -_MTL_PRIVATE_DEF_SEL(endCommandBuffer, - "endCommandBuffer"); -_MTL_PRIVATE_DEF_SEL(endEncoding, - "endEncoding"); -_MTL_PRIVATE_DEF_SEL(endOfEncoderSampleIndex, - "endOfEncoderSampleIndex"); -_MTL_PRIVATE_DEF_SEL(endOfFragmentSampleIndex, - "endOfFragmentSampleIndex"); -_MTL_PRIVATE_DEF_SEL(endOfVertexSampleIndex, - "endOfVertexSampleIndex"); -_MTL_PRIVATE_DEF_SEL(endResidency, - "endResidency"); -_MTL_PRIVATE_DEF_SEL(enqueue, - "enqueue"); -_MTL_PRIVATE_DEF_SEL(enqueueBarrier, - "enqueueBarrier"); -_MTL_PRIVATE_DEF_SEL(error, - "error"); -_MTL_PRIVATE_DEF_SEL(errorOptions, - "errorOptions"); -_MTL_PRIVATE_DEF_SEL(errorState, - "errorState"); -_MTL_PRIVATE_DEF_SEL(executeCommandsInBuffer_indirectBuffer_, - "executeCommandsInBuffer:indirectBuffer:"); -_MTL_PRIVATE_DEF_SEL(executeCommandsInBuffer_indirectBuffer_indirectBufferOffset_, - "executeCommandsInBuffer:indirectBuffer:indirectBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(executeCommandsInBuffer_withRange_, - "executeCommandsInBuffer:withRange:"); -_MTL_PRIVATE_DEF_SEL(extentAtDimensionIndex_, - "extentAtDimensionIndex:"); -_MTL_PRIVATE_DEF_SEL(fastMathEnabled, - "fastMathEnabled"); -_MTL_PRIVATE_DEF_SEL(feedbackQueue, - "feedbackQueue"); -_MTL_PRIVATE_DEF_SEL(fillBuffer_range_value_, - "fillBuffer:range:value:"); -_MTL_PRIVATE_DEF_SEL(firstMipmapInTail, - "firstMipmapInTail"); -_MTL_PRIVATE_DEF_SEL(format, - "format"); -_MTL_PRIVATE_DEF_SEL(fragmentAdditionalBinaryFunctions, - "fragmentAdditionalBinaryFunctions"); -_MTL_PRIVATE_DEF_SEL(fragmentArguments, - "fragmentArguments"); -_MTL_PRIVATE_DEF_SEL(fragmentBindings, - "fragmentBindings"); -_MTL_PRIVATE_DEF_SEL(fragmentBuffers, - "fragmentBuffers"); -_MTL_PRIVATE_DEF_SEL(fragmentFunction, - "fragmentFunction"); -_MTL_PRIVATE_DEF_SEL(fragmentFunctionDescriptor, - "fragmentFunctionDescriptor"); -_MTL_PRIVATE_DEF_SEL(fragmentLinkedFunctions, - "fragmentLinkedFunctions"); -_MTL_PRIVATE_DEF_SEL(fragmentLinkingDescriptor, - "fragmentLinkingDescriptor"); -_MTL_PRIVATE_DEF_SEL(fragmentPreloadedLibraries, - "fragmentPreloadedLibraries"); -_MTL_PRIVATE_DEF_SEL(fragmentStaticLinkingDescriptor, - "fragmentStaticLinkingDescriptor"); -_MTL_PRIVATE_DEF_SEL(frontFaceStencil, - "frontFaceStencil"); -_MTL_PRIVATE_DEF_SEL(function, - "function"); -_MTL_PRIVATE_DEF_SEL(functionConstantsDictionary, - "functionConstantsDictionary"); -_MTL_PRIVATE_DEF_SEL(functionCount, - "functionCount"); -_MTL_PRIVATE_DEF_SEL(functionDescriptor, - "functionDescriptor"); -_MTL_PRIVATE_DEF_SEL(functionDescriptors, - "functionDescriptors"); -_MTL_PRIVATE_DEF_SEL(functionGraph, - "functionGraph"); -_MTL_PRIVATE_DEF_SEL(functionGraphs, - "functionGraphs"); -_MTL_PRIVATE_DEF_SEL(functionHandleWithBinaryFunction_, - "functionHandleWithBinaryFunction:"); -_MTL_PRIVATE_DEF_SEL(functionHandleWithBinaryFunction_stage_, - "functionHandleWithBinaryFunction:stage:"); -_MTL_PRIVATE_DEF_SEL(functionHandleWithFunction_, - "functionHandleWithFunction:"); -_MTL_PRIVATE_DEF_SEL(functionHandleWithFunction_stage_, - "functionHandleWithFunction:stage:"); -_MTL_PRIVATE_DEF_SEL(functionHandleWithName_, - "functionHandleWithName:"); -_MTL_PRIVATE_DEF_SEL(functionHandleWithName_stage_, - "functionHandleWithName:stage:"); -_MTL_PRIVATE_DEF_SEL(functionName, - "functionName"); -_MTL_PRIVATE_DEF_SEL(functionNames, - "functionNames"); -_MTL_PRIVATE_DEF_SEL(functionType, - "functionType"); -_MTL_PRIVATE_DEF_SEL(functions, - "functions"); -_MTL_PRIVATE_DEF_SEL(generateMipmapsForTexture_, - "generateMipmapsForTexture:"); -_MTL_PRIVATE_DEF_SEL(geometryDescriptors, - "geometryDescriptors"); -_MTL_PRIVATE_DEF_SEL(getBytes_bytesPerRow_bytesPerImage_fromRegion_mipmapLevel_slice_, - "getBytes:bytesPerRow:bytesPerImage:fromRegion:mipmapLevel:slice:"); -_MTL_PRIVATE_DEF_SEL(getBytes_bytesPerRow_fromRegion_mipmapLevel_, - "getBytes:bytesPerRow:fromRegion:mipmapLevel:"); -_MTL_PRIVATE_DEF_SEL(getBytes_strides_fromSliceOrigin_sliceDimensions_, - "getBytes:strides:fromSliceOrigin:sliceDimensions:"); -_MTL_PRIVATE_DEF_SEL(getDefaultSamplePositions_count_, - "getDefaultSamplePositions:count:"); -_MTL_PRIVATE_DEF_SEL(getPhysicalIndexForLogicalIndex_, - "getPhysicalIndexForLogicalIndex:"); -_MTL_PRIVATE_DEF_SEL(getSamplePositions_count_, - "getSamplePositions:count:"); -_MTL_PRIVATE_DEF_SEL(getTextureAccessCounters_region_mipLevel_slice_resetCounters_countersBuffer_countersBufferOffset_, - "getTextureAccessCounters:region:mipLevel:slice:resetCounters:countersBuffer:countersBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(gpuAddress, - "gpuAddress"); -_MTL_PRIVATE_DEF_SEL(gpuResourceID, - "gpuResourceID"); -_MTL_PRIVATE_DEF_SEL(groups, - "groups"); -_MTL_PRIVATE_DEF_SEL(hasUnifiedMemory, - "hasUnifiedMemory"); -_MTL_PRIVATE_DEF_SEL(hazardTrackingMode, - "hazardTrackingMode"); -_MTL_PRIVATE_DEF_SEL(heap, - "heap"); -_MTL_PRIVATE_DEF_SEL(heapAccelerationStructureSizeAndAlignWithDescriptor_, - "heapAccelerationStructureSizeAndAlignWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(heapAccelerationStructureSizeAndAlignWithSize_, - "heapAccelerationStructureSizeAndAlignWithSize:"); -_MTL_PRIVATE_DEF_SEL(heapBufferSizeAndAlignWithLength_options_, - "heapBufferSizeAndAlignWithLength:options:"); -_MTL_PRIVATE_DEF_SEL(heapOffset, - "heapOffset"); -_MTL_PRIVATE_DEF_SEL(heapTextureSizeAndAlignWithDescriptor_, - "heapTextureSizeAndAlignWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(height, - "height"); -_MTL_PRIVATE_DEF_SEL(horizontal, - "horizontal"); -_MTL_PRIVATE_DEF_SEL(horizontalSampleStorage, - "horizontalSampleStorage"); -_MTL_PRIVATE_DEF_SEL(imageblockMemoryLengthForDimensions_, - "imageblockMemoryLengthForDimensions:"); -_MTL_PRIVATE_DEF_SEL(imageblockSampleLength, - "imageblockSampleLength"); -_MTL_PRIVATE_DEF_SEL(index, - "index"); -_MTL_PRIVATE_DEF_SEL(indexBuffer, - "indexBuffer"); -_MTL_PRIVATE_DEF_SEL(indexBufferIndex, - "indexBufferIndex"); -_MTL_PRIVATE_DEF_SEL(indexBufferOffset, - "indexBufferOffset"); -_MTL_PRIVATE_DEF_SEL(indexType, - "indexType"); -_MTL_PRIVATE_DEF_SEL(indirectComputeCommandAtIndex_, - "indirectComputeCommandAtIndex:"); -_MTL_PRIVATE_DEF_SEL(indirectRenderCommandAtIndex_, - "indirectRenderCommandAtIndex:"); -_MTL_PRIVATE_DEF_SEL(inheritBuffers, - "inheritBuffers"); -_MTL_PRIVATE_DEF_SEL(inheritCullMode, - "inheritCullMode"); -_MTL_PRIVATE_DEF_SEL(inheritDepthBias, - "inheritDepthBias"); -_MTL_PRIVATE_DEF_SEL(inheritDepthClipMode, - "inheritDepthClipMode"); -_MTL_PRIVATE_DEF_SEL(inheritDepthStencilState, - "inheritDepthStencilState"); -_MTL_PRIVATE_DEF_SEL(inheritFrontFacingWinding, - "inheritFrontFacingWinding"); -_MTL_PRIVATE_DEF_SEL(inheritPipelineState, - "inheritPipelineState"); -_MTL_PRIVATE_DEF_SEL(inheritTriangleFillMode, - "inheritTriangleFillMode"); -_MTL_PRIVATE_DEF_SEL(init, - "init"); -_MTL_PRIVATE_DEF_SEL(initWithArgumentIndex_, - "initWithArgumentIndex:"); -_MTL_PRIVATE_DEF_SEL(initWithDispatchQueue_, - "initWithDispatchQueue:"); -_MTL_PRIVATE_DEF_SEL(initWithFunctionName_nodes_outputNode_attributes_, - "initWithFunctionName:nodes:outputNode:attributes:"); -_MTL_PRIVATE_DEF_SEL(initWithName_arguments_controlDependencies_, - "initWithName:arguments:controlDependencies:"); -_MTL_PRIVATE_DEF_SEL(initWithRank_values_, - "initWithRank:values:"); -_MTL_PRIVATE_DEF_SEL(initWithSampleCount_, - "initWithSampleCount:"); -_MTL_PRIVATE_DEF_SEL(initWithSampleCount_horizontal_vertical_, - "initWithSampleCount:horizontal:vertical:"); -_MTL_PRIVATE_DEF_SEL(initialCapacity, - "initialCapacity"); -_MTL_PRIVATE_DEF_SEL(initializeBindings, - "initializeBindings"); -_MTL_PRIVATE_DEF_SEL(inputDimensionsAtBufferIndex_, - "inputDimensionsAtBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(inputPrimitiveTopology, - "inputPrimitiveTopology"); -_MTL_PRIVATE_DEF_SEL(insertDebugCaptureBoundary, - "insertDebugCaptureBoundary"); -_MTL_PRIVATE_DEF_SEL(insertDebugSignpost_, - "insertDebugSignpost:"); -_MTL_PRIVATE_DEF_SEL(insertLibraries, - "insertLibraries"); -_MTL_PRIVATE_DEF_SEL(installName, - "installName"); -_MTL_PRIVATE_DEF_SEL(instanceCount, - "instanceCount"); -_MTL_PRIVATE_DEF_SEL(instanceCountBuffer, - "instanceCountBuffer"); -_MTL_PRIVATE_DEF_SEL(instanceCountBufferOffset, - "instanceCountBufferOffset"); -_MTL_PRIVATE_DEF_SEL(instanceDescriptorBuffer, - "instanceDescriptorBuffer"); -_MTL_PRIVATE_DEF_SEL(instanceDescriptorBufferOffset, - "instanceDescriptorBufferOffset"); -_MTL_PRIVATE_DEF_SEL(instanceDescriptorStride, - "instanceDescriptorStride"); -_MTL_PRIVATE_DEF_SEL(instanceDescriptorType, - "instanceDescriptorType"); -_MTL_PRIVATE_DEF_SEL(instanceTransformationMatrixLayout, - "instanceTransformationMatrixLayout"); -_MTL_PRIVATE_DEF_SEL(instancedAccelerationStructures, - "instancedAccelerationStructures"); -_MTL_PRIVATE_DEF_SEL(intermediatesHeapSize, - "intermediatesHeapSize"); -_MTL_PRIVATE_DEF_SEL(intersectionFunctionTableDescriptor, - "intersectionFunctionTableDescriptor"); -_MTL_PRIVATE_DEF_SEL(intersectionFunctionTableOffset, - "intersectionFunctionTableOffset"); -_MTL_PRIVATE_DEF_SEL(invalidateCounterRange_, - "invalidateCounterRange:"); -_MTL_PRIVATE_DEF_SEL(iosurface, - "iosurface"); -_MTL_PRIVATE_DEF_SEL(iosurfacePlane, - "iosurfacePlane"); -_MTL_PRIVATE_DEF_SEL(isActive, - "isActive"); -_MTL_PRIVATE_DEF_SEL(isAliasable, - "isAliasable"); -_MTL_PRIVATE_DEF_SEL(isAlphaToCoverageEnabled, - "isAlphaToCoverageEnabled"); -_MTL_PRIVATE_DEF_SEL(isAlphaToOneEnabled, - "isAlphaToOneEnabled"); -_MTL_PRIVATE_DEF_SEL(isArgument, - "isArgument"); -_MTL_PRIVATE_DEF_SEL(isBlendingEnabled, - "isBlendingEnabled"); -_MTL_PRIVATE_DEF_SEL(isCapturing, - "isCapturing"); -_MTL_PRIVATE_DEF_SEL(isDepth24Stencil8PixelFormatSupported, - "isDepth24Stencil8PixelFormatSupported"); -_MTL_PRIVATE_DEF_SEL(isDepthTexture, - "isDepthTexture"); -_MTL_PRIVATE_DEF_SEL(isDepthWriteEnabled, - "isDepthWriteEnabled"); -_MTL_PRIVATE_DEF_SEL(isFramebufferOnly, - "isFramebufferOnly"); -_MTL_PRIVATE_DEF_SEL(isHeadless, - "isHeadless"); -_MTL_PRIVATE_DEF_SEL(isLowPower, - "isLowPower"); -_MTL_PRIVATE_DEF_SEL(isPatchControlPointData, - "isPatchControlPointData"); -_MTL_PRIVATE_DEF_SEL(isPatchData, - "isPatchData"); -_MTL_PRIVATE_DEF_SEL(isRasterizationEnabled, - "isRasterizationEnabled"); -_MTL_PRIVATE_DEF_SEL(isRemovable, - "isRemovable"); -_MTL_PRIVATE_DEF_SEL(isShareable, - "isShareable"); -_MTL_PRIVATE_DEF_SEL(isSparse, - "isSparse"); -_MTL_PRIVATE_DEF_SEL(isTessellationFactorScaleEnabled, - "isTessellationFactorScaleEnabled"); -_MTL_PRIVATE_DEF_SEL(isUsed, - "isUsed"); -_MTL_PRIVATE_DEF_SEL(kernelEndTime, - "kernelEndTime"); -_MTL_PRIVATE_DEF_SEL(kernelStartTime, - "kernelStartTime"); -_MTL_PRIVATE_DEF_SEL(label, - "label"); -_MTL_PRIVATE_DEF_SEL(languageVersion, - "languageVersion"); -_MTL_PRIVATE_DEF_SEL(layerAtIndex_, - "layerAtIndex:"); -_MTL_PRIVATE_DEF_SEL(layerCount, - "layerCount"); -_MTL_PRIVATE_DEF_SEL(layers, - "layers"); -_MTL_PRIVATE_DEF_SEL(layouts, - "layouts"); -_MTL_PRIVATE_DEF_SEL(length, - "length"); -_MTL_PRIVATE_DEF_SEL(level, - "level"); -_MTL_PRIVATE_DEF_SEL(levelRange, - "levelRange"); -_MTL_PRIVATE_DEF_SEL(libraries, - "libraries"); -_MTL_PRIVATE_DEF_SEL(library, - "library"); -_MTL_PRIVATE_DEF_SEL(libraryType, - "libraryType"); -_MTL_PRIVATE_DEF_SEL(line, - "line"); -_MTL_PRIVATE_DEF_SEL(linkedFunctions, - "linkedFunctions"); -_MTL_PRIVATE_DEF_SEL(loadAction, - "loadAction"); -_MTL_PRIVATE_DEF_SEL(loadBuffer_offset_size_sourceHandle_sourceHandleOffset_, - "loadBuffer:offset:size:sourceHandle:sourceHandleOffset:"); -_MTL_PRIVATE_DEF_SEL(loadBytes_size_sourceHandle_sourceHandleOffset_, - "loadBytes:size:sourceHandle:sourceHandleOffset:"); -_MTL_PRIVATE_DEF_SEL(loadTexture_slice_level_size_sourceBytesPerRow_sourceBytesPerImage_destinationOrigin_sourceHandle_sourceHandleOffset_, - "loadTexture:slice:level:size:sourceBytesPerRow:sourceBytesPerImage:destinationOrigin:sourceHandle:sourceHandleOffset:"); -_MTL_PRIVATE_DEF_SEL(location, - "location"); -_MTL_PRIVATE_DEF_SEL(locationNumber, - "locationNumber"); -_MTL_PRIVATE_DEF_SEL(lodAverage, - "lodAverage"); -_MTL_PRIVATE_DEF_SEL(lodBias, - "lodBias"); -_MTL_PRIVATE_DEF_SEL(lodMaxClamp, - "lodMaxClamp"); -_MTL_PRIVATE_DEF_SEL(lodMinClamp, - "lodMinClamp"); -_MTL_PRIVATE_DEF_SEL(logState, - "logState"); -_MTL_PRIVATE_DEF_SEL(logs, - "logs"); -_MTL_PRIVATE_DEF_SEL(lookupArchives, - "lookupArchives"); -_MTL_PRIVATE_DEF_SEL(machineLearningCommandEncoder, - "machineLearningCommandEncoder"); -_MTL_PRIVATE_DEF_SEL(machineLearningFunctionDescriptor, - "machineLearningFunctionDescriptor"); -_MTL_PRIVATE_DEF_SEL(magFilter, - "magFilter"); -_MTL_PRIVATE_DEF_SEL(makeAliasable, - "makeAliasable"); -_MTL_PRIVATE_DEF_SEL(mapPhysicalToScreenCoordinates_forLayer_, - "mapPhysicalToScreenCoordinates:forLayer:"); -_MTL_PRIVATE_DEF_SEL(mapScreenToPhysicalCoordinates_forLayer_, - "mapScreenToPhysicalCoordinates:forLayer:"); -_MTL_PRIVATE_DEF_SEL(mathFloatingPointFunctions, - "mathFloatingPointFunctions"); -_MTL_PRIVATE_DEF_SEL(mathMode, - "mathMode"); -_MTL_PRIVATE_DEF_SEL(maxAnisotropy, - "maxAnisotropy"); -_MTL_PRIVATE_DEF_SEL(maxArgumentBufferSamplerCount, - "maxArgumentBufferSamplerCount"); -_MTL_PRIVATE_DEF_SEL(maxAvailableSizeWithAlignment_, - "maxAvailableSizeWithAlignment:"); -_MTL_PRIVATE_DEF_SEL(maxBufferBindCount, - "maxBufferBindCount"); -_MTL_PRIVATE_DEF_SEL(maxBufferLength, - "maxBufferLength"); -_MTL_PRIVATE_DEF_SEL(maxCallStackDepth, - "maxCallStackDepth"); -_MTL_PRIVATE_DEF_SEL(maxCommandBufferCount, - "maxCommandBufferCount"); -_MTL_PRIVATE_DEF_SEL(maxCommandsInFlight, - "maxCommandsInFlight"); -_MTL_PRIVATE_DEF_SEL(maxCompatiblePlacementSparsePageSize, - "maxCompatiblePlacementSparsePageSize"); -_MTL_PRIVATE_DEF_SEL(maxFragmentBufferBindCount, - "maxFragmentBufferBindCount"); -_MTL_PRIVATE_DEF_SEL(maxFragmentCallStackDepth, - "maxFragmentCallStackDepth"); -_MTL_PRIVATE_DEF_SEL(maxInstanceCount, - "maxInstanceCount"); -_MTL_PRIVATE_DEF_SEL(maxKernelBufferBindCount, - "maxKernelBufferBindCount"); -_MTL_PRIVATE_DEF_SEL(maxKernelThreadgroupMemoryBindCount, - "maxKernelThreadgroupMemoryBindCount"); -_MTL_PRIVATE_DEF_SEL(maxMeshBufferBindCount, - "maxMeshBufferBindCount"); -_MTL_PRIVATE_DEF_SEL(maxMotionTransformCount, - "maxMotionTransformCount"); -_MTL_PRIVATE_DEF_SEL(maxObjectBufferBindCount, - "maxObjectBufferBindCount"); -_MTL_PRIVATE_DEF_SEL(maxObjectThreadgroupMemoryBindCount, - "maxObjectThreadgroupMemoryBindCount"); -_MTL_PRIVATE_DEF_SEL(maxSampleCount, - "maxSampleCount"); -_MTL_PRIVATE_DEF_SEL(maxSamplerStateBindCount, - "maxSamplerStateBindCount"); -_MTL_PRIVATE_DEF_SEL(maxTessellationFactor, - "maxTessellationFactor"); -_MTL_PRIVATE_DEF_SEL(maxTextureBindCount, - "maxTextureBindCount"); -_MTL_PRIVATE_DEF_SEL(maxThreadgroupMemoryLength, - "maxThreadgroupMemoryLength"); -_MTL_PRIVATE_DEF_SEL(maxThreadsPerThreadgroup, - "maxThreadsPerThreadgroup"); -_MTL_PRIVATE_DEF_SEL(maxTotalThreadgroupsPerMeshGrid, - "maxTotalThreadgroupsPerMeshGrid"); -_MTL_PRIVATE_DEF_SEL(maxTotalThreadsPerMeshThreadgroup, - "maxTotalThreadsPerMeshThreadgroup"); -_MTL_PRIVATE_DEF_SEL(maxTotalThreadsPerObjectThreadgroup, - "maxTotalThreadsPerObjectThreadgroup"); -_MTL_PRIVATE_DEF_SEL(maxTotalThreadsPerThreadgroup, - "maxTotalThreadsPerThreadgroup"); -_MTL_PRIVATE_DEF_SEL(maxTransferRate, - "maxTransferRate"); -_MTL_PRIVATE_DEF_SEL(maxVertexAmplificationCount, - "maxVertexAmplificationCount"); -_MTL_PRIVATE_DEF_SEL(maxVertexBufferBindCount, - "maxVertexBufferBindCount"); -_MTL_PRIVATE_DEF_SEL(maxVertexCallStackDepth, - "maxVertexCallStackDepth"); -_MTL_PRIVATE_DEF_SEL(maximumConcurrentCompilationTaskCount, - "maximumConcurrentCompilationTaskCount"); -_MTL_PRIVATE_DEF_SEL(memberByName_, - "memberByName:"); -_MTL_PRIVATE_DEF_SEL(members, - "members"); -_MTL_PRIVATE_DEF_SEL(memoryBarrierWithResources_count_, - "memoryBarrierWithResources:count:"); -_MTL_PRIVATE_DEF_SEL(memoryBarrierWithResources_count_afterStages_beforeStages_, - "memoryBarrierWithResources:count:afterStages:beforeStages:"); -_MTL_PRIVATE_DEF_SEL(memoryBarrierWithScope_, - "memoryBarrierWithScope:"); -_MTL_PRIVATE_DEF_SEL(memoryBarrierWithScope_afterStages_beforeStages_, - "memoryBarrierWithScope:afterStages:beforeStages:"); -_MTL_PRIVATE_DEF_SEL(meshAdditionalBinaryFunctions, - "meshAdditionalBinaryFunctions"); -_MTL_PRIVATE_DEF_SEL(meshBindings, - "meshBindings"); -_MTL_PRIVATE_DEF_SEL(meshBuffers, - "meshBuffers"); -_MTL_PRIVATE_DEF_SEL(meshFunction, - "meshFunction"); -_MTL_PRIVATE_DEF_SEL(meshFunctionDescriptor, - "meshFunctionDescriptor"); -_MTL_PRIVATE_DEF_SEL(meshLinkedFunctions, - "meshLinkedFunctions"); -_MTL_PRIVATE_DEF_SEL(meshLinkingDescriptor, - "meshLinkingDescriptor"); -_MTL_PRIVATE_DEF_SEL(meshStaticLinkingDescriptor, - "meshStaticLinkingDescriptor"); -_MTL_PRIVATE_DEF_SEL(meshThreadExecutionWidth, - "meshThreadExecutionWidth"); -_MTL_PRIVATE_DEF_SEL(meshThreadgroupSizeIsMultipleOfThreadExecutionWidth, - "meshThreadgroupSizeIsMultipleOfThreadExecutionWidth"); -_MTL_PRIVATE_DEF_SEL(minFilter, - "minFilter"); -_MTL_PRIVATE_DEF_SEL(minimumLinearTextureAlignmentForPixelFormat_, - "minimumLinearTextureAlignmentForPixelFormat:"); -_MTL_PRIVATE_DEF_SEL(minimumTextureBufferAlignmentForPixelFormat_, - "minimumTextureBufferAlignmentForPixelFormat:"); -_MTL_PRIVATE_DEF_SEL(mipFilter, - "mipFilter"); -_MTL_PRIVATE_DEF_SEL(mipmapLevelCount, - "mipmapLevelCount"); -_MTL_PRIVATE_DEF_SEL(motionEndBorderMode, - "motionEndBorderMode"); -_MTL_PRIVATE_DEF_SEL(motionEndTime, - "motionEndTime"); -_MTL_PRIVATE_DEF_SEL(motionKeyframeCount, - "motionKeyframeCount"); -_MTL_PRIVATE_DEF_SEL(motionStartBorderMode, - "motionStartBorderMode"); -_MTL_PRIVATE_DEF_SEL(motionStartTime, - "motionStartTime"); -_MTL_PRIVATE_DEF_SEL(motionTransformBuffer, - "motionTransformBuffer"); -_MTL_PRIVATE_DEF_SEL(motionTransformBufferOffset, - "motionTransformBufferOffset"); -_MTL_PRIVATE_DEF_SEL(motionTransformCount, - "motionTransformCount"); -_MTL_PRIVATE_DEF_SEL(motionTransformCountBuffer, - "motionTransformCountBuffer"); -_MTL_PRIVATE_DEF_SEL(motionTransformCountBufferOffset, - "motionTransformCountBufferOffset"); -_MTL_PRIVATE_DEF_SEL(motionTransformStride, - "motionTransformStride"); -_MTL_PRIVATE_DEF_SEL(motionTransformType, - "motionTransformType"); -_MTL_PRIVATE_DEF_SEL(moveTextureMappingsFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_, - "moveTextureMappingsFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:"); -_MTL_PRIVATE_DEF_SEL(mutability, - "mutability"); -_MTL_PRIVATE_DEF_SEL(name, - "name"); -_MTL_PRIVATE_DEF_SEL(newAccelerationStructureWithDescriptor_, - "newAccelerationStructureWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newAccelerationStructureWithDescriptor_offset_, - "newAccelerationStructureWithDescriptor:offset:"); -_MTL_PRIVATE_DEF_SEL(newAccelerationStructureWithSize_, - "newAccelerationStructureWithSize:"); -_MTL_PRIVATE_DEF_SEL(newAccelerationStructureWithSize_offset_, - "newAccelerationStructureWithSize:offset:"); -_MTL_PRIVATE_DEF_SEL(newArchiveWithURL_error_, - "newArchiveWithURL:error:"); -_MTL_PRIVATE_DEF_SEL(newArgumentEncoderForBufferAtIndex_, - "newArgumentEncoderForBufferAtIndex:"); -_MTL_PRIVATE_DEF_SEL(newArgumentEncoderWithArguments_, - "newArgumentEncoderWithArguments:"); -_MTL_PRIVATE_DEF_SEL(newArgumentEncoderWithBufferBinding_, - "newArgumentEncoderWithBufferBinding:"); -_MTL_PRIVATE_DEF_SEL(newArgumentEncoderWithBufferIndex_, - "newArgumentEncoderWithBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(newArgumentEncoderWithBufferIndex_reflection_, - "newArgumentEncoderWithBufferIndex:reflection:"); -_MTL_PRIVATE_DEF_SEL(newArgumentTableWithDescriptor_error_, - "newArgumentTableWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newBinaryArchiveWithDescriptor_error_, - "newBinaryArchiveWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newBinaryFunctionWithDescriptor_compilerTaskOptions_completionHandler_, - "newBinaryFunctionWithDescriptor:compilerTaskOptions:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newBinaryFunctionWithDescriptor_compilerTaskOptions_error_, - "newBinaryFunctionWithDescriptor:compilerTaskOptions:error:"); -_MTL_PRIVATE_DEF_SEL(newBinaryFunctionWithDescriptor_error_, - "newBinaryFunctionWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newBufferWithBytes_length_options_, - "newBufferWithBytes:length:options:"); -_MTL_PRIVATE_DEF_SEL(newBufferWithBytesNoCopy_length_options_deallocator_, - "newBufferWithBytesNoCopy:length:options:deallocator:"); -_MTL_PRIVATE_DEF_SEL(newBufferWithLength_options_, - "newBufferWithLength:options:"); -_MTL_PRIVATE_DEF_SEL(newBufferWithLength_options_offset_, - "newBufferWithLength:options:offset:"); -_MTL_PRIVATE_DEF_SEL(newBufferWithLength_options_placementSparsePageSize_, - "newBufferWithLength:options:placementSparsePageSize:"); -_MTL_PRIVATE_DEF_SEL(newCaptureScopeWithCommandQueue_, - "newCaptureScopeWithCommandQueue:"); -_MTL_PRIVATE_DEF_SEL(newCaptureScopeWithDevice_, - "newCaptureScopeWithDevice:"); -_MTL_PRIVATE_DEF_SEL(newCaptureScopeWithMTL4CommandQueue_, - "newCaptureScopeWithMTL4CommandQueue:"); -_MTL_PRIVATE_DEF_SEL(newCommandAllocator, - "newCommandAllocator"); -_MTL_PRIVATE_DEF_SEL(newCommandAllocatorWithDescriptor_error_, - "newCommandAllocatorWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newCommandBuffer, - "newCommandBuffer"); -_MTL_PRIVATE_DEF_SEL(newCommandQueue, - "newCommandQueue"); -_MTL_PRIVATE_DEF_SEL(newCommandQueueWithDescriptor_, - "newCommandQueueWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newCommandQueueWithMaxCommandBufferCount_, - "newCommandQueueWithMaxCommandBufferCount:"); -_MTL_PRIVATE_DEF_SEL(newCompilerWithDescriptor_error_, - "newCompilerWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithAdditionalBinaryFunctions_error_, - "newComputePipelineStateWithAdditionalBinaryFunctions:error:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithBinaryFunctions_error_, - "newComputePipelineStateWithBinaryFunctions:error:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithDescriptor_compilerTaskOptions_completionHandler_, - "newComputePipelineStateWithDescriptor:compilerTaskOptions:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithDescriptor_compilerTaskOptions_error_, - "newComputePipelineStateWithDescriptor:compilerTaskOptions:error:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_completionHandler_, - "newComputePipelineStateWithDescriptor:dynamicLinkingDescriptor:compilerTaskOptions:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_error_, - "newComputePipelineStateWithDescriptor:dynamicLinkingDescriptor:compilerTaskOptions:error:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithDescriptor_dynamicLinkingDescriptor_error_, - "newComputePipelineStateWithDescriptor:dynamicLinkingDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithDescriptor_error_, - "newComputePipelineStateWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithDescriptor_options_completionHandler_, - "newComputePipelineStateWithDescriptor:options:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithDescriptor_options_reflection_error_, - "newComputePipelineStateWithDescriptor:options:reflection:error:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithFunction_completionHandler_, - "newComputePipelineStateWithFunction:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithFunction_error_, - "newComputePipelineStateWithFunction:error:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithFunction_options_completionHandler_, - "newComputePipelineStateWithFunction:options:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newComputePipelineStateWithFunction_options_reflection_error_, - "newComputePipelineStateWithFunction:options:reflection:error:"); -_MTL_PRIVATE_DEF_SEL(newCounterHeapWithDescriptor_error_, - "newCounterHeapWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newCounterSampleBufferWithDescriptor_error_, - "newCounterSampleBufferWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newDefaultLibrary, - "newDefaultLibrary"); -_MTL_PRIVATE_DEF_SEL(newDefaultLibraryWithBundle_error_, - "newDefaultLibraryWithBundle:error:"); -_MTL_PRIVATE_DEF_SEL(newDepthStencilStateWithDescriptor_, - "newDepthStencilStateWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newDynamicLibrary_completionHandler_, - "newDynamicLibrary:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newDynamicLibrary_error_, - "newDynamicLibrary:error:"); -_MTL_PRIVATE_DEF_SEL(newDynamicLibraryWithURL_completionHandler_, - "newDynamicLibraryWithURL:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newDynamicLibraryWithURL_error_, - "newDynamicLibraryWithURL:error:"); -_MTL_PRIVATE_DEF_SEL(newEvent, - "newEvent"); -_MTL_PRIVATE_DEF_SEL(newFence, - "newFence"); -_MTL_PRIVATE_DEF_SEL(newFunctionWithDescriptor_completionHandler_, - "newFunctionWithDescriptor:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newFunctionWithDescriptor_error_, - "newFunctionWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newFunctionWithName_, - "newFunctionWithName:"); -_MTL_PRIVATE_DEF_SEL(newFunctionWithName_constantValues_completionHandler_, - "newFunctionWithName:constantValues:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newFunctionWithName_constantValues_error_, - "newFunctionWithName:constantValues:error:"); -_MTL_PRIVATE_DEF_SEL(newHeapWithDescriptor_, - "newHeapWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newIOCommandQueueWithDescriptor_error_, - "newIOCommandQueueWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newIOFileHandleWithURL_compressionMethod_error_, - "newIOFileHandleWithURL:compressionMethod:error:"); -_MTL_PRIVATE_DEF_SEL(newIOFileHandleWithURL_error_, - "newIOFileHandleWithURL:error:"); -_MTL_PRIVATE_DEF_SEL(newIOHandleWithURL_compressionMethod_error_, - "newIOHandleWithURL:compressionMethod:error:"); -_MTL_PRIVATE_DEF_SEL(newIOHandleWithURL_error_, - "newIOHandleWithURL:error:"); -_MTL_PRIVATE_DEF_SEL(newIndirectCommandBufferWithDescriptor_maxCommandCount_options_, - "newIndirectCommandBufferWithDescriptor:maxCommandCount:options:"); -_MTL_PRIVATE_DEF_SEL(newIntersectionFunctionTableWithDescriptor_, - "newIntersectionFunctionTableWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newIntersectionFunctionTableWithDescriptor_stage_, - "newIntersectionFunctionTableWithDescriptor:stage:"); -_MTL_PRIVATE_DEF_SEL(newIntersectionFunctionWithDescriptor_completionHandler_, - "newIntersectionFunctionWithDescriptor:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newIntersectionFunctionWithDescriptor_error_, - "newIntersectionFunctionWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newLibraryWithData_error_, - "newLibraryWithData:error:"); -_MTL_PRIVATE_DEF_SEL(newLibraryWithDescriptor_completionHandler_, - "newLibraryWithDescriptor:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newLibraryWithDescriptor_error_, - "newLibraryWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newLibraryWithFile_error_, - "newLibraryWithFile:error:"); -_MTL_PRIVATE_DEF_SEL(newLibraryWithSource_options_completionHandler_, - "newLibraryWithSource:options:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newLibraryWithSource_options_error_, - "newLibraryWithSource:options:error:"); -_MTL_PRIVATE_DEF_SEL(newLibraryWithStitchedDescriptor_completionHandler_, - "newLibraryWithStitchedDescriptor:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newLibraryWithStitchedDescriptor_error_, - "newLibraryWithStitchedDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newLibraryWithURL_error_, - "newLibraryWithURL:error:"); -_MTL_PRIVATE_DEF_SEL(newLogStateWithDescriptor_error_, - "newLogStateWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newMTL4CommandQueue, - "newMTL4CommandQueue"); -_MTL_PRIVATE_DEF_SEL(newMTL4CommandQueueWithDescriptor_error_, - "newMTL4CommandQueueWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newMachineLearningPipelineStateWithDescriptor_completionHandler_, - "newMachineLearningPipelineStateWithDescriptor:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newMachineLearningPipelineStateWithDescriptor_error_, - "newMachineLearningPipelineStateWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newPipelineDataSetSerializerWithDescriptor_, - "newPipelineDataSetSerializerWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newRasterizationRateMapWithDescriptor_, - "newRasterizationRateMapWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newRemoteBufferViewForDevice_, - "newRemoteBufferViewForDevice:"); -_MTL_PRIVATE_DEF_SEL(newRemoteTextureViewForDevice_, - "newRemoteTextureViewForDevice:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineDescriptorForSpecialization, - "newRenderPipelineDescriptorForSpecialization"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateBySpecializationWithDescriptor_pipeline_completionHandler_, - "newRenderPipelineStateBySpecializationWithDescriptor:pipeline:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateBySpecializationWithDescriptor_pipeline_error_, - "newRenderPipelineStateBySpecializationWithDescriptor:pipeline:error:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithAdditionalBinaryFunctions_error_, - "newRenderPipelineStateWithAdditionalBinaryFunctions:error:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithBinaryFunctions_error_, - "newRenderPipelineStateWithBinaryFunctions:error:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithDescriptor_compilerTaskOptions_completionHandler_, - "newRenderPipelineStateWithDescriptor:compilerTaskOptions:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithDescriptor_compilerTaskOptions_error_, - "newRenderPipelineStateWithDescriptor:compilerTaskOptions:error:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithDescriptor_completionHandler_, - "newRenderPipelineStateWithDescriptor:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_completionHandler_, - "newRenderPipelineStateWithDescriptor:dynamicLinkingDescriptor:compilerTaskOptions:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_compilerTaskOptions_error_, - "newRenderPipelineStateWithDescriptor:dynamicLinkingDescriptor:compilerTaskOptions:error:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithDescriptor_dynamicLinkingDescriptor_error_, - "newRenderPipelineStateWithDescriptor:dynamicLinkingDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithDescriptor_error_, - "newRenderPipelineStateWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithDescriptor_options_completionHandler_, - "newRenderPipelineStateWithDescriptor:options:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithDescriptor_options_reflection_error_, - "newRenderPipelineStateWithDescriptor:options:reflection:error:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithMeshDescriptor_options_completionHandler_, - "newRenderPipelineStateWithMeshDescriptor:options:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithMeshDescriptor_options_reflection_error_, - "newRenderPipelineStateWithMeshDescriptor:options:reflection:error:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithTileDescriptor_options_completionHandler_, - "newRenderPipelineStateWithTileDescriptor:options:completionHandler:"); -_MTL_PRIVATE_DEF_SEL(newRenderPipelineStateWithTileDescriptor_options_reflection_error_, - "newRenderPipelineStateWithTileDescriptor:options:reflection:error:"); -_MTL_PRIVATE_DEF_SEL(newResidencySetWithDescriptor_error_, - "newResidencySetWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newSamplerStateWithDescriptor_, - "newSamplerStateWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newScratchBufferWithMinimumSize_, - "newScratchBufferWithMinimumSize:"); -_MTL_PRIVATE_DEF_SEL(newSharedEvent, - "newSharedEvent"); -_MTL_PRIVATE_DEF_SEL(newSharedEventHandle, - "newSharedEventHandle"); -_MTL_PRIVATE_DEF_SEL(newSharedEventWithHandle_, - "newSharedEventWithHandle:"); -_MTL_PRIVATE_DEF_SEL(newSharedTextureHandle, - "newSharedTextureHandle"); -_MTL_PRIVATE_DEF_SEL(newSharedTextureWithDescriptor_, - "newSharedTextureWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newSharedTextureWithHandle_, - "newSharedTextureWithHandle:"); -_MTL_PRIVATE_DEF_SEL(newTensorWithDescriptor_error_, - "newTensorWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newTensorWithDescriptor_offset_error_, - "newTensorWithDescriptor:offset:error:"); -_MTL_PRIVATE_DEF_SEL(newTextureViewPoolWithDescriptor_error_, - "newTextureViewPoolWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(newTextureViewWithDescriptor_, - "newTextureViewWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newTextureViewWithPixelFormat_, - "newTextureViewWithPixelFormat:"); -_MTL_PRIVATE_DEF_SEL(newTextureViewWithPixelFormat_textureType_levels_slices_, - "newTextureViewWithPixelFormat:textureType:levels:slices:"); -_MTL_PRIVATE_DEF_SEL(newTextureViewWithPixelFormat_textureType_levels_slices_swizzle_, - "newTextureViewWithPixelFormat:textureType:levels:slices:swizzle:"); -_MTL_PRIVATE_DEF_SEL(newTextureWithDescriptor_, - "newTextureWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newTextureWithDescriptor_iosurface_plane_, - "newTextureWithDescriptor:iosurface:plane:"); -_MTL_PRIVATE_DEF_SEL(newTextureWithDescriptor_offset_, - "newTextureWithDescriptor:offset:"); -_MTL_PRIVATE_DEF_SEL(newTextureWithDescriptor_offset_bytesPerRow_, - "newTextureWithDescriptor:offset:bytesPerRow:"); -_MTL_PRIVATE_DEF_SEL(newVisibleFunctionTableWithDescriptor_, - "newVisibleFunctionTableWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(newVisibleFunctionTableWithDescriptor_stage_, - "newVisibleFunctionTableWithDescriptor:stage:"); -_MTL_PRIVATE_DEF_SEL(nodes, - "nodes"); -_MTL_PRIVATE_DEF_SEL(normalizedCoordinates, - "normalizedCoordinates"); -_MTL_PRIVATE_DEF_SEL(notifyListener_atValue_block_, - "notifyListener:atValue:block:"); -_MTL_PRIVATE_DEF_SEL(objectAdditionalBinaryFunctions, - "objectAdditionalBinaryFunctions"); -_MTL_PRIVATE_DEF_SEL(objectAtIndexedSubscript_, - "objectAtIndexedSubscript:"); -_MTL_PRIVATE_DEF_SEL(objectBindings, - "objectBindings"); -_MTL_PRIVATE_DEF_SEL(objectBuffers, - "objectBuffers"); -_MTL_PRIVATE_DEF_SEL(objectFunction, - "objectFunction"); -_MTL_PRIVATE_DEF_SEL(objectFunctionDescriptor, - "objectFunctionDescriptor"); -_MTL_PRIVATE_DEF_SEL(objectLinkedFunctions, - "objectLinkedFunctions"); -_MTL_PRIVATE_DEF_SEL(objectLinkingDescriptor, - "objectLinkingDescriptor"); -_MTL_PRIVATE_DEF_SEL(objectPayloadAlignment, - "objectPayloadAlignment"); -_MTL_PRIVATE_DEF_SEL(objectPayloadDataSize, - "objectPayloadDataSize"); -_MTL_PRIVATE_DEF_SEL(objectStaticLinkingDescriptor, - "objectStaticLinkingDescriptor"); -_MTL_PRIVATE_DEF_SEL(objectThreadExecutionWidth, - "objectThreadExecutionWidth"); -_MTL_PRIVATE_DEF_SEL(objectThreadgroupSizeIsMultipleOfThreadExecutionWidth, - "objectThreadgroupSizeIsMultipleOfThreadExecutionWidth"); -_MTL_PRIVATE_DEF_SEL(offset, - "offset"); -_MTL_PRIVATE_DEF_SEL(opaque, - "opaque"); -_MTL_PRIVATE_DEF_SEL(optimizationLevel, - "optimizationLevel"); -_MTL_PRIVATE_DEF_SEL(optimizeContentsForCPUAccess_, - "optimizeContentsForCPUAccess:"); -_MTL_PRIVATE_DEF_SEL(optimizeContentsForCPUAccess_slice_level_, - "optimizeContentsForCPUAccess:slice:level:"); -_MTL_PRIVATE_DEF_SEL(optimizeContentsForGPUAccess_, - "optimizeContentsForGPUAccess:"); -_MTL_PRIVATE_DEF_SEL(optimizeContentsForGPUAccess_slice_level_, - "optimizeContentsForGPUAccess:slice:level:"); -_MTL_PRIVATE_DEF_SEL(optimizeIndirectCommandBuffer_withRange_, - "optimizeIndirectCommandBuffer:withRange:"); -_MTL_PRIVATE_DEF_SEL(options, - "options"); -_MTL_PRIVATE_DEF_SEL(outputNode, - "outputNode"); -_MTL_PRIVATE_DEF_SEL(outputURL, - "outputURL"); -_MTL_PRIVATE_DEF_SEL(parallelRenderCommandEncoderWithDescriptor_, - "parallelRenderCommandEncoderWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(parameterBufferSizeAndAlign, - "parameterBufferSizeAndAlign"); -_MTL_PRIVATE_DEF_SEL(parentRelativeLevel, - "parentRelativeLevel"); -_MTL_PRIVATE_DEF_SEL(parentRelativeSlice, - "parentRelativeSlice"); -_MTL_PRIVATE_DEF_SEL(parentTexture, - "parentTexture"); -_MTL_PRIVATE_DEF_SEL(patchControlPointCount, - "patchControlPointCount"); -_MTL_PRIVATE_DEF_SEL(patchType, - "patchType"); -_MTL_PRIVATE_DEF_SEL(payloadMemoryLength, - "payloadMemoryLength"); -_MTL_PRIVATE_DEF_SEL(peerCount, - "peerCount"); -_MTL_PRIVATE_DEF_SEL(peerGroupID, - "peerGroupID"); -_MTL_PRIVATE_DEF_SEL(peerIndex, - "peerIndex"); -_MTL_PRIVATE_DEF_SEL(physicalGranularity, - "physicalGranularity"); -_MTL_PRIVATE_DEF_SEL(physicalSizeForLayer_, - "physicalSizeForLayer:"); -_MTL_PRIVATE_DEF_SEL(pipelineDataSetSerializer, - "pipelineDataSetSerializer"); -_MTL_PRIVATE_DEF_SEL(pixelFormat, - "pixelFormat"); -_MTL_PRIVATE_DEF_SEL(placementSparsePageSize, - "placementSparsePageSize"); -_MTL_PRIVATE_DEF_SEL(pointerType, - "pointerType"); -_MTL_PRIVATE_DEF_SEL(popDebugGroup, - "popDebugGroup"); -_MTL_PRIVATE_DEF_SEL(preloadedLibraries, - "preloadedLibraries"); -_MTL_PRIVATE_DEF_SEL(preprocessorMacros, - "preprocessorMacros"); -_MTL_PRIVATE_DEF_SEL(present, - "present"); -_MTL_PRIVATE_DEF_SEL(presentAfterMinimumDuration_, - "presentAfterMinimumDuration:"); -_MTL_PRIVATE_DEF_SEL(presentAtTime_, - "presentAtTime:"); -_MTL_PRIVATE_DEF_SEL(presentDrawable_, - "presentDrawable:"); -_MTL_PRIVATE_DEF_SEL(presentDrawable_afterMinimumDuration_, - "presentDrawable:afterMinimumDuration:"); -_MTL_PRIVATE_DEF_SEL(presentDrawable_atTime_, - "presentDrawable:atTime:"); -_MTL_PRIVATE_DEF_SEL(presentedTime, - "presentedTime"); -_MTL_PRIVATE_DEF_SEL(preserveInvariance, - "preserveInvariance"); -_MTL_PRIVATE_DEF_SEL(primitiveDataBuffer, - "primitiveDataBuffer"); -_MTL_PRIVATE_DEF_SEL(primitiveDataBufferOffset, - "primitiveDataBufferOffset"); -_MTL_PRIVATE_DEF_SEL(primitiveDataElementSize, - "primitiveDataElementSize"); -_MTL_PRIVATE_DEF_SEL(primitiveDataStride, - "primitiveDataStride"); -_MTL_PRIVATE_DEF_SEL(priority, - "priority"); -_MTL_PRIVATE_DEF_SEL(privateFunctionDescriptors, - "privateFunctionDescriptors"); -_MTL_PRIVATE_DEF_SEL(privateFunctions, - "privateFunctions"); -_MTL_PRIVATE_DEF_SEL(pushDebugGroup_, - "pushDebugGroup:"); -_MTL_PRIVATE_DEF_SEL(queryTimestampFrequency, - "queryTimestampFrequency"); -_MTL_PRIVATE_DEF_SEL(rAddressMode, - "rAddressMode"); -_MTL_PRIVATE_DEF_SEL(radiusBuffer, - "radiusBuffer"); -_MTL_PRIVATE_DEF_SEL(radiusBufferOffset, - "radiusBufferOffset"); -_MTL_PRIVATE_DEF_SEL(radiusBuffers, - "radiusBuffers"); -_MTL_PRIVATE_DEF_SEL(radiusFormat, - "radiusFormat"); -_MTL_PRIVATE_DEF_SEL(radiusStride, - "radiusStride"); -_MTL_PRIVATE_DEF_SEL(rank, - "rank"); -_MTL_PRIVATE_DEF_SEL(rasterSampleCount, - "rasterSampleCount"); -_MTL_PRIVATE_DEF_SEL(rasterizationRateMap, - "rasterizationRateMap"); -_MTL_PRIVATE_DEF_SEL(rasterizationRateMapDescriptorWithScreenSize_, - "rasterizationRateMapDescriptorWithScreenSize:"); -_MTL_PRIVATE_DEF_SEL(rasterizationRateMapDescriptorWithScreenSize_layer_, - "rasterizationRateMapDescriptorWithScreenSize:layer:"); -_MTL_PRIVATE_DEF_SEL(rasterizationRateMapDescriptorWithScreenSize_layerCount_layers_, - "rasterizationRateMapDescriptorWithScreenSize:layerCount:layers:"); -_MTL_PRIVATE_DEF_SEL(readMask, - "readMask"); -_MTL_PRIVATE_DEF_SEL(readWriteTextureSupport, - "readWriteTextureSupport"); -_MTL_PRIVATE_DEF_SEL(recommendedMaxWorkingSetSize, - "recommendedMaxWorkingSetSize"); -_MTL_PRIVATE_DEF_SEL(reductionMode, - "reductionMode"); -_MTL_PRIVATE_DEF_SEL(refitAccelerationStructure_descriptor_destination_scratchBuffer_, - "refitAccelerationStructure:descriptor:destination:scratchBuffer:"); -_MTL_PRIVATE_DEF_SEL(refitAccelerationStructure_descriptor_destination_scratchBuffer_options_, - "refitAccelerationStructure:descriptor:destination:scratchBuffer:options:"); -_MTL_PRIVATE_DEF_SEL(refitAccelerationStructure_descriptor_destination_scratchBuffer_scratchBufferOffset_, - "refitAccelerationStructure:descriptor:destination:scratchBuffer:scratchBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(refitAccelerationStructure_descriptor_destination_scratchBuffer_scratchBufferOffset_options_, - "refitAccelerationStructure:descriptor:destination:scratchBuffer:scratchBufferOffset:options:"); -_MTL_PRIVATE_DEF_SEL(reflection, - "reflection"); -_MTL_PRIVATE_DEF_SEL(reflectionForFunctionWithName_, - "reflectionForFunctionWithName:"); -_MTL_PRIVATE_DEF_SEL(registryID, - "registryID"); -_MTL_PRIVATE_DEF_SEL(remoteStorageBuffer, - "remoteStorageBuffer"); -_MTL_PRIVATE_DEF_SEL(remoteStorageTexture, - "remoteStorageTexture"); -_MTL_PRIVATE_DEF_SEL(removeAllAllocations, - "removeAllAllocations"); -_MTL_PRIVATE_DEF_SEL(removeAllDebugMarkers, - "removeAllDebugMarkers"); -_MTL_PRIVATE_DEF_SEL(removeAllocation_, - "removeAllocation:"); -_MTL_PRIVATE_DEF_SEL(removeAllocations_count_, - "removeAllocations:count:"); -_MTL_PRIVATE_DEF_SEL(removeResidencySet_, - "removeResidencySet:"); -_MTL_PRIVATE_DEF_SEL(removeResidencySets_count_, - "removeResidencySets:count:"); -_MTL_PRIVATE_DEF_SEL(renderCommandEncoder, - "renderCommandEncoder"); -_MTL_PRIVATE_DEF_SEL(renderCommandEncoderWithDescriptor_, - "renderCommandEncoderWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(renderCommandEncoderWithDescriptor_options_, - "renderCommandEncoderWithDescriptor:options:"); -_MTL_PRIVATE_DEF_SEL(renderPassDescriptor, - "renderPassDescriptor"); -_MTL_PRIVATE_DEF_SEL(renderTargetArrayLength, - "renderTargetArrayLength"); -_MTL_PRIVATE_DEF_SEL(renderTargetHeight, - "renderTargetHeight"); -_MTL_PRIVATE_DEF_SEL(renderTargetWidth, - "renderTargetWidth"); -_MTL_PRIVATE_DEF_SEL(replaceRegion_mipmapLevel_slice_withBytes_bytesPerRow_bytesPerImage_, - "replaceRegion:mipmapLevel:slice:withBytes:bytesPerRow:bytesPerImage:"); -_MTL_PRIVATE_DEF_SEL(replaceRegion_mipmapLevel_withBytes_bytesPerRow_, - "replaceRegion:mipmapLevel:withBytes:bytesPerRow:"); -_MTL_PRIVATE_DEF_SEL(replaceSliceOrigin_sliceDimensions_withBytes_strides_, - "replaceSliceOrigin:sliceDimensions:withBytes:strides:"); -_MTL_PRIVATE_DEF_SEL(requestResidency, - "requestResidency"); -_MTL_PRIVATE_DEF_SEL(required, - "required"); -_MTL_PRIVATE_DEF_SEL(requiredThreadsPerMeshThreadgroup, - "requiredThreadsPerMeshThreadgroup"); -_MTL_PRIVATE_DEF_SEL(requiredThreadsPerObjectThreadgroup, - "requiredThreadsPerObjectThreadgroup"); -_MTL_PRIVATE_DEF_SEL(requiredThreadsPerThreadgroup, - "requiredThreadsPerThreadgroup"); -_MTL_PRIVATE_DEF_SEL(requiredThreadsPerTileThreadgroup, - "requiredThreadsPerTileThreadgroup"); -_MTL_PRIVATE_DEF_SEL(reset, - "reset"); -_MTL_PRIVATE_DEF_SEL(resetCommandsInBuffer_withRange_, - "resetCommandsInBuffer:withRange:"); -_MTL_PRIVATE_DEF_SEL(resetTextureAccessCounters_region_mipLevel_slice_, - "resetTextureAccessCounters:region:mipLevel:slice:"); -_MTL_PRIVATE_DEF_SEL(resetWithRange_, - "resetWithRange:"); -_MTL_PRIVATE_DEF_SEL(resolveCounterHeap_withRange_intoBuffer_waitFence_updateFence_, - "resolveCounterHeap:withRange:intoBuffer:waitFence:updateFence:"); -_MTL_PRIVATE_DEF_SEL(resolveCounterRange_, - "resolveCounterRange:"); -_MTL_PRIVATE_DEF_SEL(resolveCounters_inRange_destinationBuffer_destinationOffset_, - "resolveCounters:inRange:destinationBuffer:destinationOffset:"); -_MTL_PRIVATE_DEF_SEL(resolveDepthPlane, - "resolveDepthPlane"); -_MTL_PRIVATE_DEF_SEL(resolveLevel, - "resolveLevel"); -_MTL_PRIVATE_DEF_SEL(resolveSlice, - "resolveSlice"); -_MTL_PRIVATE_DEF_SEL(resolveTexture, - "resolveTexture"); -_MTL_PRIVATE_DEF_SEL(resourceOptions, - "resourceOptions"); -_MTL_PRIVATE_DEF_SEL(resourceStateCommandEncoder, - "resourceStateCommandEncoder"); -_MTL_PRIVATE_DEF_SEL(resourceStateCommandEncoderWithDescriptor_, - "resourceStateCommandEncoderWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(resourceStatePassDescriptor, - "resourceStatePassDescriptor"); -_MTL_PRIVATE_DEF_SEL(resourceViewCount, - "resourceViewCount"); -_MTL_PRIVATE_DEF_SEL(retainedReferences, - "retainedReferences"); -_MTL_PRIVATE_DEF_SEL(rgbBlendOperation, - "rgbBlendOperation"); -_MTL_PRIVATE_DEF_SEL(rootResource, - "rootResource"); -_MTL_PRIVATE_DEF_SEL(sAddressMode, - "sAddressMode"); -_MTL_PRIVATE_DEF_SEL(sampleBuffer, - "sampleBuffer"); -_MTL_PRIVATE_DEF_SEL(sampleBufferAttachments, - "sampleBufferAttachments"); -_MTL_PRIVATE_DEF_SEL(sampleCount, - "sampleCount"); -_MTL_PRIVATE_DEF_SEL(sampleCountersInBuffer_atSampleIndex_withBarrier_, - "sampleCountersInBuffer:atSampleIndex:withBarrier:"); -_MTL_PRIVATE_DEF_SEL(sampleTimestamps_gpuTimestamp_, - "sampleTimestamps:gpuTimestamp:"); -_MTL_PRIVATE_DEF_SEL(scratchBufferAllocator, - "scratchBufferAllocator"); -_MTL_PRIVATE_DEF_SEL(screenSize, - "screenSize"); -_MTL_PRIVATE_DEF_SEL(segmentControlPointCount, - "segmentControlPointCount"); -_MTL_PRIVATE_DEF_SEL(segmentCount, - "segmentCount"); -_MTL_PRIVATE_DEF_SEL(serializeAsArchiveAndFlushToURL_error_, - "serializeAsArchiveAndFlushToURL:error:"); -_MTL_PRIVATE_DEF_SEL(serializeAsPipelinesScriptWithError_, - "serializeAsPipelinesScriptWithError:"); -_MTL_PRIVATE_DEF_SEL(serializeToURL_error_, - "serializeToURL:error:"); -_MTL_PRIVATE_DEF_SEL(setAccelerationStructure_atBufferIndex_, - "setAccelerationStructure:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setAccelerationStructure_atIndex_, - "setAccelerationStructure:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setAccess_, - "setAccess:"); -_MTL_PRIVATE_DEF_SEL(setAddress_atIndex_, - "setAddress:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setAddress_attributeStride_atIndex_, - "setAddress:attributeStride:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setAllowDuplicateIntersectionFunctionInvocation_, - "setAllowDuplicateIntersectionFunctionInvocation:"); -_MTL_PRIVATE_DEF_SEL(setAllowGPUOptimizedContents_, - "setAllowGPUOptimizedContents:"); -_MTL_PRIVATE_DEF_SEL(setAllowReferencingUndefinedSymbols_, - "setAllowReferencingUndefinedSymbols:"); -_MTL_PRIVATE_DEF_SEL(setAlphaBlendOperation_, - "setAlphaBlendOperation:"); -_MTL_PRIVATE_DEF_SEL(setAlphaToCoverageEnabled_, - "setAlphaToCoverageEnabled:"); -_MTL_PRIVATE_DEF_SEL(setAlphaToCoverageState_, - "setAlphaToCoverageState:"); -_MTL_PRIVATE_DEF_SEL(setAlphaToOneEnabled_, - "setAlphaToOneEnabled:"); -_MTL_PRIVATE_DEF_SEL(setAlphaToOneState_, - "setAlphaToOneState:"); -_MTL_PRIVATE_DEF_SEL(setArgumentBuffer_offset_, - "setArgumentBuffer:offset:"); -_MTL_PRIVATE_DEF_SEL(setArgumentBuffer_startOffset_arrayElement_, - "setArgumentBuffer:startOffset:arrayElement:"); -_MTL_PRIVATE_DEF_SEL(setArgumentIndex_, - "setArgumentIndex:"); -_MTL_PRIVATE_DEF_SEL(setArgumentTable_, - "setArgumentTable:"); -_MTL_PRIVATE_DEF_SEL(setArgumentTable_atStages_, - "setArgumentTable:atStages:"); -_MTL_PRIVATE_DEF_SEL(setArguments_, - "setArguments:"); -_MTL_PRIVATE_DEF_SEL(setArrayLength_, - "setArrayLength:"); -_MTL_PRIVATE_DEF_SEL(setAttributes_, - "setAttributes:"); -_MTL_PRIVATE_DEF_SEL(setBackFaceStencil_, - "setBackFaceStencil:"); -_MTL_PRIVATE_DEF_SEL(setBarrier, - "setBarrier"); -_MTL_PRIVATE_DEF_SEL(setBinaryArchives_, - "setBinaryArchives:"); -_MTL_PRIVATE_DEF_SEL(setBinaryFunctions_, - "setBinaryFunctions:"); -_MTL_PRIVATE_DEF_SEL(setBinaryLinkedFunctions_, - "setBinaryLinkedFunctions:"); -_MTL_PRIVATE_DEF_SEL(setBlendColorRed_green_blue_alpha_, - "setBlendColorRed:green:blue:alpha:"); -_MTL_PRIVATE_DEF_SEL(setBlendingEnabled_, - "setBlendingEnabled:"); -_MTL_PRIVATE_DEF_SEL(setBlendingState_, - "setBlendingState:"); -_MTL_PRIVATE_DEF_SEL(setBorderColor_, - "setBorderColor:"); -_MTL_PRIVATE_DEF_SEL(setBoundingBoxBuffer_, - "setBoundingBoxBuffer:"); -_MTL_PRIVATE_DEF_SEL(setBoundingBoxBufferOffset_, - "setBoundingBoxBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setBoundingBoxBuffers_, - "setBoundingBoxBuffers:"); -_MTL_PRIVATE_DEF_SEL(setBoundingBoxCount_, - "setBoundingBoxCount:"); -_MTL_PRIVATE_DEF_SEL(setBoundingBoxStride_, - "setBoundingBoxStride:"); -_MTL_PRIVATE_DEF_SEL(setBuffer_, - "setBuffer:"); -_MTL_PRIVATE_DEF_SEL(setBuffer_offset_atIndex_, - "setBuffer:offset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setBuffer_offset_attributeStride_atIndex_, - "setBuffer:offset:attributeStride:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setBufferIndex_, - "setBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setBufferOffset_atIndex_, - "setBufferOffset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setBufferOffset_attributeStride_atIndex_, - "setBufferOffset:attributeStride:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setBufferSize_, - "setBufferSize:"); -_MTL_PRIVATE_DEF_SEL(setBuffers_offsets_attributeStrides_withRange_, - "setBuffers:offsets:attributeStrides:withRange:"); -_MTL_PRIVATE_DEF_SEL(setBuffers_offsets_withRange_, - "setBuffers:offsets:withRange:"); -_MTL_PRIVATE_DEF_SEL(setBytes_length_atIndex_, - "setBytes:length:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setBytes_length_attributeStride_atIndex_, - "setBytes:length:attributeStride:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setCaptureObject_, - "setCaptureObject:"); -_MTL_PRIVATE_DEF_SEL(setClearColor_, - "setClearColor:"); -_MTL_PRIVATE_DEF_SEL(setClearDepth_, - "setClearDepth:"); -_MTL_PRIVATE_DEF_SEL(setClearStencil_, - "setClearStencil:"); -_MTL_PRIVATE_DEF_SEL(setColorAttachmentMap_, - "setColorAttachmentMap:"); -_MTL_PRIVATE_DEF_SEL(setColorAttachmentMappingState_, - "setColorAttachmentMappingState:"); -_MTL_PRIVATE_DEF_SEL(setColorStoreAction_atIndex_, - "setColorStoreAction:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setColorStoreActionOptions_atIndex_, - "setColorStoreActionOptions:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setCommandTypes_, - "setCommandTypes:"); -_MTL_PRIVATE_DEF_SEL(setCompareFunction_, - "setCompareFunction:"); -_MTL_PRIVATE_DEF_SEL(setCompileSymbolVisibility_, - "setCompileSymbolVisibility:"); -_MTL_PRIVATE_DEF_SEL(setCompressionType_, - "setCompressionType:"); -_MTL_PRIVATE_DEF_SEL(setComputeFunction_, - "setComputeFunction:"); -_MTL_PRIVATE_DEF_SEL(setComputeFunctionDescriptor_, - "setComputeFunctionDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setComputePipelineState_, - "setComputePipelineState:"); -_MTL_PRIVATE_DEF_SEL(setComputePipelineState_atIndex_, - "setComputePipelineState:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setComputePipelineStates_withRange_, - "setComputePipelineStates:withRange:"); -_MTL_PRIVATE_DEF_SEL(setConfiguration_, - "setConfiguration:"); -_MTL_PRIVATE_DEF_SEL(setConstantBlockAlignment_, - "setConstantBlockAlignment:"); -_MTL_PRIVATE_DEF_SEL(setConstantValue_type_atIndex_, - "setConstantValue:type:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setConstantValue_type_withName_, - "setConstantValue:type:withName:"); -_MTL_PRIVATE_DEF_SEL(setConstantValues_, - "setConstantValues:"); -_MTL_PRIVATE_DEF_SEL(setConstantValues_type_withRange_, - "setConstantValues:type:withRange:"); -_MTL_PRIVATE_DEF_SEL(setControlDependencies_, - "setControlDependencies:"); -_MTL_PRIVATE_DEF_SEL(setControlPointBuffer_, - "setControlPointBuffer:"); -_MTL_PRIVATE_DEF_SEL(setControlPointBufferOffset_, - "setControlPointBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setControlPointBuffers_, - "setControlPointBuffers:"); -_MTL_PRIVATE_DEF_SEL(setControlPointCount_, - "setControlPointCount:"); -_MTL_PRIVATE_DEF_SEL(setControlPointFormat_, - "setControlPointFormat:"); -_MTL_PRIVATE_DEF_SEL(setControlPointStride_, - "setControlPointStride:"); -_MTL_PRIVATE_DEF_SEL(setCount_, - "setCount:"); -_MTL_PRIVATE_DEF_SEL(setCounterSet_, - "setCounterSet:"); -_MTL_PRIVATE_DEF_SEL(setCpuCacheMode_, - "setCpuCacheMode:"); -_MTL_PRIVATE_DEF_SEL(setCullMode_, - "setCullMode:"); -_MTL_PRIVATE_DEF_SEL(setCurveBasis_, - "setCurveBasis:"); -_MTL_PRIVATE_DEF_SEL(setCurveEndCaps_, - "setCurveEndCaps:"); -_MTL_PRIVATE_DEF_SEL(setCurveType_, - "setCurveType:"); -_MTL_PRIVATE_DEF_SEL(setDataType_, - "setDataType:"); -_MTL_PRIVATE_DEF_SEL(setDefaultCaptureScope_, - "setDefaultCaptureScope:"); -_MTL_PRIVATE_DEF_SEL(setDefaultRasterSampleCount_, - "setDefaultRasterSampleCount:"); -_MTL_PRIVATE_DEF_SEL(setDepth_, - "setDepth:"); -_MTL_PRIVATE_DEF_SEL(setDepthAttachment_, - "setDepthAttachment:"); -_MTL_PRIVATE_DEF_SEL(setDepthAttachmentPixelFormat_, - "setDepthAttachmentPixelFormat:"); -_MTL_PRIVATE_DEF_SEL(setDepthBias_slopeScale_clamp_, - "setDepthBias:slopeScale:clamp:"); -_MTL_PRIVATE_DEF_SEL(setDepthClipMode_, - "setDepthClipMode:"); -_MTL_PRIVATE_DEF_SEL(setDepthCompareFunction_, - "setDepthCompareFunction:"); -_MTL_PRIVATE_DEF_SEL(setDepthFailureOperation_, - "setDepthFailureOperation:"); -_MTL_PRIVATE_DEF_SEL(setDepthPlane_, - "setDepthPlane:"); -_MTL_PRIVATE_DEF_SEL(setDepthResolveFilter_, - "setDepthResolveFilter:"); -_MTL_PRIVATE_DEF_SEL(setDepthStencilPassOperation_, - "setDepthStencilPassOperation:"); -_MTL_PRIVATE_DEF_SEL(setDepthStencilState_, - "setDepthStencilState:"); -_MTL_PRIVATE_DEF_SEL(setDepthStencilState_atIndex_, - "setDepthStencilState:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setDepthStencilStates_withRange_, - "setDepthStencilStates:withRange:"); -_MTL_PRIVATE_DEF_SEL(setDepthStoreAction_, - "setDepthStoreAction:"); -_MTL_PRIVATE_DEF_SEL(setDepthStoreActionOptions_, - "setDepthStoreActionOptions:"); -_MTL_PRIVATE_DEF_SEL(setDepthTestMinBound_maxBound_, - "setDepthTestMinBound:maxBound:"); -_MTL_PRIVATE_DEF_SEL(setDepthWriteEnabled_, - "setDepthWriteEnabled:"); -_MTL_PRIVATE_DEF_SEL(setDestination_, - "setDestination:"); -_MTL_PRIVATE_DEF_SEL(setDestinationAlphaBlendFactor_, - "setDestinationAlphaBlendFactor:"); -_MTL_PRIVATE_DEF_SEL(setDestinationRGBBlendFactor_, - "setDestinationRGBBlendFactor:"); -_MTL_PRIVATE_DEF_SEL(setDimensions_, - "setDimensions:"); -_MTL_PRIVATE_DEF_SEL(setDispatchType_, - "setDispatchType:"); -_MTL_PRIVATE_DEF_SEL(setEnableLogging_, - "setEnableLogging:"); -_MTL_PRIVATE_DEF_SEL(setEndOfEncoderSampleIndex_, - "setEndOfEncoderSampleIndex:"); -_MTL_PRIVATE_DEF_SEL(setEndOfFragmentSampleIndex_, - "setEndOfFragmentSampleIndex:"); -_MTL_PRIVATE_DEF_SEL(setEndOfVertexSampleIndex_, - "setEndOfVertexSampleIndex:"); -_MTL_PRIVATE_DEF_SEL(setErrorOptions_, - "setErrorOptions:"); -_MTL_PRIVATE_DEF_SEL(setFastMathEnabled_, - "setFastMathEnabled:"); -_MTL_PRIVATE_DEF_SEL(setFeedbackQueue_, - "setFeedbackQueue:"); -_MTL_PRIVATE_DEF_SEL(setFormat_, - "setFormat:"); -_MTL_PRIVATE_DEF_SEL(setFragmentAccelerationStructure_atBufferIndex_, - "setFragmentAccelerationStructure:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setFragmentAdditionalBinaryFunctions_, - "setFragmentAdditionalBinaryFunctions:"); -_MTL_PRIVATE_DEF_SEL(setFragmentBuffer_offset_atIndex_, - "setFragmentBuffer:offset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setFragmentBufferOffset_atIndex_, - "setFragmentBufferOffset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setFragmentBuffers_offsets_withRange_, - "setFragmentBuffers:offsets:withRange:"); -_MTL_PRIVATE_DEF_SEL(setFragmentBytes_length_atIndex_, - "setFragmentBytes:length:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setFragmentFunction_, - "setFragmentFunction:"); -_MTL_PRIVATE_DEF_SEL(setFragmentFunctionDescriptor_, - "setFragmentFunctionDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setFragmentIntersectionFunctionTable_atBufferIndex_, - "setFragmentIntersectionFunctionTable:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setFragmentIntersectionFunctionTables_withBufferRange_, - "setFragmentIntersectionFunctionTables:withBufferRange:"); -_MTL_PRIVATE_DEF_SEL(setFragmentLinkedFunctions_, - "setFragmentLinkedFunctions:"); -_MTL_PRIVATE_DEF_SEL(setFragmentPreloadedLibraries_, - "setFragmentPreloadedLibraries:"); -_MTL_PRIVATE_DEF_SEL(setFragmentSamplerState_atIndex_, - "setFragmentSamplerState:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setFragmentSamplerState_lodMinClamp_lodMaxClamp_atIndex_, - "setFragmentSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setFragmentSamplerStates_lodMinClamps_lodMaxClamps_withRange_, - "setFragmentSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); -_MTL_PRIVATE_DEF_SEL(setFragmentSamplerStates_withRange_, - "setFragmentSamplerStates:withRange:"); -_MTL_PRIVATE_DEF_SEL(setFragmentStaticLinkingDescriptor_, - "setFragmentStaticLinkingDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setFragmentTexture_atIndex_, - "setFragmentTexture:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setFragmentTextures_withRange_, - "setFragmentTextures:withRange:"); -_MTL_PRIVATE_DEF_SEL(setFragmentVisibleFunctionTable_atBufferIndex_, - "setFragmentVisibleFunctionTable:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setFragmentVisibleFunctionTables_withBufferRange_, - "setFragmentVisibleFunctionTables:withBufferRange:"); -_MTL_PRIVATE_DEF_SEL(setFrontFaceStencil_, - "setFrontFaceStencil:"); -_MTL_PRIVATE_DEF_SEL(setFrontFacingWinding_, - "setFrontFacingWinding:"); -_MTL_PRIVATE_DEF_SEL(setFunction_atIndex_, - "setFunction:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setFunctionCount_, - "setFunctionCount:"); -_MTL_PRIVATE_DEF_SEL(setFunctionDescriptor_, - "setFunctionDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setFunctionDescriptors_, - "setFunctionDescriptors:"); -_MTL_PRIVATE_DEF_SEL(setFunctionGraph_, - "setFunctionGraph:"); -_MTL_PRIVATE_DEF_SEL(setFunctionGraphs_, - "setFunctionGraphs:"); -_MTL_PRIVATE_DEF_SEL(setFunctionName_, - "setFunctionName:"); -_MTL_PRIVATE_DEF_SEL(setFunctions_, - "setFunctions:"); -_MTL_PRIVATE_DEF_SEL(setFunctions_withRange_, - "setFunctions:withRange:"); -_MTL_PRIVATE_DEF_SEL(setGeometryDescriptors_, - "setGeometryDescriptors:"); -_MTL_PRIVATE_DEF_SEL(setGroups_, - "setGroups:"); -_MTL_PRIVATE_DEF_SEL(setHazardTrackingMode_, - "setHazardTrackingMode:"); -_MTL_PRIVATE_DEF_SEL(setHeight_, - "setHeight:"); -_MTL_PRIVATE_DEF_SEL(setImageblockSampleLength_, - "setImageblockSampleLength:"); -_MTL_PRIVATE_DEF_SEL(setImageblockWidth_height_, - "setImageblockWidth:height:"); -_MTL_PRIVATE_DEF_SEL(setIndex_, - "setIndex:"); -_MTL_PRIVATE_DEF_SEL(setIndexBuffer_, - "setIndexBuffer:"); -_MTL_PRIVATE_DEF_SEL(setIndexBufferIndex_, - "setIndexBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setIndexBufferOffset_, - "setIndexBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setIndexType_, - "setIndexType:"); -_MTL_PRIVATE_DEF_SEL(setIndirectCommandBuffer_atIndex_, - "setIndirectCommandBuffer:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setIndirectCommandBuffers_withRange_, - "setIndirectCommandBuffers:withRange:"); -_MTL_PRIVATE_DEF_SEL(setInheritBuffers_, - "setInheritBuffers:"); -_MTL_PRIVATE_DEF_SEL(setInheritCullMode_, - "setInheritCullMode:"); -_MTL_PRIVATE_DEF_SEL(setInheritDepthBias_, - "setInheritDepthBias:"); -_MTL_PRIVATE_DEF_SEL(setInheritDepthClipMode_, - "setInheritDepthClipMode:"); -_MTL_PRIVATE_DEF_SEL(setInheritDepthStencilState_, - "setInheritDepthStencilState:"); -_MTL_PRIVATE_DEF_SEL(setInheritFrontFacingWinding_, - "setInheritFrontFacingWinding:"); -_MTL_PRIVATE_DEF_SEL(setInheritPipelineState_, - "setInheritPipelineState:"); -_MTL_PRIVATE_DEF_SEL(setInheritTriangleFillMode_, - "setInheritTriangleFillMode:"); -_MTL_PRIVATE_DEF_SEL(setInitialCapacity_, - "setInitialCapacity:"); -_MTL_PRIVATE_DEF_SEL(setInitializeBindings_, - "setInitializeBindings:"); -_MTL_PRIVATE_DEF_SEL(setInputDimensions_atBufferIndex_, - "setInputDimensions:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setInputDimensions_withRange_, - "setInputDimensions:withRange:"); -_MTL_PRIVATE_DEF_SEL(setInputPrimitiveTopology_, - "setInputPrimitiveTopology:"); -_MTL_PRIVATE_DEF_SEL(setInsertLibraries_, - "setInsertLibraries:"); -_MTL_PRIVATE_DEF_SEL(setInstallName_, - "setInstallName:"); -_MTL_PRIVATE_DEF_SEL(setInstanceCount_, - "setInstanceCount:"); -_MTL_PRIVATE_DEF_SEL(setInstanceCountBuffer_, - "setInstanceCountBuffer:"); -_MTL_PRIVATE_DEF_SEL(setInstanceCountBufferOffset_, - "setInstanceCountBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setInstanceDescriptorBuffer_, - "setInstanceDescriptorBuffer:"); -_MTL_PRIVATE_DEF_SEL(setInstanceDescriptorBufferOffset_, - "setInstanceDescriptorBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setInstanceDescriptorStride_, - "setInstanceDescriptorStride:"); -_MTL_PRIVATE_DEF_SEL(setInstanceDescriptorType_, - "setInstanceDescriptorType:"); -_MTL_PRIVATE_DEF_SEL(setInstanceTransformationMatrixLayout_, - "setInstanceTransformationMatrixLayout:"); -_MTL_PRIVATE_DEF_SEL(setInstancedAccelerationStructures_, - "setInstancedAccelerationStructures:"); -_MTL_PRIVATE_DEF_SEL(setIntersectionFunctionTable_atBufferIndex_, - "setIntersectionFunctionTable:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setIntersectionFunctionTable_atIndex_, - "setIntersectionFunctionTable:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setIntersectionFunctionTableOffset_, - "setIntersectionFunctionTableOffset:"); -_MTL_PRIVATE_DEF_SEL(setIntersectionFunctionTables_withBufferRange_, - "setIntersectionFunctionTables:withBufferRange:"); -_MTL_PRIVATE_DEF_SEL(setIntersectionFunctionTables_withRange_, - "setIntersectionFunctionTables:withRange:"); -_MTL_PRIVATE_DEF_SEL(setKernelBuffer_offset_atIndex_, - "setKernelBuffer:offset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setKernelBuffer_offset_attributeStride_atIndex_, - "setKernelBuffer:offset:attributeStride:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setLabel_, - "setLabel:"); -_MTL_PRIVATE_DEF_SEL(setLanguageVersion_, - "setLanguageVersion:"); -_MTL_PRIVATE_DEF_SEL(setLayer_atIndex_, - "setLayer:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setLevel_, - "setLevel:"); -_MTL_PRIVATE_DEF_SEL(setLevelRange_, - "setLevelRange:"); -_MTL_PRIVATE_DEF_SEL(setLibraries_, - "setLibraries:"); -_MTL_PRIVATE_DEF_SEL(setLibrary_, - "setLibrary:"); -_MTL_PRIVATE_DEF_SEL(setLibraryType_, - "setLibraryType:"); -_MTL_PRIVATE_DEF_SEL(setLinkedFunctions_, - "setLinkedFunctions:"); -_MTL_PRIVATE_DEF_SEL(setLoadAction_, - "setLoadAction:"); -_MTL_PRIVATE_DEF_SEL(setLodAverage_, - "setLodAverage:"); -_MTL_PRIVATE_DEF_SEL(setLodBias_, - "setLodBias:"); -_MTL_PRIVATE_DEF_SEL(setLodMaxClamp_, - "setLodMaxClamp:"); -_MTL_PRIVATE_DEF_SEL(setLodMinClamp_, - "setLodMinClamp:"); -_MTL_PRIVATE_DEF_SEL(setLogState_, - "setLogState:"); -_MTL_PRIVATE_DEF_SEL(setLookupArchives_, - "setLookupArchives:"); -_MTL_PRIVATE_DEF_SEL(setMachineLearningFunctionDescriptor_, - "setMachineLearningFunctionDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setMagFilter_, - "setMagFilter:"); -_MTL_PRIVATE_DEF_SEL(setMathFloatingPointFunctions_, - "setMathFloatingPointFunctions:"); -_MTL_PRIVATE_DEF_SEL(setMathMode_, - "setMathMode:"); -_MTL_PRIVATE_DEF_SEL(setMaxAnisotropy_, - "setMaxAnisotropy:"); -_MTL_PRIVATE_DEF_SEL(setMaxBufferBindCount_, - "setMaxBufferBindCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxCallStackDepth_, - "setMaxCallStackDepth:"); -_MTL_PRIVATE_DEF_SEL(setMaxCommandBufferCount_, - "setMaxCommandBufferCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxCommandsInFlight_, - "setMaxCommandsInFlight:"); -_MTL_PRIVATE_DEF_SEL(setMaxCompatiblePlacementSparsePageSize_, - "setMaxCompatiblePlacementSparsePageSize:"); -_MTL_PRIVATE_DEF_SEL(setMaxFragmentBufferBindCount_, - "setMaxFragmentBufferBindCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxFragmentCallStackDepth_, - "setMaxFragmentCallStackDepth:"); -_MTL_PRIVATE_DEF_SEL(setMaxInstanceCount_, - "setMaxInstanceCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxKernelBufferBindCount_, - "setMaxKernelBufferBindCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxKernelThreadgroupMemoryBindCount_, - "setMaxKernelThreadgroupMemoryBindCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxMeshBufferBindCount_, - "setMaxMeshBufferBindCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxMotionTransformCount_, - "setMaxMotionTransformCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxObjectBufferBindCount_, - "setMaxObjectBufferBindCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxObjectThreadgroupMemoryBindCount_, - "setMaxObjectThreadgroupMemoryBindCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxSamplerStateBindCount_, - "setMaxSamplerStateBindCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxTessellationFactor_, - "setMaxTessellationFactor:"); -_MTL_PRIVATE_DEF_SEL(setMaxTextureBindCount_, - "setMaxTextureBindCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxTotalThreadgroupsPerMeshGrid_, - "setMaxTotalThreadgroupsPerMeshGrid:"); -_MTL_PRIVATE_DEF_SEL(setMaxTotalThreadsPerMeshThreadgroup_, - "setMaxTotalThreadsPerMeshThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(setMaxTotalThreadsPerObjectThreadgroup_, - "setMaxTotalThreadsPerObjectThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(setMaxTotalThreadsPerThreadgroup_, - "setMaxTotalThreadsPerThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(setMaxVertexAmplificationCount_, - "setMaxVertexAmplificationCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxVertexBufferBindCount_, - "setMaxVertexBufferBindCount:"); -_MTL_PRIVATE_DEF_SEL(setMaxVertexCallStackDepth_, - "setMaxVertexCallStackDepth:"); -_MTL_PRIVATE_DEF_SEL(setMeshAdditionalBinaryFunctions_, - "setMeshAdditionalBinaryFunctions:"); -_MTL_PRIVATE_DEF_SEL(setMeshBuffer_offset_atIndex_, - "setMeshBuffer:offset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setMeshBufferOffset_atIndex_, - "setMeshBufferOffset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setMeshBuffers_offsets_withRange_, - "setMeshBuffers:offsets:withRange:"); -_MTL_PRIVATE_DEF_SEL(setMeshBytes_length_atIndex_, - "setMeshBytes:length:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setMeshFunction_, - "setMeshFunction:"); -_MTL_PRIVATE_DEF_SEL(setMeshFunctionDescriptor_, - "setMeshFunctionDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setMeshLinkedFunctions_, - "setMeshLinkedFunctions:"); -_MTL_PRIVATE_DEF_SEL(setMeshSamplerState_atIndex_, - "setMeshSamplerState:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex_, - "setMeshSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setMeshSamplerStates_lodMinClamps_lodMaxClamps_withRange_, - "setMeshSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); -_MTL_PRIVATE_DEF_SEL(setMeshSamplerStates_withRange_, - "setMeshSamplerStates:withRange:"); -_MTL_PRIVATE_DEF_SEL(setMeshStaticLinkingDescriptor_, - "setMeshStaticLinkingDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setMeshTexture_atIndex_, - "setMeshTexture:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setMeshTextures_withRange_, - "setMeshTextures:withRange:"); -_MTL_PRIVATE_DEF_SEL(setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth_, - "setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth:"); -_MTL_PRIVATE_DEF_SEL(setMinFilter_, - "setMinFilter:"); -_MTL_PRIVATE_DEF_SEL(setMipFilter_, - "setMipFilter:"); -_MTL_PRIVATE_DEF_SEL(setMipmapLevelCount_, - "setMipmapLevelCount:"); -_MTL_PRIVATE_DEF_SEL(setMotionEndBorderMode_, - "setMotionEndBorderMode:"); -_MTL_PRIVATE_DEF_SEL(setMotionEndTime_, - "setMotionEndTime:"); -_MTL_PRIVATE_DEF_SEL(setMotionKeyframeCount_, - "setMotionKeyframeCount:"); -_MTL_PRIVATE_DEF_SEL(setMotionStartBorderMode_, - "setMotionStartBorderMode:"); -_MTL_PRIVATE_DEF_SEL(setMotionStartTime_, - "setMotionStartTime:"); -_MTL_PRIVATE_DEF_SEL(setMotionTransformBuffer_, - "setMotionTransformBuffer:"); -_MTL_PRIVATE_DEF_SEL(setMotionTransformBufferOffset_, - "setMotionTransformBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setMotionTransformCount_, - "setMotionTransformCount:"); -_MTL_PRIVATE_DEF_SEL(setMotionTransformCountBuffer_, - "setMotionTransformCountBuffer:"); -_MTL_PRIVATE_DEF_SEL(setMotionTransformCountBufferOffset_, - "setMotionTransformCountBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setMotionTransformStride_, - "setMotionTransformStride:"); -_MTL_PRIVATE_DEF_SEL(setMotionTransformType_, - "setMotionTransformType:"); -_MTL_PRIVATE_DEF_SEL(setMutability_, - "setMutability:"); -_MTL_PRIVATE_DEF_SEL(setName_, - "setName:"); -_MTL_PRIVATE_DEF_SEL(setNodes_, - "setNodes:"); -_MTL_PRIVATE_DEF_SEL(setNormalizedCoordinates_, - "setNormalizedCoordinates:"); -_MTL_PRIVATE_DEF_SEL(setObject_atIndexedSubscript_, - "setObject:atIndexedSubscript:"); -_MTL_PRIVATE_DEF_SEL(setObjectAdditionalBinaryFunctions_, - "setObjectAdditionalBinaryFunctions:"); -_MTL_PRIVATE_DEF_SEL(setObjectBuffer_offset_atIndex_, - "setObjectBuffer:offset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setObjectBufferOffset_atIndex_, - "setObjectBufferOffset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setObjectBuffers_offsets_withRange_, - "setObjectBuffers:offsets:withRange:"); -_MTL_PRIVATE_DEF_SEL(setObjectBytes_length_atIndex_, - "setObjectBytes:length:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setObjectFunction_, - "setObjectFunction:"); -_MTL_PRIVATE_DEF_SEL(setObjectFunctionDescriptor_, - "setObjectFunctionDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setObjectLinkedFunctions_, - "setObjectLinkedFunctions:"); -_MTL_PRIVATE_DEF_SEL(setObjectSamplerState_atIndex_, - "setObjectSamplerState:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex_, - "setObjectSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setObjectSamplerStates_lodMinClamps_lodMaxClamps_withRange_, - "setObjectSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); -_MTL_PRIVATE_DEF_SEL(setObjectSamplerStates_withRange_, - "setObjectSamplerStates:withRange:"); -_MTL_PRIVATE_DEF_SEL(setObjectStaticLinkingDescriptor_, - "setObjectStaticLinkingDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setObjectTexture_atIndex_, - "setObjectTexture:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setObjectTextures_withRange_, - "setObjectTextures:withRange:"); -_MTL_PRIVATE_DEF_SEL(setObjectThreadgroupMemoryLength_atIndex_, - "setObjectThreadgroupMemoryLength:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth_, - "setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth:"); -_MTL_PRIVATE_DEF_SEL(setOffset_, - "setOffset:"); -_MTL_PRIVATE_DEF_SEL(setOpaque_, - "setOpaque:"); -_MTL_PRIVATE_DEF_SEL(setOpaqueCurveIntersectionFunctionWithSignature_atIndex_, - "setOpaqueCurveIntersectionFunctionWithSignature:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setOpaqueCurveIntersectionFunctionWithSignature_withRange_, - "setOpaqueCurveIntersectionFunctionWithSignature:withRange:"); -_MTL_PRIVATE_DEF_SEL(setOpaqueTriangleIntersectionFunctionWithSignature_atIndex_, - "setOpaqueTriangleIntersectionFunctionWithSignature:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setOpaqueTriangleIntersectionFunctionWithSignature_withRange_, - "setOpaqueTriangleIntersectionFunctionWithSignature:withRange:"); -_MTL_PRIVATE_DEF_SEL(setOptimizationLevel_, - "setOptimizationLevel:"); -_MTL_PRIVATE_DEF_SEL(setOptions_, - "setOptions:"); -_MTL_PRIVATE_DEF_SEL(setOutputNode_, - "setOutputNode:"); -_MTL_PRIVATE_DEF_SEL(setOutputURL_, - "setOutputURL:"); -_MTL_PRIVATE_DEF_SEL(setOwnerWithIdentity_, - "setOwnerWithIdentity:"); -_MTL_PRIVATE_DEF_SEL(setPayloadMemoryLength_, - "setPayloadMemoryLength:"); -_MTL_PRIVATE_DEF_SEL(setPhysicalIndex_forLogicalIndex_, - "setPhysicalIndex:forLogicalIndex:"); -_MTL_PRIVATE_DEF_SEL(setPipelineDataSetSerializer_, - "setPipelineDataSetSerializer:"); -_MTL_PRIVATE_DEF_SEL(setPipelineState_, - "setPipelineState:"); -_MTL_PRIVATE_DEF_SEL(setPixelFormat_, - "setPixelFormat:"); -_MTL_PRIVATE_DEF_SEL(setPlacementSparsePageSize_, - "setPlacementSparsePageSize:"); -_MTL_PRIVATE_DEF_SEL(setPreloadedLibraries_, - "setPreloadedLibraries:"); -_MTL_PRIVATE_DEF_SEL(setPreprocessorMacros_, - "setPreprocessorMacros:"); -_MTL_PRIVATE_DEF_SEL(setPreserveInvariance_, - "setPreserveInvariance:"); -_MTL_PRIVATE_DEF_SEL(setPrimitiveDataBuffer_, - "setPrimitiveDataBuffer:"); -_MTL_PRIVATE_DEF_SEL(setPrimitiveDataBufferOffset_, - "setPrimitiveDataBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setPrimitiveDataElementSize_, - "setPrimitiveDataElementSize:"); -_MTL_PRIVATE_DEF_SEL(setPrimitiveDataStride_, - "setPrimitiveDataStride:"); -_MTL_PRIVATE_DEF_SEL(setPriority_, - "setPriority:"); -_MTL_PRIVATE_DEF_SEL(setPrivateFunctionDescriptors_, - "setPrivateFunctionDescriptors:"); -_MTL_PRIVATE_DEF_SEL(setPrivateFunctions_, - "setPrivateFunctions:"); -_MTL_PRIVATE_DEF_SEL(setPurgeableState_, - "setPurgeableState:"); -_MTL_PRIVATE_DEF_SEL(setRAddressMode_, - "setRAddressMode:"); -_MTL_PRIVATE_DEF_SEL(setRadiusBuffer_, - "setRadiusBuffer:"); -_MTL_PRIVATE_DEF_SEL(setRadiusBufferOffset_, - "setRadiusBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setRadiusBuffers_, - "setRadiusBuffers:"); -_MTL_PRIVATE_DEF_SEL(setRadiusFormat_, - "setRadiusFormat:"); -_MTL_PRIVATE_DEF_SEL(setRadiusStride_, - "setRadiusStride:"); -_MTL_PRIVATE_DEF_SEL(setRasterSampleCount_, - "setRasterSampleCount:"); -_MTL_PRIVATE_DEF_SEL(setRasterizationEnabled_, - "setRasterizationEnabled:"); -_MTL_PRIVATE_DEF_SEL(setRasterizationRateMap_, - "setRasterizationRateMap:"); -_MTL_PRIVATE_DEF_SEL(setReadMask_, - "setReadMask:"); -_MTL_PRIVATE_DEF_SEL(setReductionMode_, - "setReductionMode:"); -_MTL_PRIVATE_DEF_SEL(setRenderPipelineState_, - "setRenderPipelineState:"); -_MTL_PRIVATE_DEF_SEL(setRenderPipelineState_atIndex_, - "setRenderPipelineState:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setRenderPipelineStates_withRange_, - "setRenderPipelineStates:withRange:"); -_MTL_PRIVATE_DEF_SEL(setRenderTargetArrayLength_, - "setRenderTargetArrayLength:"); -_MTL_PRIVATE_DEF_SEL(setRenderTargetHeight_, - "setRenderTargetHeight:"); -_MTL_PRIVATE_DEF_SEL(setRenderTargetWidth_, - "setRenderTargetWidth:"); -_MTL_PRIVATE_DEF_SEL(setRequiredThreadsPerMeshThreadgroup_, - "setRequiredThreadsPerMeshThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(setRequiredThreadsPerObjectThreadgroup_, - "setRequiredThreadsPerObjectThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(setRequiredThreadsPerThreadgroup_, - "setRequiredThreadsPerThreadgroup:"); -_MTL_PRIVATE_DEF_SEL(setResolveDepthPlane_, - "setResolveDepthPlane:"); -_MTL_PRIVATE_DEF_SEL(setResolveLevel_, - "setResolveLevel:"); -_MTL_PRIVATE_DEF_SEL(setResolveSlice_, - "setResolveSlice:"); -_MTL_PRIVATE_DEF_SEL(setResolveTexture_, - "setResolveTexture:"); -_MTL_PRIVATE_DEF_SEL(setResource_atBufferIndex_, - "setResource:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setResourceOptions_, - "setResourceOptions:"); -_MTL_PRIVATE_DEF_SEL(setResourceViewCount_, - "setResourceViewCount:"); -_MTL_PRIVATE_DEF_SEL(setRetainedReferences_, - "setRetainedReferences:"); -_MTL_PRIVATE_DEF_SEL(setRgbBlendOperation_, - "setRgbBlendOperation:"); -_MTL_PRIVATE_DEF_SEL(setSAddressMode_, - "setSAddressMode:"); -_MTL_PRIVATE_DEF_SEL(setSampleBuffer_, - "setSampleBuffer:"); -_MTL_PRIVATE_DEF_SEL(setSampleCount_, - "setSampleCount:"); -_MTL_PRIVATE_DEF_SEL(setSamplePositions_count_, - "setSamplePositions:count:"); -_MTL_PRIVATE_DEF_SEL(setSamplerState_atIndex_, - "setSamplerState:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setSamplerState_lodMinClamp_lodMaxClamp_atIndex_, - "setSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setSamplerStates_lodMinClamps_lodMaxClamps_withRange_, - "setSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); -_MTL_PRIVATE_DEF_SEL(setSamplerStates_withRange_, - "setSamplerStates:withRange:"); -_MTL_PRIVATE_DEF_SEL(setScissorRect_, - "setScissorRect:"); -_MTL_PRIVATE_DEF_SEL(setScissorRects_count_, - "setScissorRects:count:"); -_MTL_PRIVATE_DEF_SEL(setScratchBufferAllocator_, - "setScratchBufferAllocator:"); -_MTL_PRIVATE_DEF_SEL(setScreenSize_, - "setScreenSize:"); -_MTL_PRIVATE_DEF_SEL(setSegmentControlPointCount_, - "setSegmentControlPointCount:"); -_MTL_PRIVATE_DEF_SEL(setSegmentCount_, - "setSegmentCount:"); -_MTL_PRIVATE_DEF_SEL(setShaderReflection_, - "setShaderReflection:"); -_MTL_PRIVATE_DEF_SEL(setShaderValidation_, - "setShaderValidation:"); -_MTL_PRIVATE_DEF_SEL(setShouldMaximizeConcurrentCompilation_, - "setShouldMaximizeConcurrentCompilation:"); -_MTL_PRIVATE_DEF_SEL(setSignaledValue_, - "setSignaledValue:"); -_MTL_PRIVATE_DEF_SEL(setSize_, - "setSize:"); -_MTL_PRIVATE_DEF_SEL(setSlice_, - "setSlice:"); -_MTL_PRIVATE_DEF_SEL(setSliceRange_, - "setSliceRange:"); -_MTL_PRIVATE_DEF_SEL(setSource_, - "setSource:"); -_MTL_PRIVATE_DEF_SEL(setSourceAlphaBlendFactor_, - "setSourceAlphaBlendFactor:"); -_MTL_PRIVATE_DEF_SEL(setSourceRGBBlendFactor_, - "setSourceRGBBlendFactor:"); -_MTL_PRIVATE_DEF_SEL(setSparsePageSize_, - "setSparsePageSize:"); -_MTL_PRIVATE_DEF_SEL(setSpecializedName_, - "setSpecializedName:"); -_MTL_PRIVATE_DEF_SEL(setStageInRegion_, - "setStageInRegion:"); -_MTL_PRIVATE_DEF_SEL(setStageInRegionWithIndirectBuffer_indirectBufferOffset_, - "setStageInRegionWithIndirectBuffer:indirectBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setStageInputDescriptor_, - "setStageInputDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setStartOfEncoderSampleIndex_, - "setStartOfEncoderSampleIndex:"); -_MTL_PRIVATE_DEF_SEL(setStartOfFragmentSampleIndex_, - "setStartOfFragmentSampleIndex:"); -_MTL_PRIVATE_DEF_SEL(setStartOfVertexSampleIndex_, - "setStartOfVertexSampleIndex:"); -_MTL_PRIVATE_DEF_SEL(setStaticLinkingDescriptor_, - "setStaticLinkingDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setStencilAttachment_, - "setStencilAttachment:"); -_MTL_PRIVATE_DEF_SEL(setStencilAttachmentPixelFormat_, - "setStencilAttachmentPixelFormat:"); -_MTL_PRIVATE_DEF_SEL(setStencilCompareFunction_, - "setStencilCompareFunction:"); -_MTL_PRIVATE_DEF_SEL(setStencilFailureOperation_, - "setStencilFailureOperation:"); -_MTL_PRIVATE_DEF_SEL(setStencilFrontReferenceValue_backReferenceValue_, - "setStencilFrontReferenceValue:backReferenceValue:"); -_MTL_PRIVATE_DEF_SEL(setStencilReferenceValue_, - "setStencilReferenceValue:"); -_MTL_PRIVATE_DEF_SEL(setStencilResolveFilter_, - "setStencilResolveFilter:"); -_MTL_PRIVATE_DEF_SEL(setStencilStoreAction_, - "setStencilStoreAction:"); -_MTL_PRIVATE_DEF_SEL(setStencilStoreActionOptions_, - "setStencilStoreActionOptions:"); -_MTL_PRIVATE_DEF_SEL(setStepFunction_, - "setStepFunction:"); -_MTL_PRIVATE_DEF_SEL(setStepRate_, - "setStepRate:"); -_MTL_PRIVATE_DEF_SEL(setStorageMode_, - "setStorageMode:"); -_MTL_PRIVATE_DEF_SEL(setStoreAction_, - "setStoreAction:"); -_MTL_PRIVATE_DEF_SEL(setStoreActionOptions_, - "setStoreActionOptions:"); -_MTL_PRIVATE_DEF_SEL(setStride_, - "setStride:"); -_MTL_PRIVATE_DEF_SEL(setStrides_, - "setStrides:"); -_MTL_PRIVATE_DEF_SEL(setSupportAddingBinaryFunctions_, - "setSupportAddingBinaryFunctions:"); -_MTL_PRIVATE_DEF_SEL(setSupportAddingFragmentBinaryFunctions_, - "setSupportAddingFragmentBinaryFunctions:"); -_MTL_PRIVATE_DEF_SEL(setSupportAddingVertexBinaryFunctions_, - "setSupportAddingVertexBinaryFunctions:"); -_MTL_PRIVATE_DEF_SEL(setSupportArgumentBuffers_, - "setSupportArgumentBuffers:"); -_MTL_PRIVATE_DEF_SEL(setSupportAttributeStrides_, - "setSupportAttributeStrides:"); -_MTL_PRIVATE_DEF_SEL(setSupportBinaryLinking_, - "setSupportBinaryLinking:"); -_MTL_PRIVATE_DEF_SEL(setSupportColorAttachmentMapping_, - "setSupportColorAttachmentMapping:"); -_MTL_PRIVATE_DEF_SEL(setSupportDynamicAttributeStride_, - "setSupportDynamicAttributeStride:"); -_MTL_PRIVATE_DEF_SEL(setSupportFragmentBinaryLinking_, - "setSupportFragmentBinaryLinking:"); -_MTL_PRIVATE_DEF_SEL(setSupportIndirectCommandBuffers_, - "setSupportIndirectCommandBuffers:"); -_MTL_PRIVATE_DEF_SEL(setSupportMeshBinaryLinking_, - "setSupportMeshBinaryLinking:"); -_MTL_PRIVATE_DEF_SEL(setSupportObjectBinaryLinking_, - "setSupportObjectBinaryLinking:"); -_MTL_PRIVATE_DEF_SEL(setSupportRayTracing_, - "setSupportRayTracing:"); -_MTL_PRIVATE_DEF_SEL(setSupportVertexBinaryLinking_, - "setSupportVertexBinaryLinking:"); -_MTL_PRIVATE_DEF_SEL(setSwizzle_, - "setSwizzle:"); -_MTL_PRIVATE_DEF_SEL(setTAddressMode_, - "setTAddressMode:"); -_MTL_PRIVATE_DEF_SEL(setTessellationControlPointIndexType_, - "setTessellationControlPointIndexType:"); -_MTL_PRIVATE_DEF_SEL(setTessellationFactorBuffer_offset_instanceStride_, - "setTessellationFactorBuffer:offset:instanceStride:"); -_MTL_PRIVATE_DEF_SEL(setTessellationFactorFormat_, - "setTessellationFactorFormat:"); -_MTL_PRIVATE_DEF_SEL(setTessellationFactorScale_, - "setTessellationFactorScale:"); -_MTL_PRIVATE_DEF_SEL(setTessellationFactorScaleEnabled_, - "setTessellationFactorScaleEnabled:"); -_MTL_PRIVATE_DEF_SEL(setTessellationFactorStepFunction_, - "setTessellationFactorStepFunction:"); -_MTL_PRIVATE_DEF_SEL(setTessellationOutputWindingOrder_, - "setTessellationOutputWindingOrder:"); -_MTL_PRIVATE_DEF_SEL(setTessellationPartitionMode_, - "setTessellationPartitionMode:"); -_MTL_PRIVATE_DEF_SEL(setTexture_, - "setTexture:"); -_MTL_PRIVATE_DEF_SEL(setTexture_atIndex_, - "setTexture:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setTextureType_, - "setTextureType:"); -_MTL_PRIVATE_DEF_SEL(setTextureView_atIndex_, - "setTextureView:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setTextureView_descriptor_atIndex_, - "setTextureView:descriptor:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setTextureViewFromBuffer_descriptor_offset_bytesPerRow_atIndex_, - "setTextureViewFromBuffer:descriptor:offset:bytesPerRow:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setTextures_withRange_, - "setTextures:withRange:"); -_MTL_PRIVATE_DEF_SEL(setThreadGroupSizeIsMultipleOfThreadExecutionWidth_, - "setThreadGroupSizeIsMultipleOfThreadExecutionWidth:"); -_MTL_PRIVATE_DEF_SEL(setThreadgroupMemoryLength_, - "setThreadgroupMemoryLength:"); -_MTL_PRIVATE_DEF_SEL(setThreadgroupMemoryLength_atIndex_, - "setThreadgroupMemoryLength:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setThreadgroupMemoryLength_offset_atIndex_, - "setThreadgroupMemoryLength:offset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setThreadgroupSizeMatchesTileSize_, - "setThreadgroupSizeMatchesTileSize:"); -_MTL_PRIVATE_DEF_SEL(setTileAccelerationStructure_atBufferIndex_, - "setTileAccelerationStructure:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setTileAdditionalBinaryFunctions_, - "setTileAdditionalBinaryFunctions:"); -_MTL_PRIVATE_DEF_SEL(setTileBuffer_offset_atIndex_, - "setTileBuffer:offset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setTileBufferOffset_atIndex_, - "setTileBufferOffset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setTileBuffers_offsets_withRange_, - "setTileBuffers:offsets:withRange:"); -_MTL_PRIVATE_DEF_SEL(setTileBytes_length_atIndex_, - "setTileBytes:length:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setTileFunction_, - "setTileFunction:"); -_MTL_PRIVATE_DEF_SEL(setTileFunctionDescriptor_, - "setTileFunctionDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setTileHeight_, - "setTileHeight:"); -_MTL_PRIVATE_DEF_SEL(setTileIntersectionFunctionTable_atBufferIndex_, - "setTileIntersectionFunctionTable:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setTileIntersectionFunctionTables_withBufferRange_, - "setTileIntersectionFunctionTables:withBufferRange:"); -_MTL_PRIVATE_DEF_SEL(setTileSamplerState_atIndex_, - "setTileSamplerState:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setTileSamplerState_lodMinClamp_lodMaxClamp_atIndex_, - "setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setTileSamplerStates_lodMinClamps_lodMaxClamps_withRange_, - "setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); -_MTL_PRIVATE_DEF_SEL(setTileSamplerStates_withRange_, - "setTileSamplerStates:withRange:"); -_MTL_PRIVATE_DEF_SEL(setTileTexture_atIndex_, - "setTileTexture:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setTileTextures_withRange_, - "setTileTextures:withRange:"); -_MTL_PRIVATE_DEF_SEL(setTileVisibleFunctionTable_atBufferIndex_, - "setTileVisibleFunctionTable:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setTileVisibleFunctionTables_withBufferRange_, - "setTileVisibleFunctionTables:withBufferRange:"); -_MTL_PRIVATE_DEF_SEL(setTileWidth_, - "setTileWidth:"); -_MTL_PRIVATE_DEF_SEL(setTransformationMatrixBuffer_, - "setTransformationMatrixBuffer:"); -_MTL_PRIVATE_DEF_SEL(setTransformationMatrixBufferOffset_, - "setTransformationMatrixBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setTransformationMatrixLayout_, - "setTransformationMatrixLayout:"); -_MTL_PRIVATE_DEF_SEL(setTriangleCount_, - "setTriangleCount:"); -_MTL_PRIVATE_DEF_SEL(setTriangleFillMode_, - "setTriangleFillMode:"); -_MTL_PRIVATE_DEF_SEL(setType_, - "setType:"); -_MTL_PRIVATE_DEF_SEL(setUrl_, - "setUrl:"); -_MTL_PRIVATE_DEF_SEL(setUsage_, - "setUsage:"); -_MTL_PRIVATE_DEF_SEL(setVertexAccelerationStructure_atBufferIndex_, - "setVertexAccelerationStructure:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexAdditionalBinaryFunctions_, - "setVertexAdditionalBinaryFunctions:"); -_MTL_PRIVATE_DEF_SEL(setVertexAmplificationCount_viewMappings_, - "setVertexAmplificationCount:viewMappings:"); -_MTL_PRIVATE_DEF_SEL(setVertexBuffer_, - "setVertexBuffer:"); -_MTL_PRIVATE_DEF_SEL(setVertexBuffer_offset_atIndex_, - "setVertexBuffer:offset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexBuffer_offset_attributeStride_atIndex_, - "setVertexBuffer:offset:attributeStride:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexBufferOffset_, - "setVertexBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(setVertexBufferOffset_atIndex_, - "setVertexBufferOffset:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexBufferOffset_attributeStride_atIndex_, - "setVertexBufferOffset:attributeStride:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexBuffers_, - "setVertexBuffers:"); -_MTL_PRIVATE_DEF_SEL(setVertexBuffers_offsets_attributeStrides_withRange_, - "setVertexBuffers:offsets:attributeStrides:withRange:"); -_MTL_PRIVATE_DEF_SEL(setVertexBuffers_offsets_withRange_, - "setVertexBuffers:offsets:withRange:"); -_MTL_PRIVATE_DEF_SEL(setVertexBytes_length_atIndex_, - "setVertexBytes:length:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexBytes_length_attributeStride_atIndex_, - "setVertexBytes:length:attributeStride:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexDescriptor_, - "setVertexDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setVertexFormat_, - "setVertexFormat:"); -_MTL_PRIVATE_DEF_SEL(setVertexFunction_, - "setVertexFunction:"); -_MTL_PRIVATE_DEF_SEL(setVertexFunctionDescriptor_, - "setVertexFunctionDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setVertexIntersectionFunctionTable_atBufferIndex_, - "setVertexIntersectionFunctionTable:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexIntersectionFunctionTables_withBufferRange_, - "setVertexIntersectionFunctionTables:withBufferRange:"); -_MTL_PRIVATE_DEF_SEL(setVertexLinkedFunctions_, - "setVertexLinkedFunctions:"); -_MTL_PRIVATE_DEF_SEL(setVertexPreloadedLibraries_, - "setVertexPreloadedLibraries:"); -_MTL_PRIVATE_DEF_SEL(setVertexSamplerState_atIndex_, - "setVertexSamplerState:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexSamplerState_lodMinClamp_lodMaxClamp_atIndex_, - "setVertexSamplerState:lodMinClamp:lodMaxClamp:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexSamplerStates_lodMinClamps_lodMaxClamps_withRange_, - "setVertexSamplerStates:lodMinClamps:lodMaxClamps:withRange:"); -_MTL_PRIVATE_DEF_SEL(setVertexSamplerStates_withRange_, - "setVertexSamplerStates:withRange:"); -_MTL_PRIVATE_DEF_SEL(setVertexStaticLinkingDescriptor_, - "setVertexStaticLinkingDescriptor:"); -_MTL_PRIVATE_DEF_SEL(setVertexStride_, - "setVertexStride:"); -_MTL_PRIVATE_DEF_SEL(setVertexTexture_atIndex_, - "setVertexTexture:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexTextures_withRange_, - "setVertexTextures:withRange:"); -_MTL_PRIVATE_DEF_SEL(setVertexVisibleFunctionTable_atBufferIndex_, - "setVertexVisibleFunctionTable:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setVertexVisibleFunctionTables_withBufferRange_, - "setVertexVisibleFunctionTables:withBufferRange:"); -_MTL_PRIVATE_DEF_SEL(setViewport_, - "setViewport:"); -_MTL_PRIVATE_DEF_SEL(setViewports_count_, - "setViewports:count:"); -_MTL_PRIVATE_DEF_SEL(setVisibilityResultBuffer_, - "setVisibilityResultBuffer:"); -_MTL_PRIVATE_DEF_SEL(setVisibilityResultMode_offset_, - "setVisibilityResultMode:offset:"); -_MTL_PRIVATE_DEF_SEL(setVisibilityResultType_, - "setVisibilityResultType:"); -_MTL_PRIVATE_DEF_SEL(setVisibleFunctionTable_atBufferIndex_, - "setVisibleFunctionTable:atBufferIndex:"); -_MTL_PRIVATE_DEF_SEL(setVisibleFunctionTable_atIndex_, - "setVisibleFunctionTable:atIndex:"); -_MTL_PRIVATE_DEF_SEL(setVisibleFunctionTables_withBufferRange_, - "setVisibleFunctionTables:withBufferRange:"); -_MTL_PRIVATE_DEF_SEL(setVisibleFunctionTables_withRange_, - "setVisibleFunctionTables:withRange:"); -_MTL_PRIVATE_DEF_SEL(setWidth_, - "setWidth:"); -_MTL_PRIVATE_DEF_SEL(setWriteMask_, - "setWriteMask:"); -_MTL_PRIVATE_DEF_SEL(shaderReflection, - "shaderReflection"); -_MTL_PRIVATE_DEF_SEL(shaderValidation, - "shaderValidation"); -_MTL_PRIVATE_DEF_SEL(sharedCaptureManager, - "sharedCaptureManager"); -_MTL_PRIVATE_DEF_SEL(sharedListener, - "sharedListener"); -_MTL_PRIVATE_DEF_SEL(shouldMaximizeConcurrentCompilation, - "shouldMaximizeConcurrentCompilation"); -_MTL_PRIVATE_DEF_SEL(signalDrawable_, - "signalDrawable:"); -_MTL_PRIVATE_DEF_SEL(signalEvent_value_, - "signalEvent:value:"); -_MTL_PRIVATE_DEF_SEL(signaledValue, - "signaledValue"); -_MTL_PRIVATE_DEF_SEL(size, - "size"); -_MTL_PRIVATE_DEF_SEL(sizeOfCounterHeapEntry_, - "sizeOfCounterHeapEntry:"); -_MTL_PRIVATE_DEF_SEL(slice, - "slice"); -_MTL_PRIVATE_DEF_SEL(sliceRange, - "sliceRange"); -_MTL_PRIVATE_DEF_SEL(source, - "source"); -_MTL_PRIVATE_DEF_SEL(sourceAlphaBlendFactor, - "sourceAlphaBlendFactor"); -_MTL_PRIVATE_DEF_SEL(sourceRGBBlendFactor, - "sourceRGBBlendFactor"); -_MTL_PRIVATE_DEF_SEL(sparseBufferTier, - "sparseBufferTier"); -_MTL_PRIVATE_DEF_SEL(sparsePageSize, - "sparsePageSize"); -_MTL_PRIVATE_DEF_SEL(sparseTextureTier, - "sparseTextureTier"); -_MTL_PRIVATE_DEF_SEL(sparseTileSizeInBytes, - "sparseTileSizeInBytes"); -_MTL_PRIVATE_DEF_SEL(sparseTileSizeInBytesForSparsePageSize_, - "sparseTileSizeInBytesForSparsePageSize:"); -_MTL_PRIVATE_DEF_SEL(sparseTileSizeWithTextureType_pixelFormat_sampleCount_, - "sparseTileSizeWithTextureType:pixelFormat:sampleCount:"); -_MTL_PRIVATE_DEF_SEL(sparseTileSizeWithTextureType_pixelFormat_sampleCount_sparsePageSize_, - "sparseTileSizeWithTextureType:pixelFormat:sampleCount:sparsePageSize:"); -_MTL_PRIVATE_DEF_SEL(specializedName, - "specializedName"); -_MTL_PRIVATE_DEF_SEL(stageInputAttributes, - "stageInputAttributes"); -_MTL_PRIVATE_DEF_SEL(stageInputDescriptor, - "stageInputDescriptor"); -_MTL_PRIVATE_DEF_SEL(stageInputOutputDescriptor, - "stageInputOutputDescriptor"); -_MTL_PRIVATE_DEF_SEL(stages, - "stages"); -_MTL_PRIVATE_DEF_SEL(startCaptureWithCommandQueue_, - "startCaptureWithCommandQueue:"); -_MTL_PRIVATE_DEF_SEL(startCaptureWithDescriptor_error_, - "startCaptureWithDescriptor:error:"); -_MTL_PRIVATE_DEF_SEL(startCaptureWithDevice_, - "startCaptureWithDevice:"); -_MTL_PRIVATE_DEF_SEL(startCaptureWithScope_, - "startCaptureWithScope:"); -_MTL_PRIVATE_DEF_SEL(startOfEncoderSampleIndex, - "startOfEncoderSampleIndex"); -_MTL_PRIVATE_DEF_SEL(startOfFragmentSampleIndex, - "startOfFragmentSampleIndex"); -_MTL_PRIVATE_DEF_SEL(startOfVertexSampleIndex, - "startOfVertexSampleIndex"); -_MTL_PRIVATE_DEF_SEL(staticLinkingDescriptor, - "staticLinkingDescriptor"); -_MTL_PRIVATE_DEF_SEL(staticThreadgroupMemoryLength, - "staticThreadgroupMemoryLength"); -_MTL_PRIVATE_DEF_SEL(status, - "status"); -_MTL_PRIVATE_DEF_SEL(stencilAttachment, - "stencilAttachment"); -_MTL_PRIVATE_DEF_SEL(stencilAttachmentPixelFormat, - "stencilAttachmentPixelFormat"); -_MTL_PRIVATE_DEF_SEL(stencilCompareFunction, - "stencilCompareFunction"); -_MTL_PRIVATE_DEF_SEL(stencilFailureOperation, - "stencilFailureOperation"); -_MTL_PRIVATE_DEF_SEL(stencilResolveFilter, - "stencilResolveFilter"); -_MTL_PRIVATE_DEF_SEL(stepFunction, - "stepFunction"); -_MTL_PRIVATE_DEF_SEL(stepRate, - "stepRate"); -_MTL_PRIVATE_DEF_SEL(stopCapture, - "stopCapture"); -_MTL_PRIVATE_DEF_SEL(storageMode, - "storageMode"); -_MTL_PRIVATE_DEF_SEL(storeAction, - "storeAction"); -_MTL_PRIVATE_DEF_SEL(storeActionOptions, - "storeActionOptions"); -_MTL_PRIVATE_DEF_SEL(stride, - "stride"); -_MTL_PRIVATE_DEF_SEL(strides, - "strides"); -_MTL_PRIVATE_DEF_SEL(structType, - "structType"); -_MTL_PRIVATE_DEF_SEL(supportAddingBinaryFunctions, - "supportAddingBinaryFunctions"); -_MTL_PRIVATE_DEF_SEL(supportAddingFragmentBinaryFunctions, - "supportAddingFragmentBinaryFunctions"); -_MTL_PRIVATE_DEF_SEL(supportAddingVertexBinaryFunctions, - "supportAddingVertexBinaryFunctions"); -_MTL_PRIVATE_DEF_SEL(supportArgumentBuffers, - "supportArgumentBuffers"); -_MTL_PRIVATE_DEF_SEL(supportAttributeStrides, - "supportAttributeStrides"); -_MTL_PRIVATE_DEF_SEL(supportBinaryLinking, - "supportBinaryLinking"); -_MTL_PRIVATE_DEF_SEL(supportColorAttachmentMapping, - "supportColorAttachmentMapping"); -_MTL_PRIVATE_DEF_SEL(supportDynamicAttributeStride, - "supportDynamicAttributeStride"); -_MTL_PRIVATE_DEF_SEL(supportFragmentBinaryLinking, - "supportFragmentBinaryLinking"); -_MTL_PRIVATE_DEF_SEL(supportIndirectCommandBuffers, - "supportIndirectCommandBuffers"); -_MTL_PRIVATE_DEF_SEL(supportMeshBinaryLinking, - "supportMeshBinaryLinking"); -_MTL_PRIVATE_DEF_SEL(supportObjectBinaryLinking, - "supportObjectBinaryLinking"); -_MTL_PRIVATE_DEF_SEL(supportRayTracing, - "supportRayTracing"); -_MTL_PRIVATE_DEF_SEL(supportVertexBinaryLinking, - "supportVertexBinaryLinking"); -_MTL_PRIVATE_DEF_SEL(supports32BitFloatFiltering, - "supports32BitFloatFiltering"); -_MTL_PRIVATE_DEF_SEL(supports32BitMSAA, - "supports32BitMSAA"); -_MTL_PRIVATE_DEF_SEL(supportsBCTextureCompression, - "supportsBCTextureCompression"); -_MTL_PRIVATE_DEF_SEL(supportsCounterSampling_, - "supportsCounterSampling:"); -_MTL_PRIVATE_DEF_SEL(supportsDestination_, - "supportsDestination:"); -_MTL_PRIVATE_DEF_SEL(supportsDynamicLibraries, - "supportsDynamicLibraries"); -_MTL_PRIVATE_DEF_SEL(supportsFamily_, - "supportsFamily:"); -_MTL_PRIVATE_DEF_SEL(supportsFeatureSet_, - "supportsFeatureSet:"); -_MTL_PRIVATE_DEF_SEL(supportsFunctionPointers, - "supportsFunctionPointers"); -_MTL_PRIVATE_DEF_SEL(supportsFunctionPointersFromRender, - "supportsFunctionPointersFromRender"); -_MTL_PRIVATE_DEF_SEL(supportsPrimitiveMotionBlur, - "supportsPrimitiveMotionBlur"); -_MTL_PRIVATE_DEF_SEL(supportsPullModelInterpolation, - "supportsPullModelInterpolation"); -_MTL_PRIVATE_DEF_SEL(supportsQueryTextureLOD, - "supportsQueryTextureLOD"); -_MTL_PRIVATE_DEF_SEL(supportsRasterizationRateMapWithLayerCount_, - "supportsRasterizationRateMapWithLayerCount:"); -_MTL_PRIVATE_DEF_SEL(supportsRaytracing, - "supportsRaytracing"); -_MTL_PRIVATE_DEF_SEL(supportsRaytracingFromRender, - "supportsRaytracingFromRender"); -_MTL_PRIVATE_DEF_SEL(supportsRenderDynamicLibraries, - "supportsRenderDynamicLibraries"); -_MTL_PRIVATE_DEF_SEL(supportsShaderBarycentricCoordinates, - "supportsShaderBarycentricCoordinates"); -_MTL_PRIVATE_DEF_SEL(supportsTextureSampleCount_, - "supportsTextureSampleCount:"); -_MTL_PRIVATE_DEF_SEL(supportsVertexAmplificationCount_, - "supportsVertexAmplificationCount:"); -_MTL_PRIVATE_DEF_SEL(swizzle, - "swizzle"); -_MTL_PRIVATE_DEF_SEL(synchronizeResource_, - "synchronizeResource:"); -_MTL_PRIVATE_DEF_SEL(synchronizeTexture_slice_level_, - "synchronizeTexture:slice:level:"); -_MTL_PRIVATE_DEF_SEL(tAddressMode, - "tAddressMode"); -_MTL_PRIVATE_DEF_SEL(tailSizeInBytes, - "tailSizeInBytes"); -_MTL_PRIVATE_DEF_SEL(tensorDataType, - "tensorDataType"); -_MTL_PRIVATE_DEF_SEL(tensorReferenceType, - "tensorReferenceType"); -_MTL_PRIVATE_DEF_SEL(tensorSizeAndAlignWithDescriptor_, - "tensorSizeAndAlignWithDescriptor:"); -_MTL_PRIVATE_DEF_SEL(tessellationControlPointIndexType, - "tessellationControlPointIndexType"); -_MTL_PRIVATE_DEF_SEL(tessellationFactorFormat, - "tessellationFactorFormat"); -_MTL_PRIVATE_DEF_SEL(tessellationFactorStepFunction, - "tessellationFactorStepFunction"); -_MTL_PRIVATE_DEF_SEL(tessellationOutputWindingOrder, - "tessellationOutputWindingOrder"); -_MTL_PRIVATE_DEF_SEL(tessellationPartitionMode, - "tessellationPartitionMode"); -_MTL_PRIVATE_DEF_SEL(texture, - "texture"); -_MTL_PRIVATE_DEF_SEL(texture2DDescriptorWithPixelFormat_width_height_mipmapped_, - "texture2DDescriptorWithPixelFormat:width:height:mipmapped:"); -_MTL_PRIVATE_DEF_SEL(textureBarrier, - "textureBarrier"); -_MTL_PRIVATE_DEF_SEL(textureBufferDescriptorWithPixelFormat_width_resourceOptions_usage_, - "textureBufferDescriptorWithPixelFormat:width:resourceOptions:usage:"); -_MTL_PRIVATE_DEF_SEL(textureCubeDescriptorWithPixelFormat_size_mipmapped_, - "textureCubeDescriptorWithPixelFormat:size:mipmapped:"); -_MTL_PRIVATE_DEF_SEL(textureDataType, - "textureDataType"); -_MTL_PRIVATE_DEF_SEL(textureReferenceType, - "textureReferenceType"); -_MTL_PRIVATE_DEF_SEL(textureType, - "textureType"); -_MTL_PRIVATE_DEF_SEL(threadExecutionWidth, - "threadExecutionWidth"); -_MTL_PRIVATE_DEF_SEL(threadGroupSizeIsMultipleOfThreadExecutionWidth, - "threadGroupSizeIsMultipleOfThreadExecutionWidth"); -_MTL_PRIVATE_DEF_SEL(threadgroupMemoryAlignment, - "threadgroupMemoryAlignment"); -_MTL_PRIVATE_DEF_SEL(threadgroupMemoryDataSize, - "threadgroupMemoryDataSize"); -_MTL_PRIVATE_DEF_SEL(threadgroupMemoryLength, - "threadgroupMemoryLength"); -_MTL_PRIVATE_DEF_SEL(threadgroupSizeMatchesTileSize, - "threadgroupSizeMatchesTileSize"); -_MTL_PRIVATE_DEF_SEL(tileAdditionalBinaryFunctions, - "tileAdditionalBinaryFunctions"); -_MTL_PRIVATE_DEF_SEL(tileArguments, - "tileArguments"); -_MTL_PRIVATE_DEF_SEL(tileBindings, - "tileBindings"); -_MTL_PRIVATE_DEF_SEL(tileBuffers, - "tileBuffers"); -_MTL_PRIVATE_DEF_SEL(tileFunction, - "tileFunction"); -_MTL_PRIVATE_DEF_SEL(tileFunctionDescriptor, - "tileFunctionDescriptor"); -_MTL_PRIVATE_DEF_SEL(tileHeight, - "tileHeight"); -_MTL_PRIVATE_DEF_SEL(tileLinkingDescriptor, - "tileLinkingDescriptor"); -_MTL_PRIVATE_DEF_SEL(tileWidth, - "tileWidth"); -_MTL_PRIVATE_DEF_SEL(transformationMatrixBuffer, - "transformationMatrixBuffer"); -_MTL_PRIVATE_DEF_SEL(transformationMatrixBufferOffset, - "transformationMatrixBufferOffset"); -_MTL_PRIVATE_DEF_SEL(transformationMatrixLayout, - "transformationMatrixLayout"); -_MTL_PRIVATE_DEF_SEL(triangleCount, - "triangleCount"); -_MTL_PRIVATE_DEF_SEL(tryCancel, - "tryCancel"); -_MTL_PRIVATE_DEF_SEL(type, - "type"); -_MTL_PRIVATE_DEF_SEL(updateBufferMappings_heap_operations_count_, - "updateBufferMappings:heap:operations:count:"); -_MTL_PRIVATE_DEF_SEL(updateFence_, - "updateFence:"); -_MTL_PRIVATE_DEF_SEL(updateFence_afterEncoderStages_, - "updateFence:afterEncoderStages:"); -_MTL_PRIVATE_DEF_SEL(updateFence_afterStages_, - "updateFence:afterStages:"); -_MTL_PRIVATE_DEF_SEL(updateTextureMapping_mode_indirectBuffer_indirectBufferOffset_, - "updateTextureMapping:mode:indirectBuffer:indirectBufferOffset:"); -_MTL_PRIVATE_DEF_SEL(updateTextureMapping_mode_region_mipLevel_slice_, - "updateTextureMapping:mode:region:mipLevel:slice:"); -_MTL_PRIVATE_DEF_SEL(updateTextureMappings_heap_operations_count_, - "updateTextureMappings:heap:operations:count:"); -_MTL_PRIVATE_DEF_SEL(updateTextureMappings_mode_regions_mipLevels_slices_numRegions_, - "updateTextureMappings:mode:regions:mipLevels:slices:numRegions:"); -_MTL_PRIVATE_DEF_SEL(url, - "url"); -_MTL_PRIVATE_DEF_SEL(usage, - "usage"); -_MTL_PRIVATE_DEF_SEL(useHeap_, - "useHeap:"); -_MTL_PRIVATE_DEF_SEL(useHeap_stages_, - "useHeap:stages:"); -_MTL_PRIVATE_DEF_SEL(useHeaps_count_, - "useHeaps:count:"); -_MTL_PRIVATE_DEF_SEL(useHeaps_count_stages_, - "useHeaps:count:stages:"); -_MTL_PRIVATE_DEF_SEL(useResidencySet_, - "useResidencySet:"); -_MTL_PRIVATE_DEF_SEL(useResidencySets_count_, - "useResidencySets:count:"); -_MTL_PRIVATE_DEF_SEL(useResource_usage_, - "useResource:usage:"); -_MTL_PRIVATE_DEF_SEL(useResource_usage_stages_, - "useResource:usage:stages:"); -_MTL_PRIVATE_DEF_SEL(useResources_count_usage_, - "useResources:count:usage:"); -_MTL_PRIVATE_DEF_SEL(useResources_count_usage_stages_, - "useResources:count:usage:stages:"); -_MTL_PRIVATE_DEF_SEL(usedSize, - "usedSize"); -_MTL_PRIVATE_DEF_SEL(vertexAdditionalBinaryFunctions, - "vertexAdditionalBinaryFunctions"); -_MTL_PRIVATE_DEF_SEL(vertexArguments, - "vertexArguments"); -_MTL_PRIVATE_DEF_SEL(vertexAttributes, - "vertexAttributes"); -_MTL_PRIVATE_DEF_SEL(vertexBindings, - "vertexBindings"); -_MTL_PRIVATE_DEF_SEL(vertexBuffer, - "vertexBuffer"); -_MTL_PRIVATE_DEF_SEL(vertexBufferOffset, - "vertexBufferOffset"); -_MTL_PRIVATE_DEF_SEL(vertexBuffers, - "vertexBuffers"); -_MTL_PRIVATE_DEF_SEL(vertexDescriptor, - "vertexDescriptor"); -_MTL_PRIVATE_DEF_SEL(vertexFormat, - "vertexFormat"); -_MTL_PRIVATE_DEF_SEL(vertexFunction, - "vertexFunction"); -_MTL_PRIVATE_DEF_SEL(vertexFunctionDescriptor, - "vertexFunctionDescriptor"); -_MTL_PRIVATE_DEF_SEL(vertexLinkedFunctions, - "vertexLinkedFunctions"); -_MTL_PRIVATE_DEF_SEL(vertexLinkingDescriptor, - "vertexLinkingDescriptor"); -_MTL_PRIVATE_DEF_SEL(vertexPreloadedLibraries, - "vertexPreloadedLibraries"); -_MTL_PRIVATE_DEF_SEL(vertexStaticLinkingDescriptor, - "vertexStaticLinkingDescriptor"); -_MTL_PRIVATE_DEF_SEL(vertexStride, - "vertexStride"); -_MTL_PRIVATE_DEF_SEL(vertical, - "vertical"); -_MTL_PRIVATE_DEF_SEL(verticalSampleStorage, - "verticalSampleStorage"); -_MTL_PRIVATE_DEF_SEL(visibilityResultBuffer, - "visibilityResultBuffer"); -_MTL_PRIVATE_DEF_SEL(visibilityResultType, - "visibilityResultType"); -_MTL_PRIVATE_DEF_SEL(visibleFunctionTableDescriptor, - "visibleFunctionTableDescriptor"); -_MTL_PRIVATE_DEF_SEL(waitForDrawable_, - "waitForDrawable:"); -_MTL_PRIVATE_DEF_SEL(waitForEvent_value_, - "waitForEvent:value:"); -_MTL_PRIVATE_DEF_SEL(waitForFence_, - "waitForFence:"); -_MTL_PRIVATE_DEF_SEL(waitForFence_beforeEncoderStages_, - "waitForFence:beforeEncoderStages:"); -_MTL_PRIVATE_DEF_SEL(waitForFence_beforeStages_, - "waitForFence:beforeStages:"); -_MTL_PRIVATE_DEF_SEL(waitUntilCompleted, - "waitUntilCompleted"); -_MTL_PRIVATE_DEF_SEL(waitUntilScheduled, - "waitUntilScheduled"); -_MTL_PRIVATE_DEF_SEL(waitUntilSignaledValue_timeoutMS_, - "waitUntilSignaledValue:timeoutMS:"); -_MTL_PRIVATE_DEF_SEL(width, - "width"); -_MTL_PRIVATE_DEF_SEL(writeCompactedAccelerationStructureSize_toBuffer_, - "writeCompactedAccelerationStructureSize:toBuffer:"); -_MTL_PRIVATE_DEF_SEL(writeCompactedAccelerationStructureSize_toBuffer_offset_, - "writeCompactedAccelerationStructureSize:toBuffer:offset:"); -_MTL_PRIVATE_DEF_SEL(writeCompactedAccelerationStructureSize_toBuffer_offset_sizeDataType_, - "writeCompactedAccelerationStructureSize:toBuffer:offset:sizeDataType:"); -_MTL_PRIVATE_DEF_SEL(writeMask, - "writeMask"); -_MTL_PRIVATE_DEF_SEL(writeTimestampIntoHeap_atIndex_, - "writeTimestampIntoHeap:atIndex:"); -_MTL_PRIVATE_DEF_SEL(writeTimestampWithGranularity_afterStage_intoHeap_atIndex_, - "writeTimestampWithGranularity:afterStage:intoHeap:atIndex:"); -_MTL_PRIVATE_DEF_SEL(writeTimestampWithGranularity_intoHeap_atIndex_, - "writeTimestampWithGranularity:intoHeap:atIndex:"); - -} diff --git a/thirdparty/metal-cpp/Metal/MTLHeap.hpp b/thirdparty/metal-cpp/Metal/MTLHeap.hpp index 251b284a8920..6a501910df4f 100644 --- a/thirdparty/metal-cpp/Metal/MTLHeap.hpp +++ b/thirdparty/metal-cpp/Metal/MTLHeap.hpp @@ -1,318 +1,295 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLHeap.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLAllocation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLResource.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLAllocation.hpp" + +namespace MTL { + class AccelerationStructure; + class AccelerationStructureDescriptor; + class Buffer; + class Device; + class Texture; + class TextureDescriptor; + enum CPUCacheMode : NS::UInteger; + enum HazardTrackingMode : NS::UInteger; + enum PurgeableState : NS::UInteger; + using ResourceOptions = NS::UInteger; + enum SparsePageSize : NS::Integer; + enum StorageMode : NS::UInteger; +} +namespace NS { + class String; +} namespace MTL { -class AccelerationStructure; -class AccelerationStructureDescriptor; -class Buffer; -class Device; -class HeapDescriptor; -class Texture; -class TextureDescriptor; + _MTL_ENUM(NS::Integer, HeapType) { HeapTypeAutomatic = 0, HeapTypePlacement = 1, HeapTypeSparse = 2, }; + +class HeapDescriptor; +class Heap; + class HeapDescriptor : public NS::Copying { public: static HeapDescriptor* alloc(); + HeapDescriptor* init() const; + + MTL::CPUCacheMode cpuCacheMode() const; + MTL::HazardTrackingMode hazardTrackingMode() const; + MTL::SparsePageSize maxCompatiblePlacementSparsePageSize() const; + MTL::ResourceOptions resourceOptions() const; + void setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode); + void setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode); + void setMaxCompatiblePlacementSparsePageSize(MTL::SparsePageSize maxCompatiblePlacementSparsePageSize); + void setResourceOptions(MTL::ResourceOptions resourceOptions); + void setSize(NS::UInteger size); + void setSparsePageSize(MTL::SparsePageSize sparsePageSize); + void setStorageMode(MTL::StorageMode storageMode); + void setType(MTL::HeapType type); + NS::UInteger size() const; + MTL::SparsePageSize sparsePageSize() const; + MTL::StorageMode storageMode() const; + MTL::HeapType type() const; - CPUCacheMode cpuCacheMode() const; - - HazardTrackingMode hazardTrackingMode() const; - - HeapDescriptor* init(); - - SparsePageSize maxCompatiblePlacementSparsePageSize() const; - - ResourceOptions resourceOptions() const; - - void setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode); - - void setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode); - - void setMaxCompatiblePlacementSparsePageSize(MTL::SparsePageSize maxCompatiblePlacementSparsePageSize); - - void setResourceOptions(MTL::ResourceOptions resourceOptions); - - void setSize(NS::UInteger size); - - void setSparsePageSize(MTL::SparsePageSize sparsePageSize); - - void setStorageMode(MTL::StorageMode storageMode); - - void setType(MTL::HeapType type); - - NS::UInteger size() const; - SparsePageSize sparsePageSize() const; - - StorageMode storageMode() const; - - HeapType type() const; }; -class Heap : public NS::Referencing + +class Heap : public NS::Referencing { public: - CPUCacheMode cpuCacheMode() const; - - NS::UInteger currentAllocatedSize() const; - - Device* device() const; - - HazardTrackingMode hazardTrackingMode() const; - - NS::String* label() const; - - NS::UInteger maxAvailableSize(NS::UInteger alignment); - - AccelerationStructure* newAccelerationStructure(NS::UInteger size); - AccelerationStructure* newAccelerationStructure(const MTL::AccelerationStructureDescriptor* descriptor); - AccelerationStructure* newAccelerationStructure(NS::UInteger size, NS::UInteger offset); - AccelerationStructure* newAccelerationStructure(const MTL::AccelerationStructureDescriptor* descriptor, NS::UInteger offset); + MTL::CPUCacheMode cpuCacheMode() const; + NS::UInteger currentAllocatedSize() const; + MTL::Device* device() const; + MTL::HazardTrackingMode hazardTrackingMode() const; + NS::String* label() const; + NS::UInteger maxAvailableSize(NS::UInteger alignment); + MTL::AccelerationStructure* newAccelerationStructure(NS::UInteger size); + MTL::AccelerationStructure* newAccelerationStructure(MTL::AccelerationStructureDescriptor* descriptor); + MTL::AccelerationStructure* newAccelerationStructure(NS::UInteger size, NS::UInteger offset); + MTL::AccelerationStructure* newAccelerationStructure(MTL::AccelerationStructureDescriptor* descriptor, NS::UInteger offset); + MTL::Buffer* newBuffer(NS::UInteger length, MTL::ResourceOptions options); + MTL::Buffer* newBuffer(NS::UInteger length, MTL::ResourceOptions options, NS::UInteger offset); + MTL::Texture* newTexture(MTL::TextureDescriptor* descriptor); + MTL::Texture* newTexture(MTL::TextureDescriptor* descriptor, NS::UInteger offset); + MTL::ResourceOptions resourceOptions() const; + void setLabel(NS::String* label); + MTL::PurgeableState setPurgeableState(MTL::PurgeableState state); + NS::UInteger size() const; + MTL::StorageMode storageMode() const; + MTL::HeapType type() const; + NS::UInteger usedSize() const; - Buffer* newBuffer(NS::UInteger length, MTL::ResourceOptions options); - Buffer* newBuffer(NS::UInteger length, MTL::ResourceOptions options, NS::UInteger offset); - - Texture* newTexture(const MTL::TextureDescriptor* descriptor); - Texture* newTexture(const MTL::TextureDescriptor* descriptor, NS::UInteger offset); - - ResourceOptions resourceOptions() const; - - void setLabel(const NS::String* label); - - PurgeableState setPurgeableState(MTL::PurgeableState state); - - NS::UInteger size() const; +}; - StorageMode storageMode() const; +} // namespace MTL - HeapType type() const; +// --- Class symbols + inline implementations --- - NS::UInteger usedSize() const; -}; +extern "C" void *OBJC_CLASS_$_MTLHeapDescriptor; +extern "C" void *OBJC_CLASS_$_MTLHeap; -} _MTL_INLINE MTL::HeapDescriptor* MTL::HeapDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLHeapDescriptor)); + return _MTL_msg_MTL__HeapDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLHeapDescriptor, nullptr); } -_MTL_INLINE MTL::CPUCacheMode MTL::HeapDescriptor::cpuCacheMode() const +_MTL_INLINE MTL::HeapDescriptor* MTL::HeapDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(cpuCacheMode)); + return _MTL_msg_MTL__HeapDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::HazardTrackingMode MTL::HeapDescriptor::hazardTrackingMode() const +_MTL_INLINE NS::UInteger MTL::HeapDescriptor::size() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(hazardTrackingMode)); + return _MTL_msg_NS__UInteger_size((const void*)this, nullptr); } -_MTL_INLINE MTL::HeapDescriptor* MTL::HeapDescriptor::init() +_MTL_INLINE void MTL::HeapDescriptor::setSize(NS::UInteger size) { - return NS::Object::init(); + _MTL_msg_v_setSize__NS__UInteger((const void*)this, nullptr, size); } -_MTL_INLINE MTL::SparsePageSize MTL::HeapDescriptor::maxCompatiblePlacementSparsePageSize() const +_MTL_INLINE MTL::StorageMode MTL::HeapDescriptor::storageMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxCompatiblePlacementSparsePageSize)); + return _MTL_msg_MTL__StorageMode_storageMode((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceOptions MTL::HeapDescriptor::resourceOptions() const +_MTL_INLINE void MTL::HeapDescriptor::setStorageMode(MTL::StorageMode storageMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resourceOptions)); + _MTL_msg_v_setStorageMode__MTL__StorageMode((const void*)this, nullptr, storageMode); } -_MTL_INLINE void MTL::HeapDescriptor::setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode) +_MTL_INLINE MTL::CPUCacheMode MTL::HeapDescriptor::cpuCacheMode() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCpuCacheMode_), cpuCacheMode); + return _MTL_msg_MTL__CPUCacheMode_cpuCacheMode((const void*)this, nullptr); } -_MTL_INLINE void MTL::HeapDescriptor::setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode) +_MTL_INLINE void MTL::HeapDescriptor::setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setHazardTrackingMode_), hazardTrackingMode); + _MTL_msg_v_setCpuCacheMode__MTL__CPUCacheMode((const void*)this, nullptr, cpuCacheMode); } -_MTL_INLINE void MTL::HeapDescriptor::setMaxCompatiblePlacementSparsePageSize(MTL::SparsePageSize maxCompatiblePlacementSparsePageSize) +_MTL_INLINE MTL::SparsePageSize MTL::HeapDescriptor::sparsePageSize() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxCompatiblePlacementSparsePageSize_), maxCompatiblePlacementSparsePageSize); + return _MTL_msg_MTL__SparsePageSize_sparsePageSize((const void*)this, nullptr); } -_MTL_INLINE void MTL::HeapDescriptor::setResourceOptions(MTL::ResourceOptions resourceOptions) +_MTL_INLINE void MTL::HeapDescriptor::setSparsePageSize(MTL::SparsePageSize sparsePageSize) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setResourceOptions_), resourceOptions); + _MTL_msg_v_setSparsePageSize__MTL__SparsePageSize((const void*)this, nullptr, sparsePageSize); } -_MTL_INLINE void MTL::HeapDescriptor::setSize(NS::UInteger size) +_MTL_INLINE MTL::HazardTrackingMode MTL::HeapDescriptor::hazardTrackingMode() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSize_), size); + return _MTL_msg_MTL__HazardTrackingMode_hazardTrackingMode((const void*)this, nullptr); } -_MTL_INLINE void MTL::HeapDescriptor::setSparsePageSize(MTL::SparsePageSize sparsePageSize) +_MTL_INLINE void MTL::HeapDescriptor::setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSparsePageSize_), sparsePageSize); + _MTL_msg_v_setHazardTrackingMode__MTL__HazardTrackingMode((const void*)this, nullptr, hazardTrackingMode); } -_MTL_INLINE void MTL::HeapDescriptor::setStorageMode(MTL::StorageMode storageMode) +_MTL_INLINE MTL::ResourceOptions MTL::HeapDescriptor::resourceOptions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStorageMode_), storageMode); + return _MTL_msg_MTL__ResourceOptions_resourceOptions((const void*)this, nullptr); } -_MTL_INLINE void MTL::HeapDescriptor::setType(MTL::HeapType type) +_MTL_INLINE void MTL::HeapDescriptor::setResourceOptions(MTL::ResourceOptions resourceOptions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setType_), type); + _MTL_msg_v_setResourceOptions__MTL__ResourceOptions((const void*)this, nullptr, resourceOptions); } -_MTL_INLINE NS::UInteger MTL::HeapDescriptor::size() const +_MTL_INLINE MTL::HeapType MTL::HeapDescriptor::type() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(size)); + return _MTL_msg_MTL__HeapType_type((const void*)this, nullptr); } -_MTL_INLINE MTL::SparsePageSize MTL::HeapDescriptor::sparsePageSize() const +_MTL_INLINE void MTL::HeapDescriptor::setType(MTL::HeapType type) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sparsePageSize)); + _MTL_msg_v_setType__MTL__HeapType((const void*)this, nullptr, type); } -_MTL_INLINE MTL::StorageMode MTL::HeapDescriptor::storageMode() const +_MTL_INLINE MTL::SparsePageSize MTL::HeapDescriptor::maxCompatiblePlacementSparsePageSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(storageMode)); + return _MTL_msg_MTL__SparsePageSize_maxCompatiblePlacementSparsePageSize((const void*)this, nullptr); } -_MTL_INLINE MTL::HeapType MTL::HeapDescriptor::type() const +_MTL_INLINE void MTL::HeapDescriptor::setMaxCompatiblePlacementSparsePageSize(MTL::SparsePageSize maxCompatiblePlacementSparsePageSize) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); + _MTL_msg_v_setMaxCompatiblePlacementSparsePageSize__MTL__SparsePageSize((const void*)this, nullptr, maxCompatiblePlacementSparsePageSize); } -_MTL_INLINE MTL::CPUCacheMode MTL::Heap::cpuCacheMode() const +_MTL_INLINE NS::String* MTL::Heap::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(cpuCacheMode)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Heap::currentAllocatedSize() const +_MTL_INLINE void MTL::Heap::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(currentAllocatedSize)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } _MTL_INLINE MTL::Device* MTL::Heap::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE MTL::HazardTrackingMode MTL::Heap::hazardTrackingMode() const +_MTL_INLINE MTL::StorageMode MTL::Heap::storageMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(hazardTrackingMode)); + return _MTL_msg_MTL__StorageMode_storageMode((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::Heap::label() const +_MTL_INLINE MTL::CPUCacheMode MTL::Heap::cpuCacheMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__CPUCacheMode_cpuCacheMode((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Heap::maxAvailableSize(NS::UInteger alignment) +_MTL_INLINE MTL::HazardTrackingMode MTL::Heap::hazardTrackingMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxAvailableSizeWithAlignment_), alignment); + return _MTL_msg_MTL__HazardTrackingMode_hazardTrackingMode((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructure* MTL::Heap::newAccelerationStructure(NS::UInteger size) +_MTL_INLINE MTL::ResourceOptions MTL::Heap::resourceOptions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newAccelerationStructureWithSize_), size); + return _MTL_msg_MTL__ResourceOptions_resourceOptions((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructure* MTL::Heap::newAccelerationStructure(const MTL::AccelerationStructureDescriptor* descriptor) +_MTL_INLINE NS::UInteger MTL::Heap::size() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newAccelerationStructureWithDescriptor_), descriptor); + return _MTL_msg_NS__UInteger_size((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructure* MTL::Heap::newAccelerationStructure(NS::UInteger size, NS::UInteger offset) +_MTL_INLINE NS::UInteger MTL::Heap::usedSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newAccelerationStructureWithSize_offset_), size, offset); + return _MTL_msg_NS__UInteger_usedSize((const void*)this, nullptr); } -_MTL_INLINE MTL::AccelerationStructure* MTL::Heap::newAccelerationStructure(const MTL::AccelerationStructureDescriptor* descriptor, NS::UInteger offset) +_MTL_INLINE NS::UInteger MTL::Heap::currentAllocatedSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newAccelerationStructureWithDescriptor_offset_), descriptor, offset); + return _MTL_msg_NS__UInteger_currentAllocatedSize((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::Heap::newBuffer(NS::UInteger length, MTL::ResourceOptions options) +_MTL_INLINE MTL::HeapType MTL::Heap::type() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBufferWithLength_options_), length, options); + return _MTL_msg_MTL__HeapType_type((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::Heap::newBuffer(NS::UInteger length, MTL::ResourceOptions options, NS::UInteger offset) +_MTL_INLINE NS::UInteger MTL::Heap::maxAvailableSize(NS::UInteger alignment) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBufferWithLength_options_offset_), length, options, offset); + return _MTL_msg_NS__UInteger_maxAvailableSizeWithAlignment__NS__UInteger((const void*)this, nullptr, alignment); } -_MTL_INLINE MTL::Texture* MTL::Heap::newTexture(const MTL::TextureDescriptor* descriptor) +_MTL_INLINE MTL::Buffer* MTL::Heap::newBuffer(NS::UInteger length, MTL::ResourceOptions options) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_), descriptor); + return _MTL_msg_MTL__Bufferp_newBufferWithLength_options__NS__UInteger_MTL__ResourceOptions((const void*)this, nullptr, length, options); } -_MTL_INLINE MTL::Texture* MTL::Heap::newTexture(const MTL::TextureDescriptor* descriptor, NS::UInteger offset) +_MTL_INLINE MTL::Texture* MTL::Heap::newTexture(MTL::TextureDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_offset_), descriptor, offset); + return _MTL_msg_MTL__Texturep_newTextureWithDescriptor__MTL__TextureDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE MTL::ResourceOptions MTL::Heap::resourceOptions() const +_MTL_INLINE MTL::PurgeableState MTL::Heap::setPurgeableState(MTL::PurgeableState state) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resourceOptions)); + return _MTL_msg_MTL__PurgeableState_setPurgeableState__MTL__PurgeableState((const void*)this, nullptr, state); } -_MTL_INLINE void MTL::Heap::setLabel(const NS::String* label) +_MTL_INLINE MTL::Buffer* MTL::Heap::newBuffer(NS::UInteger length, MTL::ResourceOptions options, NS::UInteger offset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_MTL__Bufferp_newBufferWithLength_options_offset__NS__UInteger_MTL__ResourceOptions_NS__UInteger((const void*)this, nullptr, length, options, offset); } -_MTL_INLINE MTL::PurgeableState MTL::Heap::setPurgeableState(MTL::PurgeableState state) +_MTL_INLINE MTL::Texture* MTL::Heap::newTexture(MTL::TextureDescriptor* descriptor, NS::UInteger offset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(setPurgeableState_), state); + return _MTL_msg_MTL__Texturep_newTextureWithDescriptor_offset__MTL__TextureDescriptorp_NS__UInteger((const void*)this, nullptr, descriptor, offset); } -_MTL_INLINE NS::UInteger MTL::Heap::size() const +_MTL_INLINE MTL::AccelerationStructure* MTL::Heap::newAccelerationStructure(NS::UInteger size) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(size)); + return _MTL_msg_MTL__AccelerationStructurep_newAccelerationStructureWithSize__NS__UInteger((const void*)this, nullptr, size); } -_MTL_INLINE MTL::StorageMode MTL::Heap::storageMode() const +_MTL_INLINE MTL::AccelerationStructure* MTL::Heap::newAccelerationStructure(MTL::AccelerationStructureDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(storageMode)); + return _MTL_msg_MTL__AccelerationStructurep_newAccelerationStructureWithDescriptor__MTL__AccelerationStructureDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE MTL::HeapType MTL::Heap::type() const +_MTL_INLINE MTL::AccelerationStructure* MTL::Heap::newAccelerationStructure(NS::UInteger size, NS::UInteger offset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); + return _MTL_msg_MTL__AccelerationStructurep_newAccelerationStructureWithSize_offset__NS__UInteger_NS__UInteger((const void*)this, nullptr, size, offset); } -_MTL_INLINE NS::UInteger MTL::Heap::usedSize() const +_MTL_INLINE MTL::AccelerationStructure* MTL::Heap::newAccelerationStructure(MTL::AccelerationStructureDescriptor* descriptor, NS::UInteger offset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(usedSize)); + return _MTL_msg_MTL__AccelerationStructurep_newAccelerationStructureWithDescriptor_offset__MTL__AccelerationStructureDescriptorp_NS__UInteger((const void*)this, nullptr, descriptor, offset); } diff --git a/thirdparty/metal-cpp/Metal/MTLIOCommandBuffer.hpp b/thirdparty/metal-cpp/Metal/MTLIOCommandBuffer.hpp index 9402318d7c94..d9d98c4c67d0 100644 --- a/thirdparty/metal-cpp/Metal/MTLIOCommandBuffer.hpp +++ b/thirdparty/metal-cpp/Metal/MTLIOCommandBuffer.hpp @@ -1,39 +1,27 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLIOCommandBuffer.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Buffer; + class IOFileHandle; + class SharedEvent; + class Texture; +} +namespace NS { + class Error; + class String; +} namespace MTL { -class Buffer; -class IOCommandBuffer; -class IOFileHandle; -class SharedEvent; -class Texture; + _MTL_ENUM(NS::Integer, IOStatus) { IOStatusPending = 0, IOStatusCancelled = 1, @@ -41,142 +29,130 @@ _MTL_ENUM(NS::Integer, IOStatus) { IOStatusComplete = 3, }; -using IOCommandBufferHandler = void (^)(MTL::IOCommandBuffer*); -using IOCommandBufferHandlerFunction = std::function; class IOCommandBuffer : public NS::Referencing { public: - void addBarrier(); - - void addCompletedHandler(const MTL::IOCommandBufferHandler block); - void addCompletedHandler(const MTL::IOCommandBufferHandlerFunction& function); - - void commit(); - - void copyStatusToBuffer(const MTL::Buffer* buffer, NS::UInteger offset); - - void enqueue(); - - NS::Error* error() const; + void addBarrier(); + void addCompletedHandler(MTL::IOCommandBufferHandler block); + void addCompletedHandler(const MTL::IOCommandBufferHandlerFunction& block); + void commit(); + void copyStatusToBuffer(MTL::Buffer* buffer, NS::UInteger offset); + void enqueue(); + NS::Error* error() const; + NS::String* label() const; + void loadBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger size, MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset); + void loadBytes(void * pointer, NS::UInteger size, MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset); + void loadTexture(MTL::Texture* texture, NS::UInteger slice, NS::UInteger level, MTL::Size size, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Origin destinationOrigin, MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset); + void popDebugGroup(); + void pushDebugGroup(NS::String* string); + void setLabel(NS::String* label); + void signalEvent(MTL::SharedEvent* event, uint64_t value); + MTL::IOStatus status() const; + void tryCancel(); + void waitForEvent(MTL::SharedEvent* event, uint64_t value); + void waitUntilCompleted(); - NS::String* label() const; - - void loadBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger size, const MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset); - - void loadBytes(const void* pointer, NS::UInteger size, const MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset); - - void loadTexture(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level, MTL::Size size, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Origin destinationOrigin, const MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset); - - void popDebugGroup(); - - void pushDebugGroup(const NS::String* string); - - void setLabel(const NS::String* label); - - void signalEvent(const MTL::SharedEvent* event, uint64_t value); +}; - IOStatus status() const; +} // namespace MTL - void tryCancel(); +// --- Class symbols + inline implementations --- - void wait(const MTL::SharedEvent* event, uint64_t value); - void waitUntilCompleted(); -}; +extern "C" void *OBJC_CLASS_$_MTLIOCommandBuffer; -} -_MTL_INLINE void MTL::IOCommandBuffer::addBarrier() +_MTL_INLINE NS::String* MTL::IOCommandBuffer::label() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addBarrier)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandBuffer::addCompletedHandler(const MTL::IOCommandBufferHandler block) +_MTL_INLINE void MTL::IOCommandBuffer::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addCompletedHandler_), block); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL::IOCommandBuffer::addCompletedHandler(const MTL::IOCommandBufferHandlerFunction& function) +_MTL_INLINE MTL::IOStatus MTL::IOCommandBuffer::status() const { - __block MTL::IOCommandBufferHandlerFunction blockFunction = function; - addCompletedHandler(^(MTL::IOCommandBuffer* pCommandBuffer) { blockFunction(pCommandBuffer); }); + return _MTL_msg_MTL__IOStatus_status((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandBuffer::commit() +_MTL_INLINE NS::Error* MTL::IOCommandBuffer::error() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(commit)); + return _MTL_msg_NS__Errorp_error((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandBuffer::copyStatusToBuffer(const MTL::Buffer* buffer, NS::UInteger offset) +_MTL_INLINE void MTL::IOCommandBuffer::addCompletedHandler(MTL::IOCommandBufferHandler block) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyStatusToBuffer_offset_), buffer, offset); + _MTL_msg_v_addCompletedHandler__MTL__IOCommandBufferHandler((const void*)this, nullptr, block); } -_MTL_INLINE void MTL::IOCommandBuffer::enqueue() +_MTL_INLINE void MTL::IOCommandBuffer::addCompletedHandler(const MTL::IOCommandBufferHandlerFunction& block) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(enqueue)); + __block MTL::IOCommandBufferHandlerFunction blockFunction = block; + addCompletedHandler(^(MTL::IOCommandBuffer* x0) { blockFunction(x0); }); } -_MTL_INLINE NS::Error* MTL::IOCommandBuffer::error() const +_MTL_INLINE void MTL::IOCommandBuffer::loadBytes(void * pointer, NS::UInteger size, MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(error)); + _MTL_msg_v_loadBytes_size_sourceHandle_sourceHandleOffset__voidp_NS__UInteger_MTL__IOFileHandlep_NS__UInteger((const void*)this, nullptr, pointer, size, sourceHandle, sourceHandleOffset); } -_MTL_INLINE NS::String* MTL::IOCommandBuffer::label() const +_MTL_INLINE void MTL::IOCommandBuffer::loadBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger size, MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL_msg_v_loadBuffer_offset_size_sourceHandle_sourceHandleOffset__MTL__Bufferp_NS__UInteger_NS__UInteger_MTL__IOFileHandlep_NS__UInteger((const void*)this, nullptr, buffer, offset, size, sourceHandle, sourceHandleOffset); } -_MTL_INLINE void MTL::IOCommandBuffer::loadBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger size, const MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset) +_MTL_INLINE void MTL::IOCommandBuffer::loadTexture(MTL::Texture* texture, NS::UInteger slice, NS::UInteger level, MTL::Size size, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Origin destinationOrigin, MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(loadBuffer_offset_size_sourceHandle_sourceHandleOffset_), buffer, offset, size, sourceHandle, sourceHandleOffset); + _MTL_msg_v_loadTexture_slice_level_size_sourceBytesPerRow_sourceBytesPerImage_destinationOrigin_sourceHandle_sourceHandleOffset__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Size_NS__UInteger_NS__UInteger_MTL__Origin_MTL__IOFileHandlep_NS__UInteger((const void*)this, nullptr, texture, slice, level, size, sourceBytesPerRow, sourceBytesPerImage, destinationOrigin, sourceHandle, sourceHandleOffset); } -_MTL_INLINE void MTL::IOCommandBuffer::loadBytes(const void* pointer, NS::UInteger size, const MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset) +_MTL_INLINE void MTL::IOCommandBuffer::copyStatusToBuffer(MTL::Buffer* buffer, NS::UInteger offset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(loadBytes_size_sourceHandle_sourceHandleOffset_), pointer, size, sourceHandle, sourceHandleOffset); + _MTL_msg_v_copyStatusToBuffer_offset__MTL__Bufferp_NS__UInteger((const void*)this, nullptr, buffer, offset); } -_MTL_INLINE void MTL::IOCommandBuffer::loadTexture(const MTL::Texture* texture, NS::UInteger slice, NS::UInteger level, MTL::Size size, NS::UInteger sourceBytesPerRow, NS::UInteger sourceBytesPerImage, MTL::Origin destinationOrigin, const MTL::IOFileHandle* sourceHandle, NS::UInteger sourceHandleOffset) +_MTL_INLINE void MTL::IOCommandBuffer::commit() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(loadTexture_slice_level_size_sourceBytesPerRow_sourceBytesPerImage_destinationOrigin_sourceHandle_sourceHandleOffset_), texture, slice, level, size, sourceBytesPerRow, sourceBytesPerImage, destinationOrigin, sourceHandle, sourceHandleOffset); + _MTL_msg_v_commit((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandBuffer::popDebugGroup() +_MTL_INLINE void MTL::IOCommandBuffer::waitUntilCompleted() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(popDebugGroup)); + _MTL_msg_v_waitUntilCompleted((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandBuffer::pushDebugGroup(const NS::String* string) +_MTL_INLINE void MTL::IOCommandBuffer::tryCancel() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(pushDebugGroup_), string); + _MTL_msg_v_tryCancel((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandBuffer::setLabel(const NS::String* label) +_MTL_INLINE void MTL::IOCommandBuffer::addBarrier() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_addBarrier((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandBuffer::signalEvent(const MTL::SharedEvent* event, uint64_t value) +_MTL_INLINE void MTL::IOCommandBuffer::pushDebugGroup(NS::String* string) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(signalEvent_value_), event, value); + _MTL_msg_v_pushDebugGroup__NS__Stringp((const void*)this, nullptr, string); } -_MTL_INLINE MTL::IOStatus MTL::IOCommandBuffer::status() const +_MTL_INLINE void MTL::IOCommandBuffer::popDebugGroup() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(status)); + _MTL_msg_v_popDebugGroup((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandBuffer::tryCancel() +_MTL_INLINE void MTL::IOCommandBuffer::enqueue() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(tryCancel)); + _MTL_msg_v_enqueue((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandBuffer::wait(const MTL::SharedEvent* event, uint64_t value) +_MTL_INLINE void MTL::IOCommandBuffer::waitForEvent(MTL::SharedEvent* event, uint64_t value) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitForEvent_value_), event, value); + _MTL_msg_v_waitForEvent_value__MTL__SharedEventp_uint64_t((const void*)this, nullptr, event, value); } -_MTL_INLINE void MTL::IOCommandBuffer::waitUntilCompleted() +_MTL_INLINE void MTL::IOCommandBuffer::signalEvent(MTL::SharedEvent* event, uint64_t value) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitUntilCompleted)); + _MTL_msg_v_signalEvent_value__MTL__SharedEventp_uint64_t((const void*)this, nullptr, event, value); } diff --git a/thirdparty/metal-cpp/Metal/MTLIOCommandQueue.hpp b/thirdparty/metal-cpp/Metal/MTLIOCommandQueue.hpp index ac956c8f117a..e3d209c9bc0b 100644 --- a/thirdparty/metal-cpp/Metal/MTLIOCommandQueue.hpp +++ b/thirdparty/metal-cpp/Metal/MTLIOCommandQueue.hpp @@ -1,37 +1,25 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLIOCommandQueue.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Buffer; + class IOCommandBuffer; +} +namespace NS { + class String; +} namespace MTL { -class Buffer; -class IOCommandBuffer; -class IOCommandQueueDescriptor; -class IOScratchBuffer; -class IOScratchBufferAllocator; + +extern NS::ErrorDomain const IOErrorDomain __asm__("_MTLIOErrorDomain"); _MTL_ENUM(NS::Integer, IOPriority) { IOPriorityHigh = 0, IOPriorityNormal = 1, @@ -48,164 +36,176 @@ _MTL_ENUM(NS::Integer, IOError) { IOErrorInternal = 2, }; -_MTL_CONST(NS::ErrorDomain, IOErrorDomain); + +class IOCommandQueue; +class IOScratchBuffer; +class IOScratchBufferAllocator; +class IOCommandQueueDescriptor; +class IOFileHandle; + class IOCommandQueue : public NS::Referencing { public: - IOCommandBuffer* commandBuffer(); - IOCommandBuffer* commandBufferWithUnretainedReferences(); - - void enqueueBarrier(); + MTL::IOCommandBuffer* commandBuffer(); + MTL::IOCommandBuffer* commandBufferWithUnretainedReferences(); + void enqueueBarrier(); + NS::String* label() const; + void setLabel(NS::String* label); - NS::String* label() const; - void setLabel(const NS::String* label); }; + class IOScratchBuffer : public NS::Referencing { public: - Buffer* buffer() const; + MTL::Buffer* buffer() const; + }; + class IOScratchBufferAllocator : public NS::Referencing { public: - IOScratchBuffer* newScratchBuffer(NS::UInteger minimumSize); + MTL::IOScratchBuffer* newScratchBuffer(NS::UInteger minimumSize); + }; + class IOCommandQueueDescriptor : public NS::Copying { public: static IOCommandQueueDescriptor* alloc(); + IOCommandQueueDescriptor* init() const; + + NS::UInteger maxCommandBufferCount() const; + NS::UInteger maxCommandsInFlight() const; + MTL::IOPriority priority() const; + MTL::IOScratchBufferAllocator* scratchBufferAllocator() const; + void setMaxCommandBufferCount(NS::UInteger maxCommandBufferCount); + void setMaxCommandsInFlight(NS::UInteger maxCommandsInFlight); + void setPriority(MTL::IOPriority priority); + void setScratchBufferAllocator(MTL::IOScratchBufferAllocator* scratchBufferAllocator); + void setType(MTL::IOCommandQueueType type); + MTL::IOCommandQueueType type() const; - IOCommandQueueDescriptor* init(); - - NS::UInteger maxCommandBufferCount() const; - - NS::UInteger maxCommandsInFlight() const; - - IOPriority priority() const; - - IOScratchBufferAllocator* scratchBufferAllocator() const; - - void setMaxCommandBufferCount(NS::UInteger maxCommandBufferCount); - - void setMaxCommandsInFlight(NS::UInteger maxCommandsInFlight); - - void setPriority(MTL::IOPriority priority); - - void setScratchBufferAllocator(const MTL::IOScratchBufferAllocator* scratchBufferAllocator); - - void setType(MTL::IOCommandQueueType type); - IOCommandQueueType type() const; }; + class IOFileHandle : public NS::Referencing { public: NS::String* label() const; - void setLabel(const NS::String* label); + void setLabel(NS::String* label); + }; -} -_MTL_PRIVATE_DEF_CONST(NS::ErrorDomain, IOErrorDomain); -_MTL_INLINE MTL::IOCommandBuffer* MTL::IOCommandQueue::commandBuffer() +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLIOCommandQueue; +extern "C" void *OBJC_CLASS_$_MTLIOScratchBuffer; +extern "C" void *OBJC_CLASS_$_MTLIOScratchBufferAllocator; +extern "C" void *OBJC_CLASS_$_MTLIOCommandQueueDescriptor; +extern "C" void *OBJC_CLASS_$_MTLIOFileHandle; + +_MTL_INLINE NS::String* MTL::IOCommandQueue::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(commandBuffer)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::IOCommandBuffer* MTL::IOCommandQueue::commandBufferWithUnretainedReferences() +_MTL_INLINE void MTL::IOCommandQueue::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(commandBufferWithUnretainedReferences)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } _MTL_INLINE void MTL::IOCommandQueue::enqueueBarrier() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(enqueueBarrier)); + _MTL_msg_v_enqueueBarrier((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::IOCommandQueue::label() const +_MTL_INLINE MTL::IOCommandBuffer* MTL::IOCommandQueue::commandBuffer() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__IOCommandBufferp_commandBuffer((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandQueue::setLabel(const NS::String* label) +_MTL_INLINE MTL::IOCommandBuffer* MTL::IOCommandQueue::commandBufferWithUnretainedReferences() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_MTL__IOCommandBufferp_commandBufferWithUnretainedReferences((const void*)this, nullptr); } _MTL_INLINE MTL::Buffer* MTL::IOScratchBuffer::buffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(buffer)); + return _MTL_msg_MTL__Bufferp_buffer((const void*)this, nullptr); } _MTL_INLINE MTL::IOScratchBuffer* MTL::IOScratchBufferAllocator::newScratchBuffer(NS::UInteger minimumSize) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newScratchBufferWithMinimumSize_), minimumSize); + return _MTL_msg_MTL__IOScratchBufferp_newScratchBufferWithMinimumSize__NS__UInteger((const void*)this, nullptr, minimumSize); } _MTL_INLINE MTL::IOCommandQueueDescriptor* MTL::IOCommandQueueDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLIOCommandQueueDescriptor)); + return _MTL_msg_MTL__IOCommandQueueDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLIOCommandQueueDescriptor, nullptr); } -_MTL_INLINE MTL::IOCommandQueueDescriptor* MTL::IOCommandQueueDescriptor::init() +_MTL_INLINE MTL::IOCommandQueueDescriptor* MTL::IOCommandQueueDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__IOCommandQueueDescriptorp_init((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::IOCommandQueueDescriptor::maxCommandBufferCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxCommandBufferCount)); + return _MTL_msg_NS__UInteger_maxCommandBufferCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::IOCommandQueueDescriptor::maxCommandsInFlight() const +_MTL_INLINE void MTL::IOCommandQueueDescriptor::setMaxCommandBufferCount(NS::UInteger maxCommandBufferCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxCommandsInFlight)); + _MTL_msg_v_setMaxCommandBufferCount__NS__UInteger((const void*)this, nullptr, maxCommandBufferCount); } _MTL_INLINE MTL::IOPriority MTL::IOCommandQueueDescriptor::priority() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(priority)); + return _MTL_msg_MTL__IOPriority_priority((const void*)this, nullptr); } -_MTL_INLINE MTL::IOScratchBufferAllocator* MTL::IOCommandQueueDescriptor::scratchBufferAllocator() const +_MTL_INLINE void MTL::IOCommandQueueDescriptor::setPriority(MTL::IOPriority priority) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(scratchBufferAllocator)); + _MTL_msg_v_setPriority__MTL__IOPriority((const void*)this, nullptr, priority); } -_MTL_INLINE void MTL::IOCommandQueueDescriptor::setMaxCommandBufferCount(NS::UInteger maxCommandBufferCount) +_MTL_INLINE MTL::IOCommandQueueType MTL::IOCommandQueueDescriptor::type() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxCommandBufferCount_), maxCommandBufferCount); + return _MTL_msg_MTL__IOCommandQueueType_type((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandQueueDescriptor::setMaxCommandsInFlight(NS::UInteger maxCommandsInFlight) +_MTL_INLINE void MTL::IOCommandQueueDescriptor::setType(MTL::IOCommandQueueType type) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxCommandsInFlight_), maxCommandsInFlight); + _MTL_msg_v_setType__MTL__IOCommandQueueType((const void*)this, nullptr, type); } -_MTL_INLINE void MTL::IOCommandQueueDescriptor::setPriority(MTL::IOPriority priority) +_MTL_INLINE NS::UInteger MTL::IOCommandQueueDescriptor::maxCommandsInFlight() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPriority_), priority); + return _MTL_msg_NS__UInteger_maxCommandsInFlight((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOCommandQueueDescriptor::setScratchBufferAllocator(const MTL::IOScratchBufferAllocator* scratchBufferAllocator) +_MTL_INLINE void MTL::IOCommandQueueDescriptor::setMaxCommandsInFlight(NS::UInteger maxCommandsInFlight) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setScratchBufferAllocator_), scratchBufferAllocator); + _MTL_msg_v_setMaxCommandsInFlight__NS__UInteger((const void*)this, nullptr, maxCommandsInFlight); } -_MTL_INLINE void MTL::IOCommandQueueDescriptor::setType(MTL::IOCommandQueueType type) +_MTL_INLINE MTL::IOScratchBufferAllocator* MTL::IOCommandQueueDescriptor::scratchBufferAllocator() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setType_), type); + return _MTL_msg_MTL__IOScratchBufferAllocatorp_scratchBufferAllocator((const void*)this, nullptr); } -_MTL_INLINE MTL::IOCommandQueueType MTL::IOCommandQueueDescriptor::type() const +_MTL_INLINE void MTL::IOCommandQueueDescriptor::setScratchBufferAllocator(MTL::IOScratchBufferAllocator* scratchBufferAllocator) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); + _MTL_msg_v_setScratchBufferAllocator__MTL__IOScratchBufferAllocatorp((const void*)this, nullptr, scratchBufferAllocator); } _MTL_INLINE NS::String* MTL::IOFileHandle::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::IOFileHandle::setLabel(const NS::String* label) +_MTL_INLINE void MTL::IOFileHandle::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } diff --git a/thirdparty/metal-cpp/Metal/MTLIOCompressor.hpp b/thirdparty/metal-cpp/Metal/MTLIOCompressor.hpp index 920fa611cba4..c78307c33c9c 100644 --- a/thirdparty/metal-cpp/Metal/MTLIOCompressor.hpp +++ b/thirdparty/metal-cpp/Metal/MTLIOCompressor.hpp @@ -1,94 +1,20 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLIOCompressor.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLDevice.hpp" - -#include "../Foundation/Foundation.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" namespace MTL { -using IOCompressionContext=void*; _MTL_ENUM(NS::Integer, IOCompressionStatus) { IOCompressionStatusComplete = 0, IOCompressionStatusError = 1, }; -size_t IOCompressionContextDefaultChunkSize(); - -IOCompressionContext IOCreateCompressionContext(const char* path, IOCompressionMethod type, size_t chunkSize); - -void IOCompressionContextAppendData(IOCompressionContext context, const void* data, size_t size); - -IOCompressionStatus IOFlushAndDestroyCompressionContext(IOCompressionContext context); - -} - -#if defined(MTL_PRIVATE_IMPLEMENTATION) - -namespace MTL::Private { - -MTL_DEF_FUNC(MTLIOCompressionContextDefaultChunkSize, size_t (*)(void)); - -MTL_DEF_FUNC( MTLIOCreateCompressionContext, void* (*)(const char*, MTL::IOCompressionMethod, size_t) ); - -MTL_DEF_FUNC( MTLIOCompressionContextAppendData, void (*)(void*, const void*, size_t) ); - -MTL_DEF_FUNC( MTLIOFlushAndDestroyCompressionContext, MTL::IOCompressionStatus (*)(void*) ); - -} - -_NS_EXPORT size_t MTL::IOCompressionContextDefaultChunkSize() -{ - return MTL::Private::MTLIOCompressionContextDefaultChunkSize(); -} - -_NS_EXPORT void* MTL::IOCreateCompressionContext(const char* path, IOCompressionMethod type, size_t chunkSize) -{ - if ( MTL::Private::MTLIOCreateCompressionContext ) - { - return MTL::Private::MTLIOCreateCompressionContext( path, type, chunkSize ); - } - return nullptr; -} - -_NS_EXPORT void MTL::IOCompressionContextAppendData(void* context, const void* data, size_t size) -{ - if ( MTL::Private::MTLIOCompressionContextAppendData ) - { - MTL::Private::MTLIOCompressionContextAppendData( context, data, size ); - } -} - -_NS_EXPORT MTL::IOCompressionStatus MTL::IOFlushAndDestroyCompressionContext(void* context) -{ - if ( MTL::Private::MTLIOFlushAndDestroyCompressionContext ) - { - return MTL::Private::MTLIOFlushAndDestroyCompressionContext( context ); - } - return MTL::IOCompressionStatusError; -} -#endif +} // namespace MTL diff --git a/thirdparty/metal-cpp/Metal/MTLIndirectCommandBuffer.hpp b/thirdparty/metal-cpp/Metal/MTLIndirectCommandBuffer.hpp index 6944d5621730..026a85678bb9 100644 --- a/thirdparty/metal-cpp/Metal/MTLIndirectCommandBuffer.hpp +++ b/thirdparty/metal-cpp/Metal/MTLIndirectCommandBuffer.hpp @@ -1,376 +1,323 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLIndirectCommandBuffer.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLResource.hpp" -#include "MTLTypes.hpp" -#include + +namespace MTL { + class IndirectComputeCommand; + class IndirectRenderCommand; +} namespace MTL { -class IndirectCommandBufferDescriptor; -class IndirectComputeCommand; -class IndirectRenderCommand; _MTL_OPTIONS(NS::UInteger, IndirectCommandType) { - IndirectCommandTypeDraw = 1, - IndirectCommandTypeDrawIndexed = 1 << 1, - IndirectCommandTypeDrawPatches = 1 << 2, - IndirectCommandTypeDrawIndexedPatches = 1 << 3, - IndirectCommandTypeConcurrentDispatch = 1 << 5, - IndirectCommandTypeConcurrentDispatchThreads = 1 << 6, - IndirectCommandTypeDrawMeshThreadgroups = 1 << 7, - IndirectCommandTypeDrawMeshThreads = 1 << 8, + IndirectCommandTypeDraw = (1 << 0), + IndirectCommandTypeDrawIndexed = (1 << 1), + IndirectCommandTypeDrawPatches = (1 << 2), + IndirectCommandTypeDrawIndexedPatches = (1 << 3), + IndirectCommandTypeConcurrentDispatch = (1 << 5), + IndirectCommandTypeConcurrentDispatchThreads = (1 << 6), + IndirectCommandTypeDrawMeshThreadgroups = (1 << 7), + IndirectCommandTypeDrawMeshThreads = (1 << 8), }; -struct IndirectCommandBufferExecutionRange -{ - uint32_t location; - uint32_t length; -} _MTL_PACKED; + +class IndirectCommandBufferDescriptor; +class IndirectCommandBuffer; class IndirectCommandBufferDescriptor : public NS::Copying { public: static IndirectCommandBufferDescriptor* alloc(); + IndirectCommandBufferDescriptor* init() const; + + MTL::IndirectCommandType commandTypes() const; + bool inheritBuffers() const; + bool inheritCullMode() const; + bool inheritDepthBias() const; + bool inheritDepthClipMode() const; + bool inheritDepthStencilState() const; + bool inheritFrontFacingWinding() const; + bool inheritPipelineState() const; + bool inheritTriangleFillMode() const; + NS::UInteger maxFragmentBufferBindCount() const; + NS::UInteger maxKernelBufferBindCount() const; + NS::UInteger maxKernelThreadgroupMemoryBindCount() const; + NS::UInteger maxMeshBufferBindCount() const; + NS::UInteger maxObjectBufferBindCount() const; + NS::UInteger maxObjectThreadgroupMemoryBindCount() const; + NS::UInteger maxVertexBufferBindCount() const; + void setCommandTypes(MTL::IndirectCommandType commandTypes); + void setInheritBuffers(bool inheritBuffers); + void setInheritCullMode(bool inheritCullMode); + void setInheritDepthBias(bool inheritDepthBias); + void setInheritDepthClipMode(bool inheritDepthClipMode); + void setInheritDepthStencilState(bool inheritDepthStencilState); + void setInheritFrontFacingWinding(bool inheritFrontFacingWinding); + void setInheritPipelineState(bool inheritPipelineState); + void setInheritTriangleFillMode(bool inheritTriangleFillMode); + void setMaxFragmentBufferBindCount(NS::UInteger maxFragmentBufferBindCount); + void setMaxKernelBufferBindCount(NS::UInteger maxKernelBufferBindCount); + void setMaxKernelThreadgroupMemoryBindCount(NS::UInteger maxKernelThreadgroupMemoryBindCount); + void setMaxMeshBufferBindCount(NS::UInteger maxMeshBufferBindCount); + void setMaxObjectBufferBindCount(NS::UInteger maxObjectBufferBindCount); + void setMaxObjectThreadgroupMemoryBindCount(NS::UInteger maxObjectThreadgroupMemoryBindCount); + void setMaxVertexBufferBindCount(NS::UInteger maxVertexBufferBindCount); + void setSupportColorAttachmentMapping(bool supportColorAttachmentMapping); + void setSupportDynamicAttributeStride(bool supportDynamicAttributeStride); + void setSupportRayTracing(bool supportRayTracing); + bool supportColorAttachmentMapping() const; + bool supportDynamicAttributeStride() const; + bool supportRayTracing() const; - IndirectCommandType commandTypes() const; - - bool inheritBuffers() const; - - bool inheritCullMode() const; - - bool inheritDepthBias() const; - - bool inheritDepthClipMode() const; - - bool inheritDepthStencilState() const; - - bool inheritFrontFacingWinding() const; - - bool inheritPipelineState() const; - - bool inheritTriangleFillMode() const; - - IndirectCommandBufferDescriptor* init(); - - NS::UInteger maxFragmentBufferBindCount() const; - - NS::UInteger maxKernelBufferBindCount() const; - - NS::UInteger maxKernelThreadgroupMemoryBindCount() const; - - NS::UInteger maxMeshBufferBindCount() const; - - NS::UInteger maxObjectBufferBindCount() const; - - NS::UInteger maxObjectThreadgroupMemoryBindCount() const; - - NS::UInteger maxVertexBufferBindCount() const; - - void setCommandTypes(MTL::IndirectCommandType commandTypes); - - void setInheritBuffers(bool inheritBuffers); - - void setInheritCullMode(bool inheritCullMode); - - void setInheritDepthBias(bool inheritDepthBias); - - void setInheritDepthClipMode(bool inheritDepthClipMode); - - void setInheritDepthStencilState(bool inheritDepthStencilState); - - void setInheritFrontFacingWinding(bool inheritFrontFacingWinding); - - void setInheritPipelineState(bool inheritPipelineState); - - void setInheritTriangleFillMode(bool inheritTriangleFillMode); - - void setMaxFragmentBufferBindCount(NS::UInteger maxFragmentBufferBindCount); - - void setMaxKernelBufferBindCount(NS::UInteger maxKernelBufferBindCount); - - void setMaxKernelThreadgroupMemoryBindCount(NS::UInteger maxKernelThreadgroupMemoryBindCount); - - void setMaxMeshBufferBindCount(NS::UInteger maxMeshBufferBindCount); - - void setMaxObjectBufferBindCount(NS::UInteger maxObjectBufferBindCount); - - void setMaxObjectThreadgroupMemoryBindCount(NS::UInteger maxObjectThreadgroupMemoryBindCount); - - void setMaxVertexBufferBindCount(NS::UInteger maxVertexBufferBindCount); - - void setSupportColorAttachmentMapping(bool supportColorAttachmentMapping); - - void setSupportDynamicAttributeStride(bool supportDynamicAttributeStride); - - void setSupportRayTracing(bool supportRayTracing); - - bool supportColorAttachmentMapping() const; - - bool supportDynamicAttributeStride() const; - - bool supportRayTracing() const; }; -class IndirectCommandBuffer : public NS::Referencing + +class IndirectCommandBuffer : public NS::Referencing { public: - ResourceID gpuResourceID() const; + MTL::ResourceID gpuResourceID() const; + MTL::IndirectComputeCommand* indirectComputeCommand(NS::UInteger commandIndex); + MTL::IndirectRenderCommand* indirectRenderCommand(NS::UInteger commandIndex); + void reset(NS::Range range); + NS::UInteger size() const; - IndirectComputeCommand* indirectComputeCommand(NS::UInteger commandIndex); +}; - IndirectRenderCommand* indirectRenderCommand(NS::UInteger commandIndex); +} // namespace MTL - void reset(NS::Range range); +// --- Class symbols + inline implementations --- - NS::UInteger size() const; -}; +extern "C" void *OBJC_CLASS_$_MTLIndirectCommandBufferDescriptor; +extern "C" void *OBJC_CLASS_$_MTLIndirectCommandBuffer; +_MTL_INLINE MTL::IndirectCommandBufferDescriptor* MTL::IndirectCommandBufferDescriptor::alloc() +{ + return _MTL_msg_MTL__IndirectCommandBufferDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLIndirectCommandBufferDescriptor, nullptr); } -_MTL_INLINE MTL::IndirectCommandBufferDescriptor* MTL::IndirectCommandBufferDescriptor::alloc() +_MTL_INLINE MTL::IndirectCommandBufferDescriptor* MTL::IndirectCommandBufferDescriptor::init() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLIndirectCommandBufferDescriptor)); + return _MTL_msg_MTL__IndirectCommandBufferDescriptorp_init((const void*)this, nullptr); } _MTL_INLINE MTL::IndirectCommandType MTL::IndirectCommandBufferDescriptor::commandTypes() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(commandTypes)); + return _MTL_msg_MTL__IndirectCommandType_commandTypes((const void*)this, nullptr); } -_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritBuffers() const +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setCommandTypes(MTL::IndirectCommandType commandTypes) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inheritBuffers)); + _MTL_msg_v_setCommandTypes__MTL__IndirectCommandType((const void*)this, nullptr, commandTypes); } -_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritCullMode() const +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritPipelineState() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inheritCullMode)); + return _MTL_msg_bool_inheritPipelineState((const void*)this, nullptr); } -_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritDepthBias() const +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritPipelineState(bool inheritPipelineState) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inheritDepthBias)); + _MTL_msg_v_setInheritPipelineState__bool((const void*)this, nullptr, inheritPipelineState); } -_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritDepthClipMode() const +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inheritDepthClipMode)); + return _MTL_msg_bool_inheritBuffers((const void*)this, nullptr); } -_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritDepthStencilState() const +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritBuffers(bool inheritBuffers) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inheritDepthStencilState)); + _MTL_msg_v_setInheritBuffers__bool((const void*)this, nullptr, inheritBuffers); } -_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritFrontFacingWinding() const +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritDepthStencilState() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inheritFrontFacingWinding)); + return _MTL_msg_bool_inheritDepthStencilState((const void*)this, nullptr); } -_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritPipelineState() const +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritDepthStencilState(bool inheritDepthStencilState) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inheritPipelineState)); + _MTL_msg_v_setInheritDepthStencilState__bool((const void*)this, nullptr, inheritDepthStencilState); } -_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritTriangleFillMode() const +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritDepthBias() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inheritTriangleFillMode)); + return _MTL_msg_bool_inheritDepthBias((const void*)this, nullptr); } -_MTL_INLINE MTL::IndirectCommandBufferDescriptor* MTL::IndirectCommandBufferDescriptor::init() +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritDepthBias(bool inheritDepthBias) { - return NS::Object::init(); + _MTL_msg_v_setInheritDepthBias__bool((const void*)this, nullptr, inheritDepthBias); } -_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxFragmentBufferBindCount() const +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritDepthClipMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxFragmentBufferBindCount)); + return _MTL_msg_bool_inheritDepthClipMode((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxKernelBufferBindCount() const +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritDepthClipMode(bool inheritDepthClipMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxKernelBufferBindCount)); + _MTL_msg_v_setInheritDepthClipMode__bool((const void*)this, nullptr, inheritDepthClipMode); } -_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxKernelThreadgroupMemoryBindCount() const +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritCullMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxKernelThreadgroupMemoryBindCount)); + return _MTL_msg_bool_inheritCullMode((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxMeshBufferBindCount() const +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritCullMode(bool inheritCullMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxMeshBufferBindCount)); + _MTL_msg_v_setInheritCullMode__bool((const void*)this, nullptr, inheritCullMode); } -_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxObjectBufferBindCount() const +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritFrontFacingWinding() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxObjectBufferBindCount)); + return _MTL_msg_bool_inheritFrontFacingWinding((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxObjectThreadgroupMemoryBindCount() const +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritFrontFacingWinding(bool inheritFrontFacingWinding) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxObjectThreadgroupMemoryBindCount)); + _MTL_msg_v_setInheritFrontFacingWinding__bool((const void*)this, nullptr, inheritFrontFacingWinding); } -_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxVertexBufferBindCount() const +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::inheritTriangleFillMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxVertexBufferBindCount)); + return _MTL_msg_bool_inheritTriangleFillMode((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setCommandTypes(MTL::IndirectCommandType commandTypes) +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritTriangleFillMode(bool inheritTriangleFillMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCommandTypes_), commandTypes); + _MTL_msg_v_setInheritTriangleFillMode__bool((const void*)this, nullptr, inheritTriangleFillMode); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritBuffers(bool inheritBuffers) +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxVertexBufferBindCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInheritBuffers_), inheritBuffers); + return _MTL_msg_NS__UInteger_maxVertexBufferBindCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritCullMode(bool inheritCullMode) +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxVertexBufferBindCount(NS::UInteger maxVertexBufferBindCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInheritCullMode_), inheritCullMode); + _MTL_msg_v_setMaxVertexBufferBindCount__NS__UInteger((const void*)this, nullptr, maxVertexBufferBindCount); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritDepthBias(bool inheritDepthBias) +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxFragmentBufferBindCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInheritDepthBias_), inheritDepthBias); + return _MTL_msg_NS__UInteger_maxFragmentBufferBindCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritDepthClipMode(bool inheritDepthClipMode) +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxFragmentBufferBindCount(NS::UInteger maxFragmentBufferBindCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInheritDepthClipMode_), inheritDepthClipMode); + _MTL_msg_v_setMaxFragmentBufferBindCount__NS__UInteger((const void*)this, nullptr, maxFragmentBufferBindCount); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritDepthStencilState(bool inheritDepthStencilState) +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxKernelBufferBindCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInheritDepthStencilState_), inheritDepthStencilState); + return _MTL_msg_NS__UInteger_maxKernelBufferBindCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritFrontFacingWinding(bool inheritFrontFacingWinding) +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxKernelBufferBindCount(NS::UInteger maxKernelBufferBindCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInheritFrontFacingWinding_), inheritFrontFacingWinding); + _MTL_msg_v_setMaxKernelBufferBindCount__NS__UInteger((const void*)this, nullptr, maxKernelBufferBindCount); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritPipelineState(bool inheritPipelineState) +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxKernelThreadgroupMemoryBindCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInheritPipelineState_), inheritPipelineState); + return _MTL_msg_NS__UInteger_maxKernelThreadgroupMemoryBindCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setInheritTriangleFillMode(bool inheritTriangleFillMode) +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxKernelThreadgroupMemoryBindCount(NS::UInteger maxKernelThreadgroupMemoryBindCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInheritTriangleFillMode_), inheritTriangleFillMode); + _MTL_msg_v_setMaxKernelThreadgroupMemoryBindCount__NS__UInteger((const void*)this, nullptr, maxKernelThreadgroupMemoryBindCount); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxFragmentBufferBindCount(NS::UInteger maxFragmentBufferBindCount) +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxObjectBufferBindCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxFragmentBufferBindCount_), maxFragmentBufferBindCount); + return _MTL_msg_NS__UInteger_maxObjectBufferBindCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxKernelBufferBindCount(NS::UInteger maxKernelBufferBindCount) +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxObjectBufferBindCount(NS::UInteger maxObjectBufferBindCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxKernelBufferBindCount_), maxKernelBufferBindCount); + _MTL_msg_v_setMaxObjectBufferBindCount__NS__UInteger((const void*)this, nullptr, maxObjectBufferBindCount); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxKernelThreadgroupMemoryBindCount(NS::UInteger maxKernelThreadgroupMemoryBindCount) +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxMeshBufferBindCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxKernelThreadgroupMemoryBindCount_), maxKernelThreadgroupMemoryBindCount); + return _MTL_msg_NS__UInteger_maxMeshBufferBindCount((const void*)this, nullptr); } _MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxMeshBufferBindCount(NS::UInteger maxMeshBufferBindCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxMeshBufferBindCount_), maxMeshBufferBindCount); + _MTL_msg_v_setMaxMeshBufferBindCount__NS__UInteger((const void*)this, nullptr, maxMeshBufferBindCount); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxObjectBufferBindCount(NS::UInteger maxObjectBufferBindCount) +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxObjectThreadgroupMemoryBindCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxObjectBufferBindCount_), maxObjectBufferBindCount); + return _MTL_msg_NS__UInteger_maxObjectThreadgroupMemoryBindCount((const void*)this, nullptr); } _MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxObjectThreadgroupMemoryBindCount(NS::UInteger maxObjectThreadgroupMemoryBindCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxObjectThreadgroupMemoryBindCount_), maxObjectThreadgroupMemoryBindCount); + _MTL_msg_v_setMaxObjectThreadgroupMemoryBindCount__NS__UInteger((const void*)this, nullptr, maxObjectThreadgroupMemoryBindCount); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxVertexBufferBindCount(NS::UInteger maxVertexBufferBindCount) +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::supportRayTracing() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxVertexBufferBindCount_), maxVertexBufferBindCount); + return _MTL_msg_bool_supportRayTracing((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setSupportColorAttachmentMapping(bool supportColorAttachmentMapping) +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setSupportRayTracing(bool supportRayTracing) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportColorAttachmentMapping_), supportColorAttachmentMapping); + _MTL_msg_v_setSupportRayTracing__bool((const void*)this, nullptr, supportRayTracing); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setSupportDynamicAttributeStride(bool supportDynamicAttributeStride) +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::supportDynamicAttributeStride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportDynamicAttributeStride_), supportDynamicAttributeStride); + return _MTL_msg_bool_supportDynamicAttributeStride((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setSupportRayTracing(bool supportRayTracing) +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setSupportDynamicAttributeStride(bool supportDynamicAttributeStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportRayTracing_), supportRayTracing); + _MTL_msg_v_setSupportDynamicAttributeStride__bool((const void*)this, nullptr, supportDynamicAttributeStride); } _MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::supportColorAttachmentMapping() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportColorAttachmentMapping)); + return _MTL_msg_bool_supportColorAttachmentMapping((const void*)this, nullptr); } -_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::supportDynamicAttributeStride() const +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setSupportColorAttachmentMapping(bool supportColorAttachmentMapping) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportDynamicAttributeStride)); + _MTL_msg_v_setSupportColorAttachmentMapping__bool((const void*)this, nullptr, supportColorAttachmentMapping); } -_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::supportRayTracing() const +_MTL_INLINE NS::UInteger MTL::IndirectCommandBuffer::size() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportRayTracing)); + return _MTL_msg_NS__UInteger_size((const void*)this, nullptr); } _MTL_INLINE MTL::ResourceID MTL::IndirectCommandBuffer::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } -_MTL_INLINE MTL::IndirectComputeCommand* MTL::IndirectCommandBuffer::indirectComputeCommand(NS::UInteger commandIndex) +_MTL_INLINE void MTL::IndirectCommandBuffer::reset(NS::Range range) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indirectComputeCommandAtIndex_), commandIndex); + _MTL_msg_v_resetWithRange__NS__Range((const void*)this, nullptr, range); } _MTL_INLINE MTL::IndirectRenderCommand* MTL::IndirectCommandBuffer::indirectRenderCommand(NS::UInteger commandIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indirectRenderCommandAtIndex_), commandIndex); -} - -_MTL_INLINE void MTL::IndirectCommandBuffer::reset(NS::Range range) -{ - Object::sendMessage(this, _MTL_PRIVATE_SEL(resetWithRange_), range); + return _MTL_msg_MTL__IndirectRenderCommandp_indirectRenderCommandAtIndex__NS__UInteger((const void*)this, nullptr, commandIndex); } -_MTL_INLINE NS::UInteger MTL::IndirectCommandBuffer::size() const +_MTL_INLINE MTL::IndirectComputeCommand* MTL::IndirectCommandBuffer::indirectComputeCommand(NS::UInteger commandIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(size)); + return _MTL_msg_MTL__IndirectComputeCommandp_indirectComputeCommandAtIndex__NS__UInteger((const void*)this, nullptr, commandIndex); } diff --git a/thirdparty/metal-cpp/Metal/MTLIndirectCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTLIndirectCommandEncoder.hpp index 9e1a94004b56..57d88ac72138 100644 --- a/thirdparty/metal-cpp/Metal/MTLIndirectCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTLIndirectCommandEncoder.hpp @@ -1,272 +1,245 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLIndirectCommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLArgument.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLRenderCommandEncoder.hpp" -#include "MTLTypes.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Buffer; + class ComputePipelineState; + class DepthStencilState; + class RenderPipelineState; + enum CullMode : NS::UInteger; + enum DepthClipMode : NS::UInteger; + enum IndexType : NS::UInteger; + enum PrimitiveType : NS::UInteger; + enum TriangleFillMode : NS::UInteger; + enum Winding : NS::UInteger; +} namespace MTL { -class Buffer; -class ComputePipelineState; -class RenderPipelineState; + +class IndirectRenderCommand; +class IndirectComputeCommand; class IndirectRenderCommand : public NS::Referencing { public: void clearBarrier(); - - void drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, const MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride); - - void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, const MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance); - + void drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride); + void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance); void drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); - void drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); - - void drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride); - + void drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride); void drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount, NS::UInteger baseInstance); - void reset(); - void setBarrier(); - void setCullMode(MTL::CullMode cullMode); - void setDepthBias(float depthBias, float slopeScale, float clamp); - void setDepthClipMode(MTL::DepthClipMode depthClipMode); - - void setDepthStencilState(const MTL::DepthStencilState* depthStencilState); - - void setFragmentBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); - + void setDepthStencilState(MTL::DepthStencilState* depthStencilState); + void setFragmentBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); void setFrontFacingWinding(MTL::Winding frontFacingWindning); - - void setMeshBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); - - void setObjectBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); - + void setMeshBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setObjectBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); void setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index); - - void setRenderPipelineState(const MTL::RenderPipelineState* pipelineState); - + void setRenderPipelineState(MTL::RenderPipelineState* pipelineState); void setTriangleFillMode(MTL::TriangleFillMode fillMode); + void setVertexBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setVertexBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); - void setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); - void setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); }; + class IndirectComputeCommand : public NS::Referencing { public: void clearBarrier(); - void concurrentDispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup); - void concurrentDispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup); - void reset(); - void setBarrier(); - - void setComputePipelineState(const MTL::ComputePipelineState* pipelineState); - + void setComputePipelineState(MTL::ComputePipelineState* pipelineState); void setImageblockWidth(NS::UInteger width, NS::UInteger height); - - void setKernelBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); - void setKernelBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); - + void setKernelBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setKernelBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); void setStageInRegion(MTL::Region region); - void setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index); + }; -} -_MTL_INLINE void MTL::IndirectRenderCommand::clearBarrier() +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLIndirectRenderCommand; +extern "C" void *OBJC_CLASS_$_MTLIndirectComputeCommand; + +_MTL_INLINE void MTL::IndirectRenderCommand::setRenderPipelineState(MTL::RenderPipelineState* pipelineState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(clearBarrier)); + _MTL_msg_v_setRenderPipelineState__MTL__RenderPipelineStatep((const void*)this, nullptr, pipelineState); } -_MTL_INLINE void MTL::IndirectRenderCommand::drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, const MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride) +_MTL_INLINE void MTL::IndirectRenderCommand::setVertexBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance_tessellationFactorBuffer_tessellationFactorBufferOffset_tessellationFactorBufferInstanceStride_), numberOfPatchControlPoints, patchStart, patchCount, patchIndexBuffer, patchIndexBufferOffset, controlPointIndexBuffer, controlPointIndexBufferOffset, instanceCount, baseInstance, buffer, offset, instanceStride); + _MTL_msg_v_setVertexBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::IndirectRenderCommand::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, const MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance) +_MTL_INLINE void MTL::IndirectRenderCommand::setFragmentBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance_), primitiveType, indexCount, indexType, indexBuffer, indexBufferOffset, instanceCount, baseVertex, baseInstance); + _MTL_msg_v_setFragmentBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::IndirectRenderCommand::drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +_MTL_INLINE void MTL::IndirectRenderCommand::setVertexBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), threadgroupsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); + _MTL_msg_v_setVertexBuffer_offset_attributeStride_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, stride, index); } -_MTL_INLINE void MTL::IndirectRenderCommand::drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +_MTL_INLINE void MTL::IndirectRenderCommand::drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), threadsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); + _MTL_msg_v_drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance_tessellationFactorBuffer_tessellationFactorBufferOffset_tessellationFactorBufferInstanceStride__NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, numberOfPatchControlPoints, patchStart, patchCount, patchIndexBuffer, patchIndexBufferOffset, instanceCount, baseInstance, buffer, offset, instanceStride); } -_MTL_INLINE void MTL::IndirectRenderCommand::drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride) +_MTL_INLINE void MTL::IndirectRenderCommand::drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance_tessellationFactorBuffer_tessellationFactorBufferOffset_tessellationFactorBufferInstanceStride_), numberOfPatchControlPoints, patchStart, patchCount, patchIndexBuffer, patchIndexBufferOffset, instanceCount, baseInstance, buffer, offset, instanceStride); + _MTL_msg_v_drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance_tessellationFactorBuffer_tessellationFactorBufferOffset_tessellationFactorBufferInstanceStride__NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, numberOfPatchControlPoints, patchStart, patchCount, patchIndexBuffer, patchIndexBufferOffset, controlPointIndexBuffer, controlPointIndexBufferOffset, instanceCount, baseInstance, buffer, offset, instanceStride); } _MTL_INLINE void MTL::IndirectRenderCommand::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount, NS::UInteger baseInstance) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance_), primitiveType, vertexStart, vertexCount, instanceCount, baseInstance); + _MTL_msg_v_drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance__MTL__PrimitiveType_NS__UInteger_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, primitiveType, vertexStart, vertexCount, instanceCount, baseInstance); } -_MTL_INLINE void MTL::IndirectRenderCommand::reset() +_MTL_INLINE void MTL::IndirectRenderCommand::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__Integer_NS__UInteger((const void*)this, nullptr, primitiveType, indexCount, indexType, indexBuffer, indexBufferOffset, instanceCount, baseVertex, baseInstance); } -_MTL_INLINE void MTL::IndirectRenderCommand::setBarrier() +_MTL_INLINE void MTL::IndirectRenderCommand::setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBarrier)); + _MTL_msg_v_setObjectThreadgroupMemoryLength_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, length, index); } -_MTL_INLINE void MTL::IndirectRenderCommand::setCullMode(MTL::CullMode cullMode) +_MTL_INLINE void MTL::IndirectRenderCommand::setObjectBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCullMode_), cullMode); + _MTL_msg_v_setObjectBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::IndirectRenderCommand::setDepthBias(float depthBias, float slopeScale, float clamp) +_MTL_INLINE void MTL::IndirectRenderCommand::setMeshBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthBias_slopeScale_clamp_), depthBias, slopeScale, clamp); + _MTL_msg_v_setMeshBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::IndirectRenderCommand::setDepthClipMode(MTL::DepthClipMode depthClipMode) +_MTL_INLINE void MTL::IndirectRenderCommand::drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthClipMode_), depthClipMode); + _MTL_msg_v_drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Size_MTL__Size_MTL__Size((const void*)this, nullptr, threadgroupsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); } -_MTL_INLINE void MTL::IndirectRenderCommand::setDepthStencilState(const MTL::DepthStencilState* depthStencilState) +_MTL_INLINE void MTL::IndirectRenderCommand::drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStencilState_), depthStencilState); + _MTL_msg_v_drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Size_MTL__Size_MTL__Size((const void*)this, nullptr, threadsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); } -_MTL_INLINE void MTL::IndirectRenderCommand::setFragmentBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::IndirectRenderCommand::setBarrier() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_setBarrier((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectRenderCommand::setFrontFacingWinding(MTL::Winding frontFacingWindning) +_MTL_INLINE void MTL::IndirectRenderCommand::clearBarrier() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFrontFacingWinding_), frontFacingWindning); + _MTL_msg_v_clearBarrier((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectRenderCommand::setMeshBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::IndirectRenderCommand::setDepthStencilState(MTL::DepthStencilState* depthStencilState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_setDepthStencilState__MTL__DepthStencilStatep((const void*)this, nullptr, depthStencilState); } -_MTL_INLINE void MTL::IndirectRenderCommand::setObjectBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::IndirectRenderCommand::setDepthBias(float depthBias, float slopeScale, float clamp) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_setDepthBias_slopeScale_clamp__float_float_float((const void*)this, nullptr, depthBias, slopeScale, clamp); } -_MTL_INLINE void MTL::IndirectRenderCommand::setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) +_MTL_INLINE void MTL::IndirectRenderCommand::setDepthClipMode(MTL::DepthClipMode depthClipMode) +{ + _MTL_msg_v_setDepthClipMode__MTL__DepthClipMode((const void*)this, nullptr, depthClipMode); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::setCullMode(MTL::CullMode cullMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectThreadgroupMemoryLength_atIndex_), length, index); + _MTL_msg_v_setCullMode__MTL__CullMode((const void*)this, nullptr, cullMode); } -_MTL_INLINE void MTL::IndirectRenderCommand::setRenderPipelineState(const MTL::RenderPipelineState* pipelineState) +_MTL_INLINE void MTL::IndirectRenderCommand::setFrontFacingWinding(MTL::Winding frontFacingWindning) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderPipelineState_), pipelineState); + _MTL_msg_v_setFrontFacingWinding__MTL__Winding((const void*)this, nullptr, frontFacingWindning); } _MTL_INLINE void MTL::IndirectRenderCommand::setTriangleFillMode(MTL::TriangleFillMode fillMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTriangleFillMode_), fillMode); + _MTL_msg_v_setTriangleFillMode__MTL__TriangleFillMode((const void*)this, nullptr, fillMode); } -_MTL_INLINE void MTL::IndirectRenderCommand::setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::IndirectRenderCommand::reset() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectRenderCommand::setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +_MTL_INLINE void MTL::IndirectComputeCommand::setComputePipelineState(MTL::ComputePipelineState* pipelineState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); + _MTL_msg_v_setComputePipelineState__MTL__ComputePipelineStatep((const void*)this, nullptr, pipelineState); } -_MTL_INLINE void MTL::IndirectComputeCommand::clearBarrier() +_MTL_INLINE void MTL::IndirectComputeCommand::setKernelBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(clearBarrier)); + _MTL_msg_v_setKernelBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::IndirectComputeCommand::concurrentDispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup) +_MTL_INLINE void MTL::IndirectComputeCommand::setKernelBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(concurrentDispatchThreadgroups_threadsPerThreadgroup_), threadgroupsPerGrid, threadsPerThreadgroup); + _MTL_msg_v_setKernelBuffer_offset_attributeStride_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, stride, index); } -_MTL_INLINE void MTL::IndirectComputeCommand::concurrentDispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup) +_MTL_INLINE void MTL::IndirectComputeCommand::concurrentDispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(concurrentDispatchThreads_threadsPerThreadgroup_), threadsPerGrid, threadsPerThreadgroup); + _MTL_msg_v_concurrentDispatchThreadgroups_threadsPerThreadgroup__MTL__Size_MTL__Size((const void*)this, nullptr, threadgroupsPerGrid, threadsPerThreadgroup); } -_MTL_INLINE void MTL::IndirectComputeCommand::reset() +_MTL_INLINE void MTL::IndirectComputeCommand::concurrentDispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL_msg_v_concurrentDispatchThreads_threadsPerThreadgroup__MTL__Size_MTL__Size((const void*)this, nullptr, threadsPerGrid, threadsPerThreadgroup); } _MTL_INLINE void MTL::IndirectComputeCommand::setBarrier() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBarrier)); + _MTL_msg_v_setBarrier((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectComputeCommand::setComputePipelineState(const MTL::ComputePipelineState* pipelineState) +_MTL_INLINE void MTL::IndirectComputeCommand::clearBarrier() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setComputePipelineState_), pipelineState); + _MTL_msg_v_clearBarrier((const void*)this, nullptr); } _MTL_INLINE void MTL::IndirectComputeCommand::setImageblockWidth(NS::UInteger width, NS::UInteger height) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setImageblockWidth_height_), width, height); + _MTL_msg_v_setImageblockWidth_height__NS__UInteger_NS__UInteger((const void*)this, nullptr, width, height); } -_MTL_INLINE void MTL::IndirectComputeCommand::setKernelBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::IndirectComputeCommand::reset() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setKernelBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE void MTL::IndirectComputeCommand::setKernelBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +_MTL_INLINE void MTL::IndirectComputeCommand::setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setKernelBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); + _MTL_msg_v_setThreadgroupMemoryLength_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, length, index); } _MTL_INLINE void MTL::IndirectComputeCommand::setStageInRegion(MTL::Region region) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStageInRegion_), region); -} - -_MTL_INLINE void MTL::IndirectComputeCommand::setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) -{ - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadgroupMemoryLength_atIndex_), length, index); + _MTL_msg_v_setStageInRegion__MTL__Region((const void*)this, nullptr, region); } diff --git a/thirdparty/metal-cpp/Metal/MTLIntersectionFunctionTable.hpp b/thirdparty/metal-cpp/Metal/MTLIntersectionFunctionTable.hpp index 436653b2efeb..5e20c655aca2 100644 --- a/thirdparty/metal-cpp/Metal/MTLIntersectionFunctionTable.hpp +++ b/thirdparty/metal-cpp/Metal/MTLIntersectionFunctionTable.hpp @@ -1,173 +1,154 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLIntersectionFunctionTable.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLResource.hpp" -#include "MTLTypes.hpp" -#include + +namespace MTL { + class Buffer; + class FunctionHandle; + class VisibleFunctionTable; +} namespace MTL { -class Buffer; -class FunctionHandle; -class IntersectionFunctionTableDescriptor; -class VisibleFunctionTable; _MTL_OPTIONS(NS::UInteger, IntersectionFunctionSignature) { IntersectionFunctionSignatureNone = 0, - IntersectionFunctionSignatureInstancing = 1, - IntersectionFunctionSignatureTriangleData = 1 << 1, - IntersectionFunctionSignatureWorldSpaceData = 1 << 2, - IntersectionFunctionSignatureInstanceMotion = 1 << 3, - IntersectionFunctionSignaturePrimitiveMotion = 1 << 4, - IntersectionFunctionSignatureExtendedLimits = 1 << 5, - IntersectionFunctionSignatureMaxLevels = 1 << 6, - IntersectionFunctionSignatureCurveData = 1 << 7, - IntersectionFunctionSignatureIntersectionFunctionBuffer = 1 << 8, - IntersectionFunctionSignatureUserData = 1 << 9, + IntersectionFunctionSignatureInstancing = (1 << 0), + IntersectionFunctionSignatureTriangleData = (1 << 1), + IntersectionFunctionSignatureWorldSpaceData = (1 << 2), + IntersectionFunctionSignatureInstanceMotion = (1 << 3), + IntersectionFunctionSignaturePrimitiveMotion = (1 << 4), + IntersectionFunctionSignatureExtendedLimits = (1 << 5), + IntersectionFunctionSignatureMaxLevels = (1 << 6), + IntersectionFunctionSignatureCurveData = (1 << 7), + IntersectionFunctionSignatureIntersectionFunctionBuffer = (1 << 8), + IntersectionFunctionSignatureUserData = (1 << 9), }; -struct IntersectionFunctionBufferArguments -{ - uint64_t intersectionFunctionBuffer; - uint64_t intersectionFunctionBufferSize; - uint64_t intersectionFunctionStride; -} _MTL_PACKED; + +class IntersectionFunctionTableDescriptor; +class IntersectionFunctionTable; class IntersectionFunctionTableDescriptor : public NS::Copying { public: static IntersectionFunctionTableDescriptor* alloc(); + IntersectionFunctionTableDescriptor* init() const; - NS::UInteger functionCount() const; + static MTL::IntersectionFunctionTableDescriptor* intersectionFunctionTableDescriptor(); - IntersectionFunctionTableDescriptor* init(); + NS::UInteger functionCount() const; + void setFunctionCount(NS::UInteger functionCount); - static IntersectionFunctionTableDescriptor* intersectionFunctionTableDescriptor(); - - void setFunctionCount(NS::UInteger functionCount); }; -class IntersectionFunctionTable : public NS::Referencing + +class IntersectionFunctionTable : public NS::Referencing { public: - ResourceID gpuResourceID() const; - - void setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); - void setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range); + MTL::ResourceID gpuResourceID() const; + void setBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range); + void setFunction(MTL::FunctionHandle* function, NS::UInteger index); + void setFunctions(const MTL::FunctionHandle* const * functions, NS::Range range); + void setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index); + void setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range); + void setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index); + void setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range); + void setVisibleFunctionTable(MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex); + void setVisibleFunctionTables(const MTL::VisibleFunctionTable* const * functionTables, NS::Range bufferRange); - void setFunction(const MTL::FunctionHandle* function, NS::UInteger index); - void setFunctions(const MTL::FunctionHandle* const functions[], NS::Range range); - - void setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index); - void setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range); +}; - void setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index); - void setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range); +} // namespace MTL - void setVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex); - void setVisibleFunctionTables(const MTL::VisibleFunctionTable* const functionTables[], NS::Range bufferRange); -}; +// --- Class symbols + inline implementations --- -} +extern "C" void *OBJC_CLASS_$_MTLIntersectionFunctionTableDescriptor; +extern "C" void *OBJC_CLASS_$_MTLIntersectionFunctionTable; _MTL_INLINE MTL::IntersectionFunctionTableDescriptor* MTL::IntersectionFunctionTableDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLIntersectionFunctionTableDescriptor)); + return _MTL_msg_MTL__IntersectionFunctionTableDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLIntersectionFunctionTableDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::IntersectionFunctionTableDescriptor::functionCount() const +_MTL_INLINE MTL::IntersectionFunctionTableDescriptor* MTL::IntersectionFunctionTableDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionCount)); + return _MTL_msg_MTL__IntersectionFunctionTableDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::IntersectionFunctionTableDescriptor* MTL::IntersectionFunctionTableDescriptor::init() +_MTL_INLINE MTL::IntersectionFunctionTableDescriptor* MTL::IntersectionFunctionTableDescriptor::intersectionFunctionTableDescriptor() { - return NS::Object::init(); + return _MTL_msg_MTL__IntersectionFunctionTableDescriptorp_intersectionFunctionTableDescriptor((const void*)&OBJC_CLASS_$_MTLIntersectionFunctionTableDescriptor, nullptr); } -_MTL_INLINE MTL::IntersectionFunctionTableDescriptor* MTL::IntersectionFunctionTableDescriptor::intersectionFunctionTableDescriptor() +_MTL_INLINE NS::UInteger MTL::IntersectionFunctionTableDescriptor::functionCount() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLIntersectionFunctionTableDescriptor), _MTL_PRIVATE_SEL(intersectionFunctionTableDescriptor)); + return _MTL_msg_NS__UInteger_functionCount((const void*)this, nullptr); } _MTL_INLINE void MTL::IntersectionFunctionTableDescriptor::setFunctionCount(NS::UInteger functionCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctionCount_), functionCount); + _MTL_msg_v_setFunctionCount__NS__UInteger((const void*)this, nullptr, functionCount); } _MTL_INLINE MTL::ResourceID MTL::IntersectionFunctionTable::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } -_MTL_INLINE void MTL::IntersectionFunctionTable::setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::IntersectionFunctionTable::setBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_setBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::IntersectionFunctionTable::setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range) +_MTL_INLINE void MTL::IntersectionFunctionTable::setBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffers_offsets_withRange_), buffers, offsets, range); + _MTL_msg_v_setBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range((const void*)this, nullptr, buffers, offsets, range); } -_MTL_INLINE void MTL::IntersectionFunctionTable::setFunction(const MTL::FunctionHandle* function, NS::UInteger index) +_MTL_INLINE void MTL::IntersectionFunctionTable::setFunction(MTL::FunctionHandle* function, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunction_atIndex_), function, index); + _MTL_msg_v_setFunction_atIndex__MTL__FunctionHandlep_NS__UInteger((const void*)this, nullptr, function, index); } -_MTL_INLINE void MTL::IntersectionFunctionTable::setFunctions(const MTL::FunctionHandle* const functions[], NS::Range range) +_MTL_INLINE void MTL::IntersectionFunctionTable::setFunctions(const MTL::FunctionHandle* const * functions, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctions_withRange_), functions, range); + _MTL_msg_v_setFunctions_withRange__constMTL__FunctionHandlepconstp_NS__Range((const void*)this, nullptr, functions, range); } -_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index) +_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaqueCurveIntersectionFunctionWithSignature_atIndex_), signature, index); + _MTL_msg_v_setOpaqueTriangleIntersectionFunctionWithSignature_atIndex__MTL__IntersectionFunctionSignature_NS__UInteger((const void*)this, nullptr, signature, index); } -_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range) +_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaqueCurveIntersectionFunctionWithSignature_withRange_), signature, range); + _MTL_msg_v_setOpaqueTriangleIntersectionFunctionWithSignature_withRange__MTL__IntersectionFunctionSignature_NS__Range((const void*)this, nullptr, signature, range); } -_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index) +_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaqueTriangleIntersectionFunctionWithSignature_atIndex_), signature, index); + _MTL_msg_v_setOpaqueCurveIntersectionFunctionWithSignature_atIndex__MTL__IntersectionFunctionSignature_NS__UInteger((const void*)this, nullptr, signature, index); } -_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range) +_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaqueTriangleIntersectionFunctionWithSignature_withRange_), signature, range); + _MTL_msg_v_setOpaqueCurveIntersectionFunctionWithSignature_withRange__MTL__IntersectionFunctionSignature_NS__Range((const void*)this, nullptr, signature, range); } -_MTL_INLINE void MTL::IntersectionFunctionTable::setVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::IntersectionFunctionTable::setVisibleFunctionTable(MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibleFunctionTable_atBufferIndex_), functionTable, bufferIndex); + _MTL_msg_v_setVisibleFunctionTable_atBufferIndex__MTL__VisibleFunctionTablep_NS__UInteger((const void*)this, nullptr, functionTable, bufferIndex); } -_MTL_INLINE void MTL::IntersectionFunctionTable::setVisibleFunctionTables(const MTL::VisibleFunctionTable* const functionTables[], NS::Range bufferRange) +_MTL_INLINE void MTL::IntersectionFunctionTable::setVisibleFunctionTables(const MTL::VisibleFunctionTable* const * functionTables, NS::Range bufferRange) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibleFunctionTables_withBufferRange_), functionTables, bufferRange); + _MTL_msg_v_setVisibleFunctionTables_withBufferRange__constMTL__VisibleFunctionTablepconstp_NS__Range((const void*)this, nullptr, functionTables, bufferRange); } diff --git a/thirdparty/metal-cpp/Metal/MTLLibrary.hpp b/thirdparty/metal-cpp/Metal/MTLLibrary.hpp index 44aa3a7a0762..7155019df8ef 100644 --- a/thirdparty/metal-cpp/Metal/MTLLibrary.hpp +++ b/thirdparty/metal-cpp/Metal/MTLLibrary.hpp @@ -1,47 +1,33 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLLibrary.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLDataType.hpp" #include "MTLDefines.hpp" -#include "MTLFunctionDescriptor.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class ArgumentEncoder; + class Device; + class FunctionConstantValues; + class FunctionDescriptor; + class IntersectionFunctionDescriptor; + enum DataType : NS::UInteger; + using FunctionOptions = NS::UInteger; +} +namespace NS { + class Array; + class Dictionary; + class Error; + class String; +} namespace MTL { -class Argument; -class ArgumentEncoder; -class Attribute; -class CompileOptions; -class Device; -class Function; -class FunctionConstant; -class FunctionConstantValues; -class FunctionDescriptor; -class FunctionReflection; -class IntersectionFunctionDescriptor; -class VertexAttribute; + +extern NS::ErrorDomain const LibraryErrorDomain __asm__("_MTLLibraryErrorDomain"); _MTL_ENUM(NS::UInteger, PatchType) { PatchTypeNone = 0, PatchTypeTriangle = 1, @@ -59,18 +45,18 @@ _MTL_ENUM(NS::UInteger, FunctionType) { }; _MTL_ENUM(NS::UInteger, LanguageVersion) { - LanguageVersion1_0 = 65536, - LanguageVersion1_1 = 65537, - LanguageVersion1_2 = 65538, - LanguageVersion2_0 = 131072, - LanguageVersion2_1 = 131073, - LanguageVersion2_2 = 131074, - LanguageVersion2_3 = 131075, - LanguageVersion2_4 = 131076, - LanguageVersion3_0 = 196608, - LanguageVersion3_1 = 196609, - LanguageVersion3_2 = 196610, - LanguageVersion4_0 = 262144, + LanguageVersion1_0 = (1 << 16), + LanguageVersion1_1 = (1 << 16) + 1, + LanguageVersion1_2 = (1 << 16) + 2, + LanguageVersion2_0 = (2 << 16), + LanguageVersion2_1 = (2 << 16) + 1, + LanguageVersion2_2 = (2 << 16) + 2, + LanguageVersion2_3 = (2 << 16) + 3, + LanguageVersion2_4 = (2 << 16) + 4, + LanguageVersion3_0 = (3 << 16) + 0, + LanguageVersion3_1 = (3 << 16) + 1, + LanguageVersion3_2 = (3 << 16) + 2, + LanguageVersion4_0 = (4 << 16) + 0, }; _MTL_ENUM(NS::Integer, LibraryType) { @@ -108,679 +94,631 @@ _MTL_ENUM(NS::UInteger, LibraryError) { LibraryErrorFileNotFound = 6, }; -using AutoreleasedArgument = MTL::Argument*; -using FunctionCompletionHandlerFunction = std::function; + +class VertexAttribute; +class Attribute; +class FunctionConstant; +class Function; +class CompileOptions; +class FunctionReflection; +class Library; class VertexAttribute : public NS::Referencing { public: - [[deprecated("please use isActive instead")]] - bool active() const; - static VertexAttribute* alloc(); + VertexAttribute* init() const; + + bool active() const; + NS::UInteger attributeIndex() const; + MTL::DataType attributeType() const; + bool isActive(); + bool isPatchControlPointData(); + bool isPatchData(); + NS::String* name() const; + bool patchControlPointData() const; + bool patchData() const; - NS::UInteger attributeIndex() const; - - DataType attributeType() const; - - VertexAttribute* init(); - - bool isActive() const; - - bool isPatchControlPointData() const; - - bool isPatchData() const; - - NS::String* name() const; - - [[deprecated("please use isPatchControlPointData instead")]] - bool patchControlPointData() const; - - [[deprecated("please use isPatchData instead")]] - bool patchData() const; }; + class Attribute : public NS::Referencing { public: - [[deprecated("please use isActive instead")]] - bool active() const; - static Attribute* alloc(); + Attribute* init() const; + + bool active() const; + NS::UInteger attributeIndex() const; + MTL::DataType attributeType() const; + bool isActive(); + bool isPatchControlPointData(); + bool isPatchData(); + NS::String* name() const; + bool patchControlPointData() const; + bool patchData() const; - NS::UInteger attributeIndex() const; - - DataType attributeType() const; - - Attribute* init(); - - bool isActive() const; - - bool isPatchControlPointData() const; - - bool isPatchData() const; - - NS::String* name() const; - - [[deprecated("please use isPatchControlPointData instead")]] - bool patchControlPointData() const; - - [[deprecated("please use isPatchData instead")]] - bool patchData() const; }; + class FunctionConstant : public NS::Referencing { public: static FunctionConstant* alloc(); + FunctionConstant* init() const; - NS::UInteger index() const; - - FunctionConstant* init(); - - NS::String* name() const; - - bool required() const; + NS::UInteger index() const; + NS::String* name() const; + bool required() const; + MTL::DataType type() const; - DataType type() const; }; + class Function : public NS::Referencing { public: - Device* device() const; - - NS::Dictionary* functionConstantsDictionary() const; - - FunctionType functionType() const; - - NS::String* label() const; - - NS::String* name() const; - - ArgumentEncoder* newArgumentEncoder(NS::UInteger bufferIndex); - ArgumentEncoder* newArgumentEncoder(NS::UInteger bufferIndex, const MTL::AutoreleasedArgument* reflection); + MTL::Device* device() const; + NS::Dictionary* functionConstantsDictionary() const; + MTL::FunctionType functionType() const; + NS::String* label() const; + NS::String* name() const; + MTL::ArgumentEncoder* newArgumentEncoder(NS::UInteger bufferIndex); + MTL::ArgumentEncoder* newArgumentEncoder(NS::UInteger bufferIndex, MTL::AutoreleasedArgument* reflection); + MTL::FunctionOptions options() const; + NS::Integer patchControlPointCount() const; + MTL::PatchType patchType() const; + void setLabel(NS::String* label); + NS::Array* stageInputAttributes() const; + NS::Array* vertexAttributes() const; - FunctionOptions options() const; - - NS::Integer patchControlPointCount() const; - - PatchType patchType() const; - - void setLabel(const NS::String* label); - - NS::Array* stageInputAttributes() const; - - NS::Array* vertexAttributes() const; }; + class CompileOptions : public NS::Copying { public: - static CompileOptions* alloc(); + static CompileOptions* alloc(); + CompileOptions* init() const; + + bool allowReferencingUndefinedSymbols() const; + MTL::CompileSymbolVisibility compileSymbolVisibility() const; + bool enableLogging() const; + bool fastMathEnabled() const; + NS::String* installName() const; + MTL::LanguageVersion languageVersion() const; + NS::Array* libraries() const; + MTL::LibraryType libraryType() const; + MTL::MathFloatingPointFunctions mathFloatingPointFunctions() const; + MTL::MathMode mathMode() const; + NS::UInteger maxTotalThreadsPerThreadgroup() const; + MTL::LibraryOptimizationLevel optimizationLevel() const; + NS::Dictionary* preprocessorMacros() const; + bool preserveInvariance() const; + MTL::Size requiredThreadsPerThreadgroup() const; + void setAllowReferencingUndefinedSymbols(bool allowReferencingUndefinedSymbols); + void setCompileSymbolVisibility(MTL::CompileSymbolVisibility compileSymbolVisibility); + void setEnableLogging(bool enableLogging); + void setFastMathEnabled(bool fastMathEnabled); + void setInstallName(NS::String* installName); + void setLanguageVersion(MTL::LanguageVersion languageVersion); + void setLibraries(NS::Array* libraries); + void setLibraryType(MTL::LibraryType libraryType); + void setMathFloatingPointFunctions(MTL::MathFloatingPointFunctions mathFloatingPointFunctions); + void setMathMode(MTL::MathMode mathMode); + void setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup); + void setOptimizationLevel(MTL::LibraryOptimizationLevel optimizationLevel); + void setPreprocessorMacros(NS::Dictionary* preprocessorMacros); + void setPreserveInvariance(bool preserveInvariance); + void setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup); - bool allowReferencingUndefinedSymbols() const; - - CompileSymbolVisibility compileSymbolVisibility() const; - - bool enableLogging() const; - - bool fastMathEnabled() const; - - CompileOptions* init(); - - NS::String* installName() const; - - LanguageVersion languageVersion() const; - - NS::Array* libraries() const; - - LibraryType libraryType() const; - - MathFloatingPointFunctions mathFloatingPointFunctions() const; - - MathMode mathMode() const; - - NS::UInteger maxTotalThreadsPerThreadgroup() const; - - LibraryOptimizationLevel optimizationLevel() const; - - NS::Dictionary* preprocessorMacros() const; - - bool preserveInvariance() const; - - Size requiredThreadsPerThreadgroup() const; - - void setAllowReferencingUndefinedSymbols(bool allowReferencingUndefinedSymbols); - - void setCompileSymbolVisibility(MTL::CompileSymbolVisibility compileSymbolVisibility); - - void setEnableLogging(bool enableLogging); - - void setFastMathEnabled(bool fastMathEnabled); - - void setInstallName(const NS::String* installName); - - void setLanguageVersion(MTL::LanguageVersion languageVersion); - - void setLibraries(const NS::Array* libraries); - - void setLibraryType(MTL::LibraryType libraryType); - - void setMathFloatingPointFunctions(MTL::MathFloatingPointFunctions mathFloatingPointFunctions); - - void setMathMode(MTL::MathMode mathMode); - - void setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup); - - void setOptimizationLevel(MTL::LibraryOptimizationLevel optimizationLevel); - - void setPreprocessorMacros(const NS::Dictionary* preprocessorMacros); - - void setPreserveInvariance(bool preserveInvariance); - - void setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup); }; + class FunctionReflection : public NS::Referencing { public: static FunctionReflection* alloc(); + FunctionReflection* init() const; - NS::Array* bindings() const; + NS::Array* bindings() const; - FunctionReflection* init(); }; + class Library : public NS::Referencing { public: - Device* device() const; - - NS::Array* functionNames() const; + MTL::Device* device() const; + NS::Array* functionNames() const; + NS::String* installName() const; + NS::String* label() const; + MTL::Function* newFunction(NS::String* functionName); + MTL::Function* newFunction(NS::String* name, MTL::FunctionConstantValues* constantValues, NS::Error** error); + void newFunction(NS::String* name, MTL::FunctionConstantValues* constantValues, MTL::NewFunctionBlock completionHandler); + void newFunction(NS::String* name, MTL::FunctionConstantValues* constantValues, const MTL::NewFunctionFunction& completionHandler); + void newFunction(MTL::FunctionDescriptor* descriptor, MTL::NewFunctionBlock completionHandler); + void newFunction(MTL::FunctionDescriptor* descriptor, const MTL::NewFunctionFunction& completionHandler); + MTL::Function* newFunction(MTL::FunctionDescriptor* descriptor, NS::Error** error); + void newIntersectionFunction(MTL::IntersectionFunctionDescriptor* descriptor, MTL::NewFunctionBlock completionHandler); + void newIntersectionFunction(MTL::IntersectionFunctionDescriptor* descriptor, const MTL::NewFunctionFunction& completionHandler); + MTL::Function* newIntersectionFunction(MTL::IntersectionFunctionDescriptor* descriptor, NS::Error** error); + MTL::FunctionReflection* reflection(NS::String* functionName); + void setLabel(NS::String* label); + MTL::LibraryType type() const; - NS::String* installName() const; - - NS::String* label() const; - - Function* newFunction(const NS::String* functionName); - Function* newFunction(const NS::String* name, const MTL::FunctionConstantValues* constantValues, NS::Error** error); - void newFunction(const NS::String* name, const MTL::FunctionConstantValues* constantValues, void (^completionHandler)(MTL::Function*, NS::Error*)); - void newFunction(const MTL::FunctionDescriptor* descriptor, void (^completionHandler)(MTL::Function*, NS::Error*)); - Function* newFunction(const MTL::FunctionDescriptor* descriptor, NS::Error** error); - void newFunction(const NS::String* pFunctionName, const MTL::FunctionConstantValues* pConstantValues, const MTL::FunctionCompletionHandlerFunction& completionHandler); - void newFunction(const MTL::FunctionDescriptor* pDescriptor, const MTL::FunctionCompletionHandlerFunction& completionHandler); - - void newIntersectionFunction(const MTL::IntersectionFunctionDescriptor* descriptor, void (^completionHandler)(MTL::Function*, NS::Error*)); - Function* newIntersectionFunction(const MTL::IntersectionFunctionDescriptor* descriptor, NS::Error** error); - void newIntersectionFunction(const MTL::IntersectionFunctionDescriptor* pDescriptor, const MTL::FunctionCompletionHandlerFunction& completionHandler); +}; - FunctionReflection* reflectionForFunction(const NS::String* functionName); +} // namespace MTL - void setLabel(const NS::String* label); +// --- Class symbols + inline implementations --- - LibraryType type() const; -}; +extern "C" void *OBJC_CLASS_$_MTLVertexAttribute; +extern "C" void *OBJC_CLASS_$_MTLAttribute; +extern "C" void *OBJC_CLASS_$_MTLFunctionConstant; +extern "C" void *OBJC_CLASS_$_MTLFunction; +extern "C" void *OBJC_CLASS_$_MTLCompileOptions; +extern "C" void *OBJC_CLASS_$_MTLFunctionReflection; +extern "C" void *OBJC_CLASS_$_MTLLibrary; +_MTL_INLINE MTL::VertexAttribute* MTL::VertexAttribute::alloc() +{ + return _MTL_msg_MTL__VertexAttributep_alloc((const void*)&OBJC_CLASS_$_MTLVertexAttribute, nullptr); } -_MTL_INLINE bool MTL::VertexAttribute::active() const + +_MTL_INLINE MTL::VertexAttribute* MTL::VertexAttribute::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isActive)); + return _MTL_msg_MTL__VertexAttributep_init((const void*)this, nullptr); } -_MTL_INLINE MTL::VertexAttribute* MTL::VertexAttribute::alloc() +_MTL_INLINE NS::String* MTL::VertexAttribute::name() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLVertexAttribute)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::VertexAttribute::attributeIndex() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(attributeIndex)); + return _MTL_msg_NS__UInteger_attributeIndex((const void*)this, nullptr); } _MTL_INLINE MTL::DataType MTL::VertexAttribute::attributeType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(attributeType)); + return _MTL_msg_MTL__DataType_attributeType((const void*)this, nullptr); } -_MTL_INLINE MTL::VertexAttribute* MTL::VertexAttribute::init() +_MTL_INLINE bool MTL::VertexAttribute::active() const { - return NS::Object::init(); + return _MTL_msg_bool_active((const void*)this, nullptr); } -_MTL_INLINE bool MTL::VertexAttribute::isActive() const +_MTL_INLINE bool MTL::VertexAttribute::patchData() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isActive)); + return _MTL_msg_bool_patchData((const void*)this, nullptr); } -_MTL_INLINE bool MTL::VertexAttribute::isPatchControlPointData() const +_MTL_INLINE bool MTL::VertexAttribute::patchControlPointData() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isPatchControlPointData)); + return _MTL_msg_bool_patchControlPointData((const void*)this, nullptr); } -_MTL_INLINE bool MTL::VertexAttribute::isPatchData() const +_MTL_INLINE bool MTL::VertexAttribute::isActive() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isPatchData)); + return _MTL_msg_bool_isActive((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::VertexAttribute::name() const +_MTL_INLINE bool MTL::VertexAttribute::isPatchData() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_bool_isPatchData((const void*)this, nullptr); } -_MTL_INLINE bool MTL::VertexAttribute::patchControlPointData() const +_MTL_INLINE bool MTL::VertexAttribute::isPatchControlPointData() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isPatchControlPointData)); + return _MTL_msg_bool_isPatchControlPointData((const void*)this, nullptr); } -_MTL_INLINE bool MTL::VertexAttribute::patchData() const +_MTL_INLINE MTL::Attribute* MTL::Attribute::alloc() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isPatchData)); + return _MTL_msg_MTL__Attributep_alloc((const void*)&OBJC_CLASS_$_MTLAttribute, nullptr); } -_MTL_INLINE bool MTL::Attribute::active() const +_MTL_INLINE MTL::Attribute* MTL::Attribute::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isActive)); + return _MTL_msg_MTL__Attributep_init((const void*)this, nullptr); } -_MTL_INLINE MTL::Attribute* MTL::Attribute::alloc() +_MTL_INLINE NS::String* MTL::Attribute::name() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAttribute)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::Attribute::attributeIndex() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(attributeIndex)); + return _MTL_msg_NS__UInteger_attributeIndex((const void*)this, nullptr); } _MTL_INLINE MTL::DataType MTL::Attribute::attributeType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(attributeType)); + return _MTL_msg_MTL__DataType_attributeType((const void*)this, nullptr); } -_MTL_INLINE MTL::Attribute* MTL::Attribute::init() +_MTL_INLINE bool MTL::Attribute::active() const { - return NS::Object::init(); + return _MTL_msg_bool_active((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Attribute::isActive() const +_MTL_INLINE bool MTL::Attribute::patchData() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isActive)); + return _MTL_msg_bool_patchData((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Attribute::isPatchControlPointData() const +_MTL_INLINE bool MTL::Attribute::patchControlPointData() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isPatchControlPointData)); + return _MTL_msg_bool_patchControlPointData((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Attribute::isPatchData() const +_MTL_INLINE bool MTL::Attribute::isActive() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isPatchData)); + return _MTL_msg_bool_isActive((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::Attribute::name() const +_MTL_INLINE bool MTL::Attribute::isPatchData() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_bool_isPatchData((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Attribute::patchControlPointData() const +_MTL_INLINE bool MTL::Attribute::isPatchControlPointData() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isPatchControlPointData)); + return _MTL_msg_bool_isPatchControlPointData((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Attribute::patchData() const +_MTL_INLINE MTL::FunctionConstant* MTL::FunctionConstant::alloc() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isPatchData)); + return _MTL_msg_MTL__FunctionConstantp_alloc((const void*)&OBJC_CLASS_$_MTLFunctionConstant, nullptr); } -_MTL_INLINE MTL::FunctionConstant* MTL::FunctionConstant::alloc() +_MTL_INLINE MTL::FunctionConstant* MTL::FunctionConstant::init() const { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLFunctionConstant)); + return _MTL_msg_MTL__FunctionConstantp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::FunctionConstant::index() const +_MTL_INLINE NS::String* MTL::FunctionConstant::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(index)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionConstant* MTL::FunctionConstant::init() +_MTL_INLINE MTL::DataType MTL::FunctionConstant::type() const { - return NS::Object::init(); + return _MTL_msg_MTL__DataType_type((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::FunctionConstant::name() const +_MTL_INLINE NS::UInteger MTL::FunctionConstant::index() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_NS__UInteger_index((const void*)this, nullptr); } _MTL_INLINE bool MTL::FunctionConstant::required() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(required)); + return _MTL_msg_bool_required((const void*)this, nullptr); } -_MTL_INLINE MTL::DataType MTL::FunctionConstant::type() const +_MTL_INLINE NS::String* MTL::Function::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::Device* MTL::Function::device() const +_MTL_INLINE void MTL::Function::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE NS::Dictionary* MTL::Function::functionConstantsDictionary() const +_MTL_INLINE MTL::Device* MTL::Function::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionConstantsDictionary)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } _MTL_INLINE MTL::FunctionType MTL::Function::functionType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionType)); -} - -_MTL_INLINE NS::String* MTL::Function::label() const -{ - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__FunctionType_functionType((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::Function::name() const +_MTL_INLINE MTL::PatchType MTL::Function::patchType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); + return _MTL_msg_MTL__PatchType_patchType((const void*)this, nullptr); } -_MTL_INLINE MTL::ArgumentEncoder* MTL::Function::newArgumentEncoder(NS::UInteger bufferIndex) +_MTL_INLINE NS::Integer MTL::Function::patchControlPointCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newArgumentEncoderWithBufferIndex_), bufferIndex); + return _MTL_msg_NS__Integer_patchControlPointCount((const void*)this, nullptr); } -_MTL_INLINE MTL::ArgumentEncoder* MTL::Function::newArgumentEncoder(NS::UInteger bufferIndex, const MTL::AutoreleasedArgument* reflection) +_MTL_INLINE NS::Array* MTL::Function::vertexAttributes() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newArgumentEncoderWithBufferIndex_reflection_), bufferIndex, reflection); + return _MTL_msg_NS__Arrayp_vertexAttributes((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionOptions MTL::Function::options() const +_MTL_INLINE NS::Array* MTL::Function::stageInputAttributes() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(options)); + return _MTL_msg_NS__Arrayp_stageInputAttributes((const void*)this, nullptr); } -_MTL_INLINE NS::Integer MTL::Function::patchControlPointCount() const +_MTL_INLINE NS::String* MTL::Function::name() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(patchControlPointCount)); + return _MTL_msg_NS__Stringp_name((const void*)this, nullptr); } -_MTL_INLINE MTL::PatchType MTL::Function::patchType() const +_MTL_INLINE NS::Dictionary* MTL::Function::functionConstantsDictionary() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(patchType)); + return _MTL_msg_NS__Dictionaryp_functionConstantsDictionary((const void*)this, nullptr); } -_MTL_INLINE void MTL::Function::setLabel(const NS::String* label) +_MTL_INLINE MTL::FunctionOptions MTL::Function::options() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_MTL__FunctionOptions_options((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::Function::stageInputAttributes() const +_MTL_INLINE MTL::ArgumentEncoder* MTL::Function::newArgumentEncoder(NS::UInteger bufferIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stageInputAttributes)); + return _MTL_msg_MTL__ArgumentEncoderp_newArgumentEncoderWithBufferIndex__NS__UInteger((const void*)this, nullptr, bufferIndex); } -_MTL_INLINE NS::Array* MTL::Function::vertexAttributes() const +_MTL_INLINE MTL::ArgumentEncoder* MTL::Function::newArgumentEncoder(NS::UInteger bufferIndex, MTL::AutoreleasedArgument* reflection) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexAttributes)); + return _MTL_msg_MTL__ArgumentEncoderp_newArgumentEncoderWithBufferIndex_reflection__NS__UInteger_MTL__Argumentpp((const void*)this, nullptr, bufferIndex, reflection); } _MTL_INLINE MTL::CompileOptions* MTL::CompileOptions::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLCompileOptions)); + return _MTL_msg_MTL__CompileOptionsp_alloc((const void*)&OBJC_CLASS_$_MTLCompileOptions, nullptr); } -_MTL_INLINE bool MTL::CompileOptions::allowReferencingUndefinedSymbols() const +_MTL_INLINE MTL::CompileOptions* MTL::CompileOptions::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allowReferencingUndefinedSymbols)); + return _MTL_msg_MTL__CompileOptionsp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::CompileSymbolVisibility MTL::CompileOptions::compileSymbolVisibility() const +_MTL_INLINE NS::Dictionary* MTL::CompileOptions::preprocessorMacros() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(compileSymbolVisibility)); + return _MTL_msg_NS__Dictionaryp_preprocessorMacros((const void*)this, nullptr); } -_MTL_INLINE bool MTL::CompileOptions::enableLogging() const +_MTL_INLINE void MTL::CompileOptions::setPreprocessorMacros(NS::Dictionary* preprocessorMacros) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(enableLogging)); + _MTL_msg_v_setPreprocessorMacros__NS__Dictionaryp((const void*)this, nullptr, preprocessorMacros); } _MTL_INLINE bool MTL::CompileOptions::fastMathEnabled() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fastMathEnabled)); + return _MTL_msg_bool_fastMathEnabled((const void*)this, nullptr); } -_MTL_INLINE MTL::CompileOptions* MTL::CompileOptions::init() +_MTL_INLINE void MTL::CompileOptions::setFastMathEnabled(bool fastMathEnabled) { - return NS::Object::init(); + _MTL_msg_v_setFastMathEnabled__bool((const void*)this, nullptr, fastMathEnabled); } -_MTL_INLINE NS::String* MTL::CompileOptions::installName() const +_MTL_INLINE MTL::MathMode MTL::CompileOptions::mathMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(installName)); + return _MTL_msg_MTL__MathMode_mathMode((const void*)this, nullptr); } -_MTL_INLINE MTL::LanguageVersion MTL::CompileOptions::languageVersion() const +_MTL_INLINE void MTL::CompileOptions::setMathMode(MTL::MathMode mathMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(languageVersion)); + _MTL_msg_v_setMathMode__MTL__MathMode((const void*)this, nullptr, mathMode); } -_MTL_INLINE NS::Array* MTL::CompileOptions::libraries() const +_MTL_INLINE MTL::MathFloatingPointFunctions MTL::CompileOptions::mathFloatingPointFunctions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(libraries)); + return _MTL_msg_MTL__MathFloatingPointFunctions_mathFloatingPointFunctions((const void*)this, nullptr); } -_MTL_INLINE MTL::LibraryType MTL::CompileOptions::libraryType() const +_MTL_INLINE void MTL::CompileOptions::setMathFloatingPointFunctions(MTL::MathFloatingPointFunctions mathFloatingPointFunctions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(libraryType)); + _MTL_msg_v_setMathFloatingPointFunctions__MTL__MathFloatingPointFunctions((const void*)this, nullptr, mathFloatingPointFunctions); } -_MTL_INLINE MTL::MathFloatingPointFunctions MTL::CompileOptions::mathFloatingPointFunctions() const +_MTL_INLINE MTL::LanguageVersion MTL::CompileOptions::languageVersion() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(mathFloatingPointFunctions)); + return _MTL_msg_MTL__LanguageVersion_languageVersion((const void*)this, nullptr); } -_MTL_INLINE MTL::MathMode MTL::CompileOptions::mathMode() const +_MTL_INLINE void MTL::CompileOptions::setLanguageVersion(MTL::LanguageVersion languageVersion) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(mathMode)); + _MTL_msg_v_setLanguageVersion__MTL__LanguageVersion((const void*)this, nullptr, languageVersion); } -_MTL_INLINE NS::UInteger MTL::CompileOptions::maxTotalThreadsPerThreadgroup() const +_MTL_INLINE MTL::LibraryType MTL::CompileOptions::libraryType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerThreadgroup)); + return _MTL_msg_MTL__LibraryType_libraryType((const void*)this, nullptr); } -_MTL_INLINE MTL::LibraryOptimizationLevel MTL::CompileOptions::optimizationLevel() const +_MTL_INLINE void MTL::CompileOptions::setLibraryType(MTL::LibraryType libraryType) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(optimizationLevel)); + _MTL_msg_v_setLibraryType__MTL__LibraryType((const void*)this, nullptr, libraryType); } -_MTL_INLINE NS::Dictionary* MTL::CompileOptions::preprocessorMacros() const +_MTL_INLINE NS::String* MTL::CompileOptions::installName() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(preprocessorMacros)); + return _MTL_msg_NS__Stringp_installName((const void*)this, nullptr); } -_MTL_INLINE bool MTL::CompileOptions::preserveInvariance() const +_MTL_INLINE void MTL::CompileOptions::setInstallName(NS::String* installName) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(preserveInvariance)); + _MTL_msg_v_setInstallName__NS__Stringp((const void*)this, nullptr, installName); } -_MTL_INLINE MTL::Size MTL::CompileOptions::requiredThreadsPerThreadgroup() const +_MTL_INLINE NS::Array* MTL::CompileOptions::libraries() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerThreadgroup)); + return _MTL_msg_NS__Arrayp_libraries((const void*)this, nullptr); } -_MTL_INLINE void MTL::CompileOptions::setAllowReferencingUndefinedSymbols(bool allowReferencingUndefinedSymbols) +_MTL_INLINE void MTL::CompileOptions::setLibraries(NS::Array* libraries) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAllowReferencingUndefinedSymbols_), allowReferencingUndefinedSymbols); + _MTL_msg_v_setLibraries__NS__Arrayp((const void*)this, nullptr, libraries); } -_MTL_INLINE void MTL::CompileOptions::setCompileSymbolVisibility(MTL::CompileSymbolVisibility compileSymbolVisibility) +_MTL_INLINE bool MTL::CompileOptions::preserveInvariance() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCompileSymbolVisibility_), compileSymbolVisibility); + return _MTL_msg_bool_preserveInvariance((const void*)this, nullptr); } -_MTL_INLINE void MTL::CompileOptions::setEnableLogging(bool enableLogging) +_MTL_INLINE void MTL::CompileOptions::setPreserveInvariance(bool preserveInvariance) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setEnableLogging_), enableLogging); + _MTL_msg_v_setPreserveInvariance__bool((const void*)this, nullptr, preserveInvariance); } -_MTL_INLINE void MTL::CompileOptions::setFastMathEnabled(bool fastMathEnabled) +_MTL_INLINE MTL::LibraryOptimizationLevel MTL::CompileOptions::optimizationLevel() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFastMathEnabled_), fastMathEnabled); + return _MTL_msg_MTL__LibraryOptimizationLevel_optimizationLevel((const void*)this, nullptr); } -_MTL_INLINE void MTL::CompileOptions::setInstallName(const NS::String* installName) +_MTL_INLINE void MTL::CompileOptions::setOptimizationLevel(MTL::LibraryOptimizationLevel optimizationLevel) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstallName_), installName); + _MTL_msg_v_setOptimizationLevel__MTL__LibraryOptimizationLevel((const void*)this, nullptr, optimizationLevel); } -_MTL_INLINE void MTL::CompileOptions::setLanguageVersion(MTL::LanguageVersion languageVersion) +_MTL_INLINE MTL::CompileSymbolVisibility MTL::CompileOptions::compileSymbolVisibility() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLanguageVersion_), languageVersion); + return _MTL_msg_MTL__CompileSymbolVisibility_compileSymbolVisibility((const void*)this, nullptr); } -_MTL_INLINE void MTL::CompileOptions::setLibraries(const NS::Array* libraries) +_MTL_INLINE void MTL::CompileOptions::setCompileSymbolVisibility(MTL::CompileSymbolVisibility compileSymbolVisibility) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLibraries_), libraries); + _MTL_msg_v_setCompileSymbolVisibility__MTL__CompileSymbolVisibility((const void*)this, nullptr, compileSymbolVisibility); } -_MTL_INLINE void MTL::CompileOptions::setLibraryType(MTL::LibraryType libraryType) +_MTL_INLINE bool MTL::CompileOptions::allowReferencingUndefinedSymbols() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLibraryType_), libraryType); + return _MTL_msg_bool_allowReferencingUndefinedSymbols((const void*)this, nullptr); } -_MTL_INLINE void MTL::CompileOptions::setMathFloatingPointFunctions(MTL::MathFloatingPointFunctions mathFloatingPointFunctions) +_MTL_INLINE void MTL::CompileOptions::setAllowReferencingUndefinedSymbols(bool allowReferencingUndefinedSymbols) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMathFloatingPointFunctions_), mathFloatingPointFunctions); + _MTL_msg_v_setAllowReferencingUndefinedSymbols__bool((const void*)this, nullptr, allowReferencingUndefinedSymbols); } -_MTL_INLINE void MTL::CompileOptions::setMathMode(MTL::MathMode mathMode) +_MTL_INLINE NS::UInteger MTL::CompileOptions::maxTotalThreadsPerThreadgroup() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMathMode_), mathMode); + return _MTL_msg_NS__UInteger_maxTotalThreadsPerThreadgroup((const void*)this, nullptr); } _MTL_INLINE void MTL::CompileOptions::setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadsPerThreadgroup_), maxTotalThreadsPerThreadgroup); + _MTL_msg_v_setMaxTotalThreadsPerThreadgroup__NS__UInteger((const void*)this, nullptr, maxTotalThreadsPerThreadgroup); } -_MTL_INLINE void MTL::CompileOptions::setOptimizationLevel(MTL::LibraryOptimizationLevel optimizationLevel) +_MTL_INLINE MTL::Size MTL::CompileOptions::requiredThreadsPerThreadgroup() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOptimizationLevel_), optimizationLevel); + return _MTL_msg_MTL__Size_requiredThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE void MTL::CompileOptions::setPreprocessorMacros(const NS::Dictionary* preprocessorMacros) +_MTL_INLINE void MTL::CompileOptions::setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPreprocessorMacros_), preprocessorMacros); + _MTL_msg_v_setRequiredThreadsPerThreadgroup__MTL__Size((const void*)this, nullptr, requiredThreadsPerThreadgroup); } -_MTL_INLINE void MTL::CompileOptions::setPreserveInvariance(bool preserveInvariance) +_MTL_INLINE bool MTL::CompileOptions::enableLogging() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPreserveInvariance_), preserveInvariance); + return _MTL_msg_bool_enableLogging((const void*)this, nullptr); } -_MTL_INLINE void MTL::CompileOptions::setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup) +_MTL_INLINE void MTL::CompileOptions::setEnableLogging(bool enableLogging) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRequiredThreadsPerThreadgroup_), requiredThreadsPerThreadgroup); + _MTL_msg_v_setEnableLogging__bool((const void*)this, nullptr, enableLogging); } _MTL_INLINE MTL::FunctionReflection* MTL::FunctionReflection::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLFunctionReflection)); + return _MTL_msg_MTL__FunctionReflectionp_alloc((const void*)&OBJC_CLASS_$_MTLFunctionReflection, nullptr); } -_MTL_INLINE NS::Array* MTL::FunctionReflection::bindings() const +_MTL_INLINE MTL::FunctionReflection* MTL::FunctionReflection::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bindings)); + return _MTL_msg_MTL__FunctionReflectionp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionReflection* MTL::FunctionReflection::init() +_MTL_INLINE NS::Array* MTL::FunctionReflection::bindings() const { - return NS::Object::init(); + return _MTL_msg_NS__Arrayp_bindings((const void*)this, nullptr); } -_MTL_INLINE MTL::Device* MTL::Library::device() const +_MTL_INLINE NS::String* MTL::Library::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::Library::functionNames() const +_MTL_INLINE void MTL::Library::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionNames)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE NS::String* MTL::Library::installName() const +_MTL_INLINE MTL::Device* MTL::Library::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(installName)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::Library::label() const +_MTL_INLINE NS::Array* MTL::Library::functionNames() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__Arrayp_functionNames((const void*)this, nullptr); } -_MTL_INLINE MTL::Function* MTL::Library::newFunction(const NS::String* functionName) +_MTL_INLINE MTL::LibraryType MTL::Library::type() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newFunctionWithName_), functionName); + return _MTL_msg_MTL__LibraryType_type((const void*)this, nullptr); } -_MTL_INLINE MTL::Function* MTL::Library::newFunction(const NS::String* name, const MTL::FunctionConstantValues* constantValues, NS::Error** error) +_MTL_INLINE NS::String* MTL::Library::installName() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newFunctionWithName_constantValues_error_), name, constantValues, error); + return _MTL_msg_NS__Stringp_installName((const void*)this, nullptr); } -_MTL_INLINE void MTL::Library::newFunction(const NS::String* name, const MTL::FunctionConstantValues* constantValues, void (^completionHandler)(MTL::Function*, NS::Error*)) +_MTL_INLINE MTL::Function* MTL::Library::newFunction(NS::String* functionName) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newFunctionWithName_constantValues_completionHandler_), name, constantValues, completionHandler); + return _MTL_msg_MTL__Functionp_newFunctionWithName__NS__Stringp((const void*)this, nullptr, functionName); } -_MTL_INLINE void MTL::Library::newFunction(const MTL::FunctionDescriptor* descriptor, void (^completionHandler)(MTL::Function*, NS::Error*)) +_MTL_INLINE MTL::Function* MTL::Library::newFunction(NS::String* name, MTL::FunctionConstantValues* constantValues, NS::Error** error) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newFunctionWithDescriptor_completionHandler_), descriptor, completionHandler); + return _MTL_msg_MTL__Functionp_newFunctionWithName_constantValues_error__NS__Stringp_MTL__FunctionConstantValuesp_NS__Errorpp((const void*)this, nullptr, name, constantValues, error); } -_MTL_INLINE MTL::Function* MTL::Library::newFunction(const MTL::FunctionDescriptor* descriptor, NS::Error** error) +_MTL_INLINE void MTL::Library::newFunction(NS::String* name, MTL::FunctionConstantValues* constantValues, MTL::NewFunctionBlock completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newFunctionWithDescriptor_error_), descriptor, error); + _MTL_msg_v_newFunctionWithName_constantValues_completionHandler__NS__Stringp_MTL__FunctionConstantValuesp_MTL__NewFunctionBlock((const void*)this, nullptr, name, constantValues, completionHandler); } -_MTL_INLINE void MTL::Library::newFunction(const NS::String* pFunctionName, const MTL::FunctionConstantValues* pConstantValues, const MTL::FunctionCompletionHandlerFunction& completionHandler) +_MTL_INLINE void MTL::Library::newFunction(NS::String* name, MTL::FunctionConstantValues* constantValues, const MTL::NewFunctionFunction& completionHandler) { - __block MTL::FunctionCompletionHandlerFunction blockCompletionHandler = completionHandler; - newFunction(pFunctionName, pConstantValues, ^(MTL::Function* pFunction, NS::Error* pError) { blockCompletionHandler(pFunction, pError); }); + __block MTL::NewFunctionFunction blockFunction = completionHandler; + newFunction(name, constantValues, ^(MTL::Function* x0, NS::Error* x1) { blockFunction(x0, x1); }); } -_MTL_INLINE void MTL::Library::newFunction(const MTL::FunctionDescriptor* pDescriptor, const MTL::FunctionCompletionHandlerFunction& completionHandler) +_MTL_INLINE MTL::FunctionReflection* MTL::Library::reflection(NS::String* functionName) { - __block MTL::FunctionCompletionHandlerFunction blockCompletionHandler = completionHandler; - newFunction(pDescriptor, ^(MTL::Function* pFunction, NS::Error* pError) { blockCompletionHandler(pFunction, pError); }); + return _MTL_msg_MTL__FunctionReflectionp_reflectionForFunctionWithName__NS__Stringp((const void*)this, nullptr, functionName); } -_MTL_INLINE void MTL::Library::newIntersectionFunction(const MTL::IntersectionFunctionDescriptor* descriptor, void (^completionHandler)(MTL::Function*, NS::Error*)) +_MTL_INLINE void MTL::Library::newFunction(MTL::FunctionDescriptor* descriptor, MTL::NewFunctionBlock completionHandler) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(newIntersectionFunctionWithDescriptor_completionHandler_), descriptor, completionHandler); + _MTL_msg_v_newFunctionWithDescriptor_completionHandler__MTL__FunctionDescriptorp_MTL__NewFunctionBlock((const void*)this, nullptr, descriptor, completionHandler); } -_MTL_INLINE MTL::Function* MTL::Library::newIntersectionFunction(const MTL::IntersectionFunctionDescriptor* descriptor, NS::Error** error) +_MTL_INLINE void MTL::Library::newFunction(MTL::FunctionDescriptor* descriptor, const MTL::NewFunctionFunction& completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIntersectionFunctionWithDescriptor_error_), descriptor, error); + __block MTL::NewFunctionFunction blockFunction = completionHandler; + newFunction(descriptor, ^(MTL::Function* x0, NS::Error* x1) { blockFunction(x0, x1); }); } -_MTL_INLINE void MTL::Library::newIntersectionFunction(const MTL::IntersectionFunctionDescriptor* pDescriptor, const MTL::FunctionCompletionHandlerFunction& completionHandler) +_MTL_INLINE MTL::Function* MTL::Library::newFunction(MTL::FunctionDescriptor* descriptor, NS::Error** error) { - __block MTL::FunctionCompletionHandlerFunction blockCompletionHandler = completionHandler; - newIntersectionFunction(pDescriptor, ^(MTL::Function* pFunction, NS::Error* pError) { blockCompletionHandler(pFunction, pError); }); + return _MTL_msg_MTL__Functionp_newFunctionWithDescriptor_error__MTL__FunctionDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } -_MTL_INLINE MTL::FunctionReflection* MTL::Library::reflectionForFunction(const NS::String* functionName) +_MTL_INLINE void MTL::Library::newIntersectionFunction(MTL::IntersectionFunctionDescriptor* descriptor, MTL::NewFunctionBlock completionHandler) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(reflectionForFunctionWithName_), functionName); + _MTL_msg_v_newIntersectionFunctionWithDescriptor_completionHandler__MTL__IntersectionFunctionDescriptorp_MTL__NewFunctionBlock((const void*)this, nullptr, descriptor, completionHandler); } -_MTL_INLINE void MTL::Library::setLabel(const NS::String* label) +_MTL_INLINE void MTL::Library::newIntersectionFunction(MTL::IntersectionFunctionDescriptor* descriptor, const MTL::NewFunctionFunction& completionHandler) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + __block MTL::NewFunctionFunction blockFunction = completionHandler; + newIntersectionFunction(descriptor, ^(MTL::Function* x0, NS::Error* x1) { blockFunction(x0, x1); }); } -_MTL_INLINE MTL::LibraryType MTL::Library::type() const +_MTL_INLINE MTL::Function* MTL::Library::newIntersectionFunction(MTL::IntersectionFunctionDescriptor* descriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); + return _MTL_msg_MTL__Functionp_newIntersectionFunctionWithDescriptor_error__MTL__IntersectionFunctionDescriptorp_NS__Errorpp((const void*)this, nullptr, descriptor, error); } diff --git a/thirdparty/metal-cpp/Metal/MTLLinkedFunctions.hpp b/thirdparty/metal-cpp/Metal/MTLLinkedFunctions.hpp index 4b1bd9538325..9b154d0dd386 100644 --- a/thirdparty/metal-cpp/Metal/MTLLinkedFunctions.hpp +++ b/thirdparty/metal-cpp/Metal/MTLLinkedFunctions.hpp @@ -1,29 +1,17 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLLinkedFunctions.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace NS { + class Array; + class Dictionary; +} namespace MTL { @@ -32,79 +20,78 @@ class LinkedFunctions : public NS::Copying { public: static LinkedFunctions* alloc(); + LinkedFunctions* init() const; - NS::Array* binaryFunctions() const; - NS::Array* functions() const; - - NS::Dictionary* groups() const; - - LinkedFunctions* init(); - - static LinkedFunctions* linkedFunctions(); + static MTL::LinkedFunctions* linkedFunctions(); - NS::Array* privateFunctions() const; + NS::Array* binaryFunctions() const; + NS::Array* functions() const; + NS::Dictionary* groups() const; + NS::Array* privateFunctions() const; + void setBinaryFunctions(NS::Array* binaryFunctions); + void setFunctions(NS::Array* functions); + void setGroups(NS::Dictionary* groups); + void setPrivateFunctions(NS::Array* privateFunctions); - void setBinaryFunctions(const NS::Array* binaryFunctions); +}; - void setFunctions(const NS::Array* functions); +} // namespace MTL - void setGroups(const NS::Dictionary* groups); +// --- Class symbols + inline implementations --- - void setPrivateFunctions(const NS::Array* privateFunctions); -}; +extern "C" void *OBJC_CLASS_$_MTLLinkedFunctions; -} _MTL_INLINE MTL::LinkedFunctions* MTL::LinkedFunctions::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLLinkedFunctions)); + return _MTL_msg_MTL__LinkedFunctionsp_alloc((const void*)&OBJC_CLASS_$_MTLLinkedFunctions, nullptr); } -_MTL_INLINE NS::Array* MTL::LinkedFunctions::binaryFunctions() const +_MTL_INLINE MTL::LinkedFunctions* MTL::LinkedFunctions::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(binaryFunctions)); + return _MTL_msg_MTL__LinkedFunctionsp_init((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::LinkedFunctions::functions() const +_MTL_INLINE MTL::LinkedFunctions* MTL::LinkedFunctions::linkedFunctions() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functions)); + return _MTL_msg_MTL__LinkedFunctionsp_linkedFunctions((const void*)&OBJC_CLASS_$_MTLLinkedFunctions, nullptr); } -_MTL_INLINE NS::Dictionary* MTL::LinkedFunctions::groups() const +_MTL_INLINE NS::Array* MTL::LinkedFunctions::functions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(groups)); + return _MTL_msg_NS__Arrayp_functions((const void*)this, nullptr); } -_MTL_INLINE MTL::LinkedFunctions* MTL::LinkedFunctions::init() +_MTL_INLINE void MTL::LinkedFunctions::setFunctions(NS::Array* functions) { - return NS::Object::init(); + _MTL_msg_v_setFunctions__NS__Arrayp((const void*)this, nullptr, functions); } -_MTL_INLINE MTL::LinkedFunctions* MTL::LinkedFunctions::linkedFunctions() +_MTL_INLINE NS::Array* MTL::LinkedFunctions::binaryFunctions() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLLinkedFunctions), _MTL_PRIVATE_SEL(linkedFunctions)); + return _MTL_msg_NS__Arrayp_binaryFunctions((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::LinkedFunctions::privateFunctions() const +_MTL_INLINE void MTL::LinkedFunctions::setBinaryFunctions(NS::Array* binaryFunctions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(privateFunctions)); + _MTL_msg_v_setBinaryFunctions__NS__Arrayp((const void*)this, nullptr, binaryFunctions); } -_MTL_INLINE void MTL::LinkedFunctions::setBinaryFunctions(const NS::Array* binaryFunctions) +_MTL_INLINE NS::Dictionary* MTL::LinkedFunctions::groups() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBinaryFunctions_), binaryFunctions); + return _MTL_msg_NS__Dictionaryp_groups((const void*)this, nullptr); } -_MTL_INLINE void MTL::LinkedFunctions::setFunctions(const NS::Array* functions) +_MTL_INLINE void MTL::LinkedFunctions::setGroups(NS::Dictionary* groups) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctions_), functions); + _MTL_msg_v_setGroups__NS__Dictionaryp((const void*)this, nullptr, groups); } -_MTL_INLINE void MTL::LinkedFunctions::setGroups(const NS::Dictionary* groups) +_MTL_INLINE NS::Array* MTL::LinkedFunctions::privateFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setGroups_), groups); + return _MTL_msg_NS__Arrayp_privateFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL::LinkedFunctions::setPrivateFunctions(const NS::Array* privateFunctions) +_MTL_INLINE void MTL::LinkedFunctions::setPrivateFunctions(NS::Array* privateFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPrivateFunctions_), privateFunctions); + _MTL_msg_v_setPrivateFunctions__NS__Arrayp((const void*)this, nullptr, privateFunctions); } diff --git a/thirdparty/metal-cpp/Metal/MTLLogState.hpp b/thirdparty/metal-cpp/Metal/MTLLogState.hpp index b802adf35788..89a2c010f244 100644 --- a/thirdparty/metal-cpp/Metal/MTLLogState.hpp +++ b/thirdparty/metal-cpp/Metal/MTLLogState.hpp @@ -1,33 +1,17 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLLogState.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" namespace MTL { -class LogStateDescriptor; + +extern NS::ErrorDomain const LogStateErrorDomain __asm__("_MTLLogStateErrorDomain"); _MTL_ENUM(NS::Integer, LogLevel) { LogLevelUndefined = 0, LogLevelDebug = 1, @@ -42,70 +26,75 @@ _MTL_ENUM(NS::UInteger, LogStateError) { LogStateErrorInvalid = 2, }; -using LogHandlerFunction = std::function; -_MTL_CONST(NS::ErrorDomain, LogStateErrorDomain); +class LogState; +class LogStateDescriptor; + class LogState : public NS::Referencing { public: - void addLogHandler(void (^block)(NS::String*, NS::String*, MTL::LogLevel, NS::String*)); - void addLogHandler(const MTL::LogHandlerFunction& handler); + void addLogHandler(MTL::LogHandlerBlock block); + void addLogHandler(const MTL::LogHandlerFunction& block); + }; + class LogStateDescriptor : public NS::Copying { public: static LogStateDescriptor* alloc(); + LogStateDescriptor* init() const; - NS::Integer bufferSize() const; + NS::Integer bufferSize() const; + MTL::LogLevel level() const; + void setBufferSize(NS::Integer bufferSize); + void setLevel(MTL::LogLevel level); - LogStateDescriptor* init(); +}; - LogLevel level() const; +} // namespace MTL - void setBufferSize(NS::Integer bufferSize); +// --- Class symbols + inline implementations --- - void setLevel(MTL::LogLevel level); -}; +extern "C" void *OBJC_CLASS_$_MTLLogState; +extern "C" void *OBJC_CLASS_$_MTLLogStateDescriptor; -} -_MTL_PRIVATE_DEF_CONST(NS::ErrorDomain, LogStateErrorDomain); -_MTL_INLINE void MTL::LogState::addLogHandler(void (^block)(NS::String*, NS::String*, MTL::LogLevel, NS::String*)) +_MTL_INLINE void MTL::LogState::addLogHandler(MTL::LogHandlerBlock block) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addLogHandler_), block); + _MTL_msg_v_addLogHandler__MTL__LogHandlerBlock((const void*)this, nullptr, block); } -_MTL_INLINE void MTL::LogState::addLogHandler(const MTL::LogHandlerFunction& handler) +_MTL_INLINE void MTL::LogState::addLogHandler(const MTL::LogHandlerFunction& block) { - __block LogHandlerFunction function = handler; - addLogHandler(^void(NS::String* subsystem, NS::String* category, MTL::LogLevel logLevel, NS::String* message) { function(subsystem, category, logLevel, message); }); + __block MTL::LogHandlerFunction blockFunction = block; + addLogHandler(^(NS::String* x0, NS::String* x1, MTL::LogLevel x2, NS::String* x3) { blockFunction(x0, x1, x2, x3); }); } _MTL_INLINE MTL::LogStateDescriptor* MTL::LogStateDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLLogStateDescriptor)); + return _MTL_msg_MTL__LogStateDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLLogStateDescriptor, nullptr); } -_MTL_INLINE NS::Integer MTL::LogStateDescriptor::bufferSize() const +_MTL_INLINE MTL::LogStateDescriptor* MTL::LogStateDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferSize)); + return _MTL_msg_MTL__LogStateDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::LogStateDescriptor* MTL::LogStateDescriptor::init() +_MTL_INLINE MTL::LogLevel MTL::LogStateDescriptor::level() const { - return NS::Object::init(); + return _MTL_msg_MTL__LogLevel_level((const void*)this, nullptr); } -_MTL_INLINE MTL::LogLevel MTL::LogStateDescriptor::level() const +_MTL_INLINE void MTL::LogStateDescriptor::setLevel(MTL::LogLevel level) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(level)); + _MTL_msg_v_setLevel__MTL__LogLevel((const void*)this, nullptr, level); } -_MTL_INLINE void MTL::LogStateDescriptor::setBufferSize(NS::Integer bufferSize) +_MTL_INLINE NS::Integer MTL::LogStateDescriptor::bufferSize() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBufferSize_), bufferSize); + return _MTL_msg_NS__Integer_bufferSize((const void*)this, nullptr); } -_MTL_INLINE void MTL::LogStateDescriptor::setLevel(MTL::LogLevel level) +_MTL_INLINE void MTL::LogStateDescriptor::setBufferSize(NS::Integer bufferSize) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLevel_), level); + _MTL_msg_v_setBufferSize__NS__Integer((const void*)this, nullptr, bufferSize); } diff --git a/thirdparty/metal-cpp/Metal/MTLParallelRenderCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTLParallelRenderCommandEncoder.hpp index 8c34512622df..cdad30ecc8a9 100644 --- a/thirdparty/metal-cpp/Metal/MTLParallelRenderCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTLParallelRenderCommandEncoder.hpp @@ -1,83 +1,73 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLParallelRenderCommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLCommandEncoder.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLRenderPass.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLCommandEncoder.hpp" + +namespace MTL { + class RenderCommandEncoder; + enum StoreAction : NS::UInteger; + using StoreActionOptions = NS::UInteger; +} namespace MTL { -class RenderCommandEncoder; -class ParallelRenderCommandEncoder : public NS::Referencing +class ParallelRenderCommandEncoder : public NS::Referencing { public: - RenderCommandEncoder* renderCommandEncoder(); + MTL::RenderCommandEncoder* renderCommandEncoder(); + void setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex); + void setColorStoreActionOptions(MTL::StoreActionOptions storeActionOptions, NS::UInteger colorAttachmentIndex); + void setDepthStoreAction(MTL::StoreAction storeAction); + void setDepthStoreActionOptions(MTL::StoreActionOptions storeActionOptions); + void setStencilStoreAction(MTL::StoreAction storeAction); + void setStencilStoreActionOptions(MTL::StoreActionOptions storeActionOptions); - void setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex); - void setColorStoreActionOptions(MTL::StoreActionOptions storeActionOptions, NS::UInteger colorAttachmentIndex); +}; - void setDepthStoreAction(MTL::StoreAction storeAction); - void setDepthStoreActionOptions(MTL::StoreActionOptions storeActionOptions); +} // namespace MTL - void setStencilStoreAction(MTL::StoreAction storeAction); - void setStencilStoreActionOptions(MTL::StoreActionOptions storeActionOptions); -}; +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLParallelRenderCommandEncoder; -} _MTL_INLINE MTL::RenderCommandEncoder* MTL::ParallelRenderCommandEncoder::renderCommandEncoder() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(renderCommandEncoder)); + return _MTL_msg_MTL__RenderCommandEncoderp_renderCommandEncoder((const void*)this, nullptr); } _MTL_INLINE void MTL::ParallelRenderCommandEncoder::setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setColorStoreAction_atIndex_), storeAction, colorAttachmentIndex); + _MTL_msg_v_setColorStoreAction_atIndex__MTL__StoreAction_NS__UInteger((const void*)this, nullptr, storeAction, colorAttachmentIndex); } -_MTL_INLINE void MTL::ParallelRenderCommandEncoder::setColorStoreActionOptions(MTL::StoreActionOptions storeActionOptions, NS::UInteger colorAttachmentIndex) +_MTL_INLINE void MTL::ParallelRenderCommandEncoder::setDepthStoreAction(MTL::StoreAction storeAction) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setColorStoreActionOptions_atIndex_), storeActionOptions, colorAttachmentIndex); + _MTL_msg_v_setDepthStoreAction__MTL__StoreAction((const void*)this, nullptr, storeAction); } -_MTL_INLINE void MTL::ParallelRenderCommandEncoder::setDepthStoreAction(MTL::StoreAction storeAction) +_MTL_INLINE void MTL::ParallelRenderCommandEncoder::setStencilStoreAction(MTL::StoreAction storeAction) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStoreAction_), storeAction); + _MTL_msg_v_setStencilStoreAction__MTL__StoreAction((const void*)this, nullptr, storeAction); } -_MTL_INLINE void MTL::ParallelRenderCommandEncoder::setDepthStoreActionOptions(MTL::StoreActionOptions storeActionOptions) +_MTL_INLINE void MTL::ParallelRenderCommandEncoder::setColorStoreActionOptions(MTL::StoreActionOptions storeActionOptions, NS::UInteger colorAttachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStoreActionOptions_), storeActionOptions); + _MTL_msg_v_setColorStoreActionOptions_atIndex__MTL__StoreActionOptions_NS__UInteger((const void*)this, nullptr, storeActionOptions, colorAttachmentIndex); } -_MTL_INLINE void MTL::ParallelRenderCommandEncoder::setStencilStoreAction(MTL::StoreAction storeAction) +_MTL_INLINE void MTL::ParallelRenderCommandEncoder::setDepthStoreActionOptions(MTL::StoreActionOptions storeActionOptions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilStoreAction_), storeAction); + _MTL_msg_v_setDepthStoreActionOptions__MTL__StoreActionOptions((const void*)this, nullptr, storeActionOptions); } _MTL_INLINE void MTL::ParallelRenderCommandEncoder::setStencilStoreActionOptions(MTL::StoreActionOptions storeActionOptions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilStoreActionOptions_), storeActionOptions); + _MTL_msg_v_setStencilStoreActionOptions__MTL__StoreActionOptions((const void*)this, nullptr, storeActionOptions); } diff --git a/thirdparty/metal-cpp/Metal/MTLPipeline.hpp b/thirdparty/metal-cpp/Metal/MTLPipeline.hpp index 930bb7ebb155..e2deee29e8ac 100644 --- a/thirdparty/metal-cpp/Metal/MTLPipeline.hpp +++ b/thirdparty/metal-cpp/Metal/MTLPipeline.hpp @@ -1,34 +1,16 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLPipeline.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" namespace MTL { -class PipelineBufferDescriptor; -class PipelineBufferDescriptorArray; + _MTL_ENUM(NS::UInteger, Mutability) { MutabilityDefault = 0, MutabilityMutable = 1, @@ -41,64 +23,75 @@ _MTL_ENUM(NS::Integer, ShaderValidation) { ShaderValidationDisabled = 2, }; + +class PipelineBufferDescriptor; +class PipelineBufferDescriptorArray; + class PipelineBufferDescriptor : public NS::Copying { public: static PipelineBufferDescriptor* alloc(); + PipelineBufferDescriptor* init() const; - PipelineBufferDescriptor* init(); + MTL::Mutability mutability() const; + void setMutability(MTL::Mutability mutability); - Mutability mutability() const; - void setMutability(MTL::Mutability mutability); }; + class PipelineBufferDescriptorArray : public NS::Referencing { public: static PipelineBufferDescriptorArray* alloc(); + PipelineBufferDescriptorArray* init() const; - PipelineBufferDescriptorArray* init(); + MTL::PipelineBufferDescriptor* object(NS::UInteger bufferIndex); + void setObject(MTL::PipelineBufferDescriptor* buffer, NS::UInteger bufferIndex); - PipelineBufferDescriptor* object(NS::UInteger bufferIndex); - void setObject(const MTL::PipelineBufferDescriptor* buffer, NS::UInteger bufferIndex); }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLPipelineBufferDescriptor; +extern "C" void *OBJC_CLASS_$_MTLPipelineBufferDescriptorArray; + _MTL_INLINE MTL::PipelineBufferDescriptor* MTL::PipelineBufferDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLPipelineBufferDescriptor)); + return _MTL_msg_MTL__PipelineBufferDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLPipelineBufferDescriptor, nullptr); } -_MTL_INLINE MTL::PipelineBufferDescriptor* MTL::PipelineBufferDescriptor::init() +_MTL_INLINE MTL::PipelineBufferDescriptor* MTL::PipelineBufferDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__PipelineBufferDescriptorp_init((const void*)this, nullptr); } _MTL_INLINE MTL::Mutability MTL::PipelineBufferDescriptor::mutability() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(mutability)); + return _MTL_msg_MTL__Mutability_mutability((const void*)this, nullptr); } _MTL_INLINE void MTL::PipelineBufferDescriptor::setMutability(MTL::Mutability mutability) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMutability_), mutability); + _MTL_msg_v_setMutability__MTL__Mutability((const void*)this, nullptr, mutability); } _MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::PipelineBufferDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLPipelineBufferDescriptorArray)); + return _MTL_msg_MTL__PipelineBufferDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLPipelineBufferDescriptorArray, nullptr); } -_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::PipelineBufferDescriptorArray::init() +_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::PipelineBufferDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__PipelineBufferDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::PipelineBufferDescriptor* MTL::PipelineBufferDescriptorArray::object(NS::UInteger bufferIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), bufferIndex); + return _MTL_msg_MTL__PipelineBufferDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, bufferIndex); } -_MTL_INLINE void MTL::PipelineBufferDescriptorArray::setObject(const MTL::PipelineBufferDescriptor* buffer, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::PipelineBufferDescriptorArray::setObject(MTL::PipelineBufferDescriptor* buffer, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), buffer, bufferIndex); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__PipelineBufferDescriptorp_NS__UInteger((const void*)this, nullptr, buffer, bufferIndex); } diff --git a/thirdparty/metal-cpp/Metal/MTLPixelFormat.hpp b/thirdparty/metal-cpp/Metal/MTLPixelFormat.hpp index 6d5d886c3189..c8e114831eae 100644 --- a/thirdparty/metal-cpp/Metal/MTLPixelFormat.hpp +++ b/thirdparty/metal-cpp/Metal/MTLPixelFormat.hpp @@ -1,32 +1,16 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLPixelFormat.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" namespace MTL { + _MTL_ENUM(NS::UInteger, PixelFormat) { PixelFormatInvalid = 0, PixelFormatA8Unorm = 1, @@ -170,4 +154,5 @@ _MTL_ENUM(NS::UInteger, PixelFormat) { PixelFormatUnspecialized = 263, }; -} + +} // namespace MTL diff --git a/thirdparty/metal-cpp/Metal/MTLRasterizationRate.hpp b/thirdparty/metal-cpp/Metal/MTLRasterizationRate.hpp index b2804fa84b61..8cd75d657fc5 100644 --- a/thirdparty/metal-cpp/Metal/MTLRasterizationRate.hpp +++ b/thirdparty/metal-cpp/Metal/MTLRasterizationRate.hpp @@ -1,337 +1,318 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLRasterizationRate.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLDevice.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Buffer; + class Device; +} +namespace NS { + class Number; + class String; +} namespace MTL { -class Buffer; -class Device; -class RasterizationRateLayerArray; + +class RasterizationRateSampleArray; class RasterizationRateLayerDescriptor; +class RasterizationRateLayerArray; class RasterizationRateMapDescriptor; -class RasterizationRateSampleArray; +class RasterizationRateMap; class RasterizationRateSampleArray : public NS::Referencing { public: static RasterizationRateSampleArray* alloc(); + RasterizationRateSampleArray* init() const; - RasterizationRateSampleArray* init(); + NS::Number* object(NS::UInteger index); + void setObject(NS::Number* value, NS::UInteger index); - NS::Number* object(NS::UInteger index); - void setObject(const NS::Number* value, NS::UInteger index); }; + class RasterizationRateLayerDescriptor : public NS::Copying { public: static RasterizationRateLayerDescriptor* alloc(); + RasterizationRateLayerDescriptor* init() const; - RasterizationRateSampleArray* horizontal() const; - float* horizontalSampleStorage() const; - - RasterizationRateLayerDescriptor* init(); - RasterizationRateLayerDescriptor* init(MTL::Size sampleCount); - RasterizationRateLayerDescriptor* init(MTL::Size sampleCount, const float* horizontal, const float* vertical); - - Size maxSampleCount() const; - Size sampleCount() const; - void setSampleCount(MTL::Size sampleCount); + MTL::RasterizationRateSampleArray* horizontal() const; + float * horizontalSampleStorage() const; + MTL::RasterizationRateLayerDescriptor* init(MTL::Size sampleCount); + MTL::RasterizationRateLayerDescriptor* init(MTL::Size sampleCount, const float * horizontal, const float * vertical); + MTL::Size maxSampleCount() const; + MTL::Size sampleCount() const; + MTL::RasterizationRateSampleArray* vertical() const; + float * verticalSampleStorage() const; - RasterizationRateSampleArray* vertical() const; - float* verticalSampleStorage() const; }; + class RasterizationRateLayerArray : public NS::Referencing { public: static RasterizationRateLayerArray* alloc(); + RasterizationRateLayerArray* init() const; - RasterizationRateLayerArray* init(); + MTL::RasterizationRateLayerDescriptor* object(NS::UInteger layerIndex); + void setObject(MTL::RasterizationRateLayerDescriptor* layer, NS::UInteger layerIndex); - RasterizationRateLayerDescriptor* object(NS::UInteger layerIndex); - void setObject(const MTL::RasterizationRateLayerDescriptor* layer, NS::UInteger layerIndex); }; + class RasterizationRateMapDescriptor : public NS::Copying { public: static RasterizationRateMapDescriptor* alloc(); + RasterizationRateMapDescriptor* init() const; - RasterizationRateMapDescriptor* init(); + static MTL::RasterizationRateMapDescriptor* rasterizationRateMapDescriptor(MTL::Size screenSize); + static MTL::RasterizationRateMapDescriptor* rasterizationRateMapDescriptor(MTL::Size screenSize, MTL::RasterizationRateLayerDescriptor* layer); + static MTL::RasterizationRateMapDescriptor* rasterizationRateMapDescriptor(MTL::Size screenSize, NS::UInteger layerCount, const MTL::RasterizationRateLayerDescriptor* const * layers); NS::String* label() const; - - RasterizationRateLayerDescriptor* layer(NS::UInteger layerIndex); + MTL::RasterizationRateLayerDescriptor* layer(NS::UInteger layerIndex); NS::UInteger layerCount() const; - - RasterizationRateLayerArray* layers() const; - - static RasterizationRateMapDescriptor* rasterizationRateMapDescriptor(MTL::Size screenSize); - static RasterizationRateMapDescriptor* rasterizationRateMapDescriptor(MTL::Size screenSize, const MTL::RasterizationRateLayerDescriptor* layer); - static RasterizationRateMapDescriptor* rasterizationRateMapDescriptor(MTL::Size screenSize, NS::UInteger layerCount, const MTL::RasterizationRateLayerDescriptor* const* layers); - - Size screenSize() const; - - void setLabel(const NS::String* label); - - void setLayer(const MTL::RasterizationRateLayerDescriptor* layer, NS::UInteger layerIndex); - + MTL::RasterizationRateLayerArray* layers() const; + MTL::Size screenSize() const; + void setLabel(NS::String* label); + void setLayer(MTL::RasterizationRateLayerDescriptor* layer, NS::UInteger layerIndex); void setScreenSize(MTL::Size screenSize); + }; + class RasterizationRateMap : public NS::Referencing { public: - void copyParameterDataToBuffer(const MTL::Buffer* buffer, NS::UInteger offset); - - Device* device() const; - - NS::String* label() const; - - NS::UInteger layerCount() const; - - Coordinate2D mapPhysicalToScreenCoordinates(MTL::Coordinate2D physicalCoordinates, NS::UInteger layerIndex); + void copyParameterDataToBuffer(MTL::Buffer* buffer, NS::UInteger offset); + MTL::Device* device() const; + NS::String* label() const; + NS::UInteger layerCount() const; + MTL::Coordinate2D mapPhysicalToScreenCoordinates(MTL::Coordinate2D physicalCoordinates, NS::UInteger layerIndex); + MTL::Coordinate2D mapScreenToPhysicalCoordinates(MTL::Coordinate2D screenCoordinates, NS::UInteger layerIndex); + MTL::SizeAndAlign parameterBufferSizeAndAlign() const; + MTL::Size physicalGranularity() const; + MTL::Size physicalSize(NS::UInteger layerIndex); + MTL::Size screenSize() const; - Coordinate2D mapScreenToPhysicalCoordinates(MTL::Coordinate2D screenCoordinates, NS::UInteger layerIndex); - - SizeAndAlign parameterBufferSizeAndAlign() const; +}; - Size physicalGranularity() const; +} // namespace MTL - Size physicalSize(NS::UInteger layerIndex); +// --- Class symbols + inline implementations --- - Size screenSize() const; -}; +extern "C" void *OBJC_CLASS_$_MTLRasterizationRateSampleArray; +extern "C" void *OBJC_CLASS_$_MTLRasterizationRateLayerDescriptor; +extern "C" void *OBJC_CLASS_$_MTLRasterizationRateLayerArray; +extern "C" void *OBJC_CLASS_$_MTLRasterizationRateMapDescriptor; +extern "C" void *OBJC_CLASS_$_MTLRasterizationRateMap; -} _MTL_INLINE MTL::RasterizationRateSampleArray* MTL::RasterizationRateSampleArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRasterizationRateSampleArray)); + return _MTL_msg_MTL__RasterizationRateSampleArrayp_alloc((const void*)&OBJC_CLASS_$_MTLRasterizationRateSampleArray, nullptr); } -_MTL_INLINE MTL::RasterizationRateSampleArray* MTL::RasterizationRateSampleArray::init() +_MTL_INLINE MTL::RasterizationRateSampleArray* MTL::RasterizationRateSampleArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__RasterizationRateSampleArrayp_init((const void*)this, nullptr); } _MTL_INLINE NS::Number* MTL::RasterizationRateSampleArray::object(NS::UInteger index) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), index); + return _MTL_msg_NS__Numberp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, index); } -_MTL_INLINE void MTL::RasterizationRateSampleArray::setObject(const NS::Number* value, NS::UInteger index) +_MTL_INLINE void MTL::RasterizationRateSampleArray::setObject(NS::Number* value, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), value, index); + _MTL_msg_v_setObject_atIndexedSubscript__NS__Numberp_NS__UInteger((const void*)this, nullptr, value, index); } _MTL_INLINE MTL::RasterizationRateLayerDescriptor* MTL::RasterizationRateLayerDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRasterizationRateLayerDescriptor)); + return _MTL_msg_MTL__RasterizationRateLayerDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRasterizationRateLayerDescriptor, nullptr); } -_MTL_INLINE MTL::RasterizationRateSampleArray* MTL::RasterizationRateLayerDescriptor::horizontal() const +_MTL_INLINE MTL::RasterizationRateLayerDescriptor* MTL::RasterizationRateLayerDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(horizontal)); + return _MTL_msg_MTL__RasterizationRateLayerDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE float* MTL::RasterizationRateLayerDescriptor::horizontalSampleStorage() const -{ - return Object::sendMessage(this, _MTL_PRIVATE_SEL(horizontalSampleStorage)); -} - -_MTL_INLINE MTL::RasterizationRateLayerDescriptor* MTL::RasterizationRateLayerDescriptor::init() +_MTL_INLINE MTL::Size MTL::RasterizationRateLayerDescriptor::sampleCount() const { - return NS::Object::init(); + return _MTL_msg_MTL__Size_sampleCount((const void*)this, nullptr); } -_MTL_INLINE MTL::RasterizationRateLayerDescriptor* MTL::RasterizationRateLayerDescriptor::init(MTL::Size sampleCount) +_MTL_INLINE MTL::Size MTL::RasterizationRateLayerDescriptor::maxSampleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(initWithSampleCount_), sampleCount); + return _MTL_msg_MTL__Size_maxSampleCount((const void*)this, nullptr); } -_MTL_INLINE MTL::RasterizationRateLayerDescriptor* MTL::RasterizationRateLayerDescriptor::init(MTL::Size sampleCount, const float* horizontal, const float* vertical) +_MTL_INLINE float * MTL::RasterizationRateLayerDescriptor::horizontalSampleStorage() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(initWithSampleCount_horizontal_vertical_), sampleCount, horizontal, vertical); + return _MTL_msg_floatp_horizontalSampleStorage((const void*)this, nullptr); } -_MTL_INLINE MTL::Size MTL::RasterizationRateLayerDescriptor::maxSampleCount() const +_MTL_INLINE float * MTL::RasterizationRateLayerDescriptor::verticalSampleStorage() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxSampleCount)); + return _MTL_msg_floatp_verticalSampleStorage((const void*)this, nullptr); } -_MTL_INLINE MTL::Size MTL::RasterizationRateLayerDescriptor::sampleCount() const +_MTL_INLINE MTL::RasterizationRateSampleArray* MTL::RasterizationRateLayerDescriptor::horizontal() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleCount)); + return _MTL_msg_MTL__RasterizationRateSampleArrayp_horizontal((const void*)this, nullptr); } -_MTL_INLINE void MTL::RasterizationRateLayerDescriptor::setSampleCount(MTL::Size sampleCount) +_MTL_INLINE MTL::RasterizationRateSampleArray* MTL::RasterizationRateLayerDescriptor::vertical() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSampleCount_), sampleCount); + return _MTL_msg_MTL__RasterizationRateSampleArrayp_vertical((const void*)this, nullptr); } -_MTL_INLINE MTL::RasterizationRateSampleArray* MTL::RasterizationRateLayerDescriptor::vertical() const +_MTL_INLINE MTL::RasterizationRateLayerDescriptor* MTL::RasterizationRateLayerDescriptor::init(MTL::Size sampleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertical)); + return _MTL_msg_MTL__RasterizationRateLayerDescriptorp_initWithSampleCount__MTL__Size((const void*)this, nullptr, sampleCount); } -_MTL_INLINE float* MTL::RasterizationRateLayerDescriptor::verticalSampleStorage() const +_MTL_INLINE MTL::RasterizationRateLayerDescriptor* MTL::RasterizationRateLayerDescriptor::init(MTL::Size sampleCount, const float * horizontal, const float * vertical) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(verticalSampleStorage)); + return _MTL_msg_MTL__RasterizationRateLayerDescriptorp_initWithSampleCount_horizontal_vertical__MTL__Size_constfloatp_constfloatp((const void*)this, nullptr, sampleCount, horizontal, vertical); } _MTL_INLINE MTL::RasterizationRateLayerArray* MTL::RasterizationRateLayerArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRasterizationRateLayerArray)); + return _MTL_msg_MTL__RasterizationRateLayerArrayp_alloc((const void*)&OBJC_CLASS_$_MTLRasterizationRateLayerArray, nullptr); } -_MTL_INLINE MTL::RasterizationRateLayerArray* MTL::RasterizationRateLayerArray::init() +_MTL_INLINE MTL::RasterizationRateLayerArray* MTL::RasterizationRateLayerArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__RasterizationRateLayerArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::RasterizationRateLayerDescriptor* MTL::RasterizationRateLayerArray::object(NS::UInteger layerIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), layerIndex); + return _MTL_msg_MTL__RasterizationRateLayerDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, layerIndex); } -_MTL_INLINE void MTL::RasterizationRateLayerArray::setObject(const MTL::RasterizationRateLayerDescriptor* layer, NS::UInteger layerIndex) +_MTL_INLINE void MTL::RasterizationRateLayerArray::setObject(MTL::RasterizationRateLayerDescriptor* layer, NS::UInteger layerIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), layer, layerIndex); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__RasterizationRateLayerDescriptorp_NS__UInteger((const void*)this, nullptr, layer, layerIndex); } _MTL_INLINE MTL::RasterizationRateMapDescriptor* MTL::RasterizationRateMapDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRasterizationRateMapDescriptor)); + return _MTL_msg_MTL__RasterizationRateMapDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRasterizationRateMapDescriptor, nullptr); } -_MTL_INLINE MTL::RasterizationRateMapDescriptor* MTL::RasterizationRateMapDescriptor::init() +_MTL_INLINE MTL::RasterizationRateMapDescriptor* MTL::RasterizationRateMapDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__RasterizationRateMapDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::RasterizationRateMapDescriptor::label() const +_MTL_INLINE MTL::RasterizationRateMapDescriptor* MTL::RasterizationRateMapDescriptor::rasterizationRateMapDescriptor(MTL::Size screenSize) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__RasterizationRateMapDescriptorp_rasterizationRateMapDescriptorWithScreenSize__MTL__Size((const void*)&OBJC_CLASS_$_MTLRasterizationRateMapDescriptor, nullptr, screenSize); } -_MTL_INLINE MTL::RasterizationRateLayerDescriptor* MTL::RasterizationRateMapDescriptor::layer(NS::UInteger layerIndex) +_MTL_INLINE MTL::RasterizationRateMapDescriptor* MTL::RasterizationRateMapDescriptor::rasterizationRateMapDescriptor(MTL::Size screenSize, MTL::RasterizationRateLayerDescriptor* layer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(layerAtIndex_), layerIndex); + return _MTL_msg_MTL__RasterizationRateMapDescriptorp_rasterizationRateMapDescriptorWithScreenSize_layer__MTL__Size_MTL__RasterizationRateLayerDescriptorp((const void*)&OBJC_CLASS_$_MTLRasterizationRateMapDescriptor, nullptr, screenSize, layer); } -_MTL_INLINE NS::UInteger MTL::RasterizationRateMapDescriptor::layerCount() const +_MTL_INLINE MTL::RasterizationRateMapDescriptor* MTL::RasterizationRateMapDescriptor::rasterizationRateMapDescriptor(MTL::Size screenSize, NS::UInteger layerCount, const MTL::RasterizationRateLayerDescriptor* const * layers) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(layerCount)); + return _MTL_msg_MTL__RasterizationRateMapDescriptorp_rasterizationRateMapDescriptorWithScreenSize_layerCount_layers__MTL__Size_NS__UInteger_constMTL__RasterizationRateLayerDescriptorpconstp((const void*)&OBJC_CLASS_$_MTLRasterizationRateMapDescriptor, nullptr, screenSize, layerCount, layers); } _MTL_INLINE MTL::RasterizationRateLayerArray* MTL::RasterizationRateMapDescriptor::layers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(layers)); + return _MTL_msg_MTL__RasterizationRateLayerArrayp_layers((const void*)this, nullptr); } -_MTL_INLINE MTL::RasterizationRateMapDescriptor* MTL::RasterizationRateMapDescriptor::rasterizationRateMapDescriptor(MTL::Size screenSize) -{ - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLRasterizationRateMapDescriptor), _MTL_PRIVATE_SEL(rasterizationRateMapDescriptorWithScreenSize_), screenSize); -} - -_MTL_INLINE MTL::RasterizationRateMapDescriptor* MTL::RasterizationRateMapDescriptor::rasterizationRateMapDescriptor(MTL::Size screenSize, const MTL::RasterizationRateLayerDescriptor* layer) +_MTL_INLINE MTL::Size MTL::RasterizationRateMapDescriptor::screenSize() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLRasterizationRateMapDescriptor), _MTL_PRIVATE_SEL(rasterizationRateMapDescriptorWithScreenSize_layer_), screenSize, layer); + return _MTL_msg_MTL__Size_screenSize((const void*)this, nullptr); } -_MTL_INLINE MTL::RasterizationRateMapDescriptor* MTL::RasterizationRateMapDescriptor::rasterizationRateMapDescriptor(MTL::Size screenSize, NS::UInteger layerCount, const MTL::RasterizationRateLayerDescriptor* const* layers) +_MTL_INLINE void MTL::RasterizationRateMapDescriptor::setScreenSize(MTL::Size screenSize) { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLRasterizationRateMapDescriptor), _MTL_PRIVATE_SEL(rasterizationRateMapDescriptorWithScreenSize_layerCount_layers_), screenSize, layerCount, layers); + _MTL_msg_v_setScreenSize__MTL__Size((const void*)this, nullptr, screenSize); } -_MTL_INLINE MTL::Size MTL::RasterizationRateMapDescriptor::screenSize() const +_MTL_INLINE NS::String* MTL::RasterizationRateMapDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(screenSize)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::RasterizationRateMapDescriptor::setLabel(const NS::String* label) +_MTL_INLINE void MTL::RasterizationRateMapDescriptor::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL::RasterizationRateMapDescriptor::setLayer(const MTL::RasterizationRateLayerDescriptor* layer, NS::UInteger layerIndex) +_MTL_INLINE NS::UInteger MTL::RasterizationRateMapDescriptor::layerCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLayer_atIndex_), layer, layerIndex); + return _MTL_msg_NS__UInteger_layerCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::RasterizationRateMapDescriptor::setScreenSize(MTL::Size screenSize) +_MTL_INLINE MTL::RasterizationRateLayerDescriptor* MTL::RasterizationRateMapDescriptor::layer(NS::UInteger layerIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setScreenSize_), screenSize); + return _MTL_msg_MTL__RasterizationRateLayerDescriptorp_layerAtIndex__NS__UInteger((const void*)this, nullptr, layerIndex); } -_MTL_INLINE void MTL::RasterizationRateMap::copyParameterDataToBuffer(const MTL::Buffer* buffer, NS::UInteger offset) +_MTL_INLINE void MTL::RasterizationRateMapDescriptor::setLayer(MTL::RasterizationRateLayerDescriptor* layer, NS::UInteger layerIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(copyParameterDataToBuffer_offset_), buffer, offset); + _MTL_msg_v_setLayer_atIndex__MTL__RasterizationRateLayerDescriptorp_NS__UInteger((const void*)this, nullptr, layer, layerIndex); } _MTL_INLINE MTL::Device* MTL::RasterizationRateMap::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } _MTL_INLINE NS::String* MTL::RasterizationRateMap::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RasterizationRateMap::layerCount() const +_MTL_INLINE MTL::Size MTL::RasterizationRateMap::screenSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(layerCount)); + return _MTL_msg_MTL__Size_screenSize((const void*)this, nullptr); } -_MTL_INLINE MTL::Coordinate2D MTL::RasterizationRateMap::mapPhysicalToScreenCoordinates(MTL::Coordinate2D physicalCoordinates, NS::UInteger layerIndex) +_MTL_INLINE MTL::Size MTL::RasterizationRateMap::physicalGranularity() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(mapPhysicalToScreenCoordinates_forLayer_), physicalCoordinates, layerIndex); + return _MTL_msg_MTL__Size_physicalGranularity((const void*)this, nullptr); } -_MTL_INLINE MTL::Coordinate2D MTL::RasterizationRateMap::mapScreenToPhysicalCoordinates(MTL::Coordinate2D screenCoordinates, NS::UInteger layerIndex) +_MTL_INLINE NS::UInteger MTL::RasterizationRateMap::layerCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(mapScreenToPhysicalCoordinates_forLayer_), screenCoordinates, layerIndex); + return _MTL_msg_NS__UInteger_layerCount((const void*)this, nullptr); } _MTL_INLINE MTL::SizeAndAlign MTL::RasterizationRateMap::parameterBufferSizeAndAlign() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(parameterBufferSizeAndAlign)); + return _MTL_msg_MTL__SizeAndAlign_parameterBufferSizeAndAlign((const void*)this, nullptr); } -_MTL_INLINE MTL::Size MTL::RasterizationRateMap::physicalGranularity() const +_MTL_INLINE void MTL::RasterizationRateMap::copyParameterDataToBuffer(MTL::Buffer* buffer, NS::UInteger offset) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(physicalGranularity)); + _MTL_msg_v_copyParameterDataToBuffer_offset__MTL__Bufferp_NS__UInteger((const void*)this, nullptr, buffer, offset); } _MTL_INLINE MTL::Size MTL::RasterizationRateMap::physicalSize(NS::UInteger layerIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(physicalSizeForLayer_), layerIndex); + return _MTL_msg_MTL__Size_physicalSizeForLayer__NS__UInteger((const void*)this, nullptr, layerIndex); } -_MTL_INLINE MTL::Size MTL::RasterizationRateMap::screenSize() const +_MTL_INLINE MTL::Coordinate2D MTL::RasterizationRateMap::mapScreenToPhysicalCoordinates(MTL::Coordinate2D screenCoordinates, NS::UInteger layerIndex) +{ + return _MTL_msg_MTL__SamplePosition_mapScreenToPhysicalCoordinates_forLayer__MTL__SamplePosition_NS__UInteger((const void*)this, nullptr, screenCoordinates, layerIndex); +} + +_MTL_INLINE MTL::Coordinate2D MTL::RasterizationRateMap::mapPhysicalToScreenCoordinates(MTL::Coordinate2D physicalCoordinates, NS::UInteger layerIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(screenSize)); + return _MTL_msg_MTL__SamplePosition_mapPhysicalToScreenCoordinates_forLayer__MTL__SamplePosition_NS__UInteger((const void*)this, nullptr, physicalCoordinates, layerIndex); } diff --git a/thirdparty/metal-cpp/Metal/MTLRenderCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTLRenderCommandEncoder.hpp index b2667b77e178..aa6ff30c1fab 100644 --- a/thirdparty/metal-cpp/Metal/MTLRenderCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTLRenderCommandEncoder.hpp @@ -1,54 +1,39 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLResourceStatePass.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLArgument.hpp" -#include "MTLCommandEncoder.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLRenderPass.hpp" -#include "MTLTypes.hpp" -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLCommandEncoder.hpp" + +namespace MTL { + class AccelerationStructure; + class Buffer; + class CounterSampleBuffer; + class DepthStencilState; + class Fence; + class Heap; + class IndirectCommandBuffer; + class IntersectionFunctionTable; + class LogicalToPhysicalColorAttachmentMap; + class RenderPipelineState; + class Resource; + class SamplerState; + class Texture; + class VisibleFunctionTable; + using BarrierScope = NS::UInteger; + enum IndexType : NS::UInteger; + using ResourceUsage = NS::UInteger; + enum StoreAction : NS::UInteger; + using StoreActionOptions = NS::UInteger; +} namespace MTL { -class AccelerationStructure; -class Buffer; -class CounterSampleBuffer; -class DepthStencilState; -class Fence; -class Heap; -class IndirectCommandBuffer; -class IntersectionFunctionTable; -class LogicalToPhysicalColorAttachmentMap; -class RenderPipelineState; -class Resource; -class SamplerState; -struct ScissorRect; -class Texture; -struct VertexAmplificationViewMapping; -struct Viewport; -class VisibleFunctionTable; + _MTL_ENUM(NS::UInteger, PrimitiveType) { PrimitiveTypePoint = 0, PrimitiveTypeLine = 1, @@ -85,935 +70,808 @@ _MTL_ENUM(NS::UInteger, TriangleFillMode) { }; _MTL_OPTIONS(NS::UInteger, RenderStages) { - RenderStageVertex = 1, - RenderStageFragment = 1 << 1, - RenderStageTile = 1 << 2, - RenderStageObject = 1 << 3, - RenderStageMesh = 1 << 4, + RenderStageVertex = (1UL << 0), + RenderStageFragment = (1UL << 1), + RenderStageTile = (1UL << 2), + RenderStageObject = (1UL << 3), + RenderStageMesh = (1UL << 4), }; -struct ScissorRect -{ - NS::UInteger x; - NS::UInteger y; - NS::UInteger width; - NS::UInteger height; -} _MTL_PACKED; - -struct Viewport -{ - double originX; - double originY; - double width; - double height; - double znear; - double zfar; -} _MTL_PACKED; - -struct DrawPrimitivesIndirectArguments -{ - uint32_t vertexCount; - uint32_t instanceCount; - uint32_t vertexStart; - uint32_t baseInstance; -} _MTL_PACKED; - -struct DrawIndexedPrimitivesIndirectArguments -{ - uint32_t indexCount; - uint32_t instanceCount; - uint32_t indexStart; - int32_t baseVertex; - uint32_t baseInstance; -} _MTL_PACKED; - -struct VertexAmplificationViewMapping -{ - uint32_t viewportArrayIndexOffset; - uint32_t renderTargetArrayIndexOffset; -} _MTL_PACKED; - -struct DrawPatchIndirectArguments -{ - uint32_t patchCount; - uint32_t instanceCount; - uint32_t patchStart; - uint32_t baseInstance; -} _MTL_PACKED; - -struct QuadTessellationFactorsHalf -{ - uint16_t edgeTessellationFactor[4]; - uint16_t insideTessellationFactor[2]; -} _MTL_PACKED; - -struct TriangleTessellationFactorsHalf -{ - uint16_t edgeTessellationFactor[3]; - uint16_t insideTessellationFactor; -} _MTL_PACKED; -class RenderCommandEncoder : public NS::Referencing +class RenderCommandEncoder : public NS::Referencing { public: void dispatchThreadsPerTile(MTL::Size threadsPerTile); - - void drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, const MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance); - void drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, const MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); - - void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, const MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount); - void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, const MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset); - void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, const MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance); - void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, MTL::IndexType indexType, const MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); - + void drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance); + void drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); + void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount); + void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset); + void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance); + void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, MTL::IndexType indexType, MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); void drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); - void drawMeshThreadgroups(const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); - + void drawMeshThreadgroups(MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); void drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); - - void drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance); - void drawPatches(NS::UInteger numberOfPatchControlPoints, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); - + void drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance); + void drawPatches(NS::UInteger numberOfPatchControlPoints, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); void drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount); void drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount); void drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount, NS::UInteger baseInstance); - void drawPrimitives(MTL::PrimitiveType primitiveType, const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); - - void executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange); - void executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandbuffer, const MTL::Buffer* indirectRangeBuffer, NS::UInteger indirectBufferOffset); - + void drawPrimitives(MTL::PrimitiveType primitiveType, MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); + void executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange); + void executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandbuffer, MTL::Buffer* indirectRangeBuffer, NS::UInteger indirectBufferOffset); void memoryBarrier(MTL::BarrierScope scope, MTL::RenderStages after, MTL::RenderStages before); - void memoryBarrier(const MTL::Resource* const resources[], NS::UInteger count, MTL::RenderStages after, MTL::RenderStages before); - - void sampleCountersInBuffer(const MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier); - + void memoryBarrier(const MTL::Resource* const * resources, NS::UInteger count, MTL::RenderStages after, MTL::RenderStages before); + void sampleCountersInBuffer(MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier); void setBlendColor(float red, float green, float blue, float alpha); - - void setColorAttachmentMap(const MTL::LogicalToPhysicalColorAttachmentMap* mapping); - + void setColorAttachmentMap(MTL::LogicalToPhysicalColorAttachmentMap* mapping); void setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex); void setColorStoreActionOptions(MTL::StoreActionOptions storeActionOptions, NS::UInteger colorAttachmentIndex); - void setCullMode(MTL::CullMode cullMode); - void setDepthBias(float depthBias, float slopeScale, float clamp); - void setDepthClipMode(MTL::DepthClipMode depthClipMode); - - void setDepthStencilState(const MTL::DepthStencilState* depthStencilState); - + void setDepthStencilState(MTL::DepthStencilState* depthStencilState); void setDepthStoreAction(MTL::StoreAction storeAction); void setDepthStoreActionOptions(MTL::StoreActionOptions storeActionOptions); - - void setDepthTestBounds(float minBound, float maxBound); - - void setFragmentAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex); - - void setFragmentBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setDepthTestMinBound(float minBound, float maxBound); + void setFragmentAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex); + void setFragmentBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); void setFragmentBufferOffset(NS::UInteger offset, NS::UInteger index); - - void setFragmentBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range); - - void setFragmentBytes(const void* bytes, NS::UInteger length, NS::UInteger index); - - void setFragmentIntersectionFunctionTable(const MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex); - void setFragmentIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const intersectionFunctionTables[], NS::Range range); - - void setFragmentSamplerState(const MTL::SamplerState* sampler, NS::UInteger index); - void setFragmentSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); - void setFragmentSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range); - void setFragmentSamplerStates(const MTL::SamplerState* const samplers[], const float lodMinClamps[], const float lodMaxClamps[], NS::Range range); - - void setFragmentTexture(const MTL::Texture* texture, NS::UInteger index); - void setFragmentTextures(const MTL::Texture* const textures[], NS::Range range); - - void setFragmentVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex); - void setFragmentVisibleFunctionTables(const MTL::VisibleFunctionTable* const functionTables[], NS::Range range); - + void setFragmentBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range); + void setFragmentBytes(const void * bytes, NS::UInteger length, NS::UInteger index); + void setFragmentIntersectionFunctionTable(MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex); + void setFragmentIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const * intersectionFunctionTables, NS::Range range); + void setFragmentSamplerState(MTL::SamplerState* sampler, NS::UInteger index); + void setFragmentSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); + void setFragmentSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range); + void setFragmentSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range); + void setFragmentTexture(MTL::Texture* texture, NS::UInteger index); + void setFragmentTextures(const MTL::Texture* const * textures, NS::Range range); + void setFragmentVisibleFunctionTable(MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex); + void setFragmentVisibleFunctionTables(const MTL::VisibleFunctionTable* const * functionTables, NS::Range range); void setFrontFacingWinding(MTL::Winding frontFacingWinding); - - void setMeshBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setMeshBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); void setMeshBufferOffset(NS::UInteger offset, NS::UInteger index); - - void setMeshBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, NS::Range range); - - void setMeshBytes(const void* bytes, NS::UInteger length, NS::UInteger index); - - void setMeshSamplerState(const MTL::SamplerState* sampler, NS::UInteger index); - void setMeshSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); - void setMeshSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range); - void setMeshSamplerStates(const MTL::SamplerState* const samplers[], const float* lodMinClamps, const float* lodMaxClamps, NS::Range range); - - void setMeshTexture(const MTL::Texture* texture, NS::UInteger index); - void setMeshTextures(const MTL::Texture* const textures[], NS::Range range); - - void setObjectBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setMeshBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range); + void setMeshBytes(const void * bytes, NS::UInteger length, NS::UInteger index); + void setMeshSamplerState(MTL::SamplerState* sampler, NS::UInteger index); + void setMeshSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); + void setMeshSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range); + void setMeshSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range); + void setMeshTexture(MTL::Texture* texture, NS::UInteger index); + void setMeshTextures(const MTL::Texture* const * textures, NS::Range range); + void setObjectBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); void setObjectBufferOffset(NS::UInteger offset, NS::UInteger index); - - void setObjectBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, NS::Range range); - - void setObjectBytes(const void* bytes, NS::UInteger length, NS::UInteger index); - - void setObjectSamplerState(const MTL::SamplerState* sampler, NS::UInteger index); - void setObjectSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); - void setObjectSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range); - void setObjectSamplerStates(const MTL::SamplerState* const samplers[], const float* lodMinClamps, const float* lodMaxClamps, NS::Range range); - - void setObjectTexture(const MTL::Texture* texture, NS::UInteger index); - void setObjectTextures(const MTL::Texture* const textures[], NS::Range range); - + void setObjectBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range); + void setObjectBytes(const void * bytes, NS::UInteger length, NS::UInteger index); + void setObjectSamplerState(MTL::SamplerState* sampler, NS::UInteger index); + void setObjectSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); + void setObjectSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range); + void setObjectSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range); + void setObjectTexture(MTL::Texture* texture, NS::UInteger index); + void setObjectTextures(const MTL::Texture* const * textures, NS::Range range); void setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index); - - void setRenderPipelineState(const MTL::RenderPipelineState* pipelineState); - + void setRenderPipelineState(MTL::RenderPipelineState* pipelineState); void setScissorRect(MTL::ScissorRect rect); - void setScissorRects(const MTL::ScissorRect* scissorRects, NS::UInteger count); - + void setScissorRects(const MTL::ScissorRect * scissorRects, NS::UInteger count); void setStencilReferenceValue(uint32_t referenceValue); void setStencilReferenceValues(uint32_t frontReferenceValue, uint32_t backReferenceValue); - void setStencilStoreAction(MTL::StoreAction storeAction); void setStencilStoreActionOptions(MTL::StoreActionOptions storeActionOptions); - - void setTessellationFactorBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride); - + void setTessellationFactorBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride); void setTessellationFactorScale(float scale); - void setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger offset, NS::UInteger index); - - void setTileAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex); - - void setTileBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setTileAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex); + void setTileBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); void setTileBufferOffset(NS::UInteger offset, NS::UInteger index); - - void setTileBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, NS::Range range); - - void setTileBytes(const void* bytes, NS::UInteger length, NS::UInteger index); - - void setTileIntersectionFunctionTable(const MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex); - void setTileIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const intersectionFunctionTables[], NS::Range range); - - void setTileSamplerState(const MTL::SamplerState* sampler, NS::UInteger index); - void setTileSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); - void setTileSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range); - void setTileSamplerStates(const MTL::SamplerState* const samplers[], const float lodMinClamps[], const float lodMaxClamps[], NS::Range range); - - void setTileTexture(const MTL::Texture* texture, NS::UInteger index); - void setTileTextures(const MTL::Texture* const textures[], NS::Range range); - - void setTileVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex); - void setTileVisibleFunctionTables(const MTL::VisibleFunctionTable* const functionTables[], NS::Range range); - + void setTileBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range); + void setTileBytes(const void * bytes, NS::UInteger length, NS::UInteger index); + void setTileIntersectionFunctionTable(MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex); + void setTileIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const * intersectionFunctionTables, NS::Range range); + void setTileSamplerState(MTL::SamplerState* sampler, NS::UInteger index); + void setTileSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); + void setTileSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range); + void setTileSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range); + void setTileTexture(MTL::Texture* texture, NS::UInteger index); + void setTileTextures(const MTL::Texture* const * textures, NS::Range range); + void setTileVisibleFunctionTable(MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex); + void setTileVisibleFunctionTables(const MTL::VisibleFunctionTable* const * functionTables, NS::Range range); void setTriangleFillMode(MTL::TriangleFillMode fillMode); - - void setVertexAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex); - - void setVertexAmplificationCount(NS::UInteger count, const MTL::VertexAmplificationViewMapping* viewMappings); - - void setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); - void setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + void setVertexAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex); + void setVertexAmplificationCount(NS::UInteger count, const MTL::VertexAmplificationViewMapping * viewMappings); + void setVertexBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setVertexBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); void setVertexBufferOffset(NS::UInteger offset, NS::UInteger index); void setVertexBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index); - - void setVertexBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range); - void setVertexBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range); - - void setVertexBytes(const void* bytes, NS::UInteger length, NS::UInteger index); - void setVertexBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index); - - void setVertexIntersectionFunctionTable(const MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex); - void setVertexIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const intersectionFunctionTables[], NS::Range range); - - void setVertexSamplerState(const MTL::SamplerState* sampler, NS::UInteger index); - void setVertexSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); - void setVertexSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range); - void setVertexSamplerStates(const MTL::SamplerState* const samplers[], const float lodMinClamps[], const float lodMaxClamps[], NS::Range range); - - void setVertexTexture(const MTL::Texture* texture, NS::UInteger index); - void setVertexTextures(const MTL::Texture* const textures[], NS::Range range); - - void setVertexVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex); - void setVertexVisibleFunctionTables(const MTL::VisibleFunctionTable* const functionTables[], NS::Range range); - + void setVertexBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range); + void setVertexBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, const NS::UInteger * strides, NS::Range range); + void setVertexBytes(const void * bytes, NS::UInteger length, NS::UInteger index); + void setVertexBytes(const void * bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index); + void setVertexIntersectionFunctionTable(MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex); + void setVertexIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const * intersectionFunctionTables, NS::Range range); + void setVertexSamplerState(MTL::SamplerState* sampler, NS::UInteger index); + void setVertexSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index); + void setVertexSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range); + void setVertexSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range); + void setVertexTexture(MTL::Texture* texture, NS::UInteger index); + void setVertexTextures(const MTL::Texture* const * textures, NS::Range range); + void setVertexVisibleFunctionTable(MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex); + void setVertexVisibleFunctionTables(const MTL::VisibleFunctionTable* const * functionTables, NS::Range range); void setViewport(MTL::Viewport viewport); - void setViewports(const MTL::Viewport* viewports, NS::UInteger count); - + void setViewports(const MTL::Viewport * viewports, NS::UInteger count); void setVisibilityResultMode(MTL::VisibilityResultMode mode, NS::UInteger offset); - void textureBarrier(); - NS::UInteger tileHeight() const; - NS::UInteger tileWidth() const; + void updateFence(MTL::Fence* fence, MTL::RenderStages stages); + void useHeap(MTL::Heap* heap); + void useHeap(MTL::Heap* heap, MTL::RenderStages stages); + void useHeaps(const MTL::Heap* const * heaps, NS::UInteger count); + void useHeaps(const MTL::Heap* const * heaps, NS::UInteger count, MTL::RenderStages stages); + void useResource(MTL::Resource* resource, MTL::ResourceUsage usage); + void useResource(MTL::Resource* resource, MTL::ResourceUsage usage, MTL::RenderStages stages); + void useResources(const MTL::Resource* const * resources, NS::UInteger count, MTL::ResourceUsage usage); + void useResources(const MTL::Resource* const * resources, NS::UInteger count, MTL::ResourceUsage usage, MTL::RenderStages stages); + void waitForFence(MTL::Fence* fence, MTL::RenderStages stages); - void updateFence(const MTL::Fence* fence, MTL::RenderStages stages); +}; - void useHeap(const MTL::Heap* heap); - void useHeap(const MTL::Heap* heap, MTL::RenderStages stages); - void useHeaps(const MTL::Heap* const heaps[], NS::UInteger count); - void useHeaps(const MTL::Heap* const heaps[], NS::UInteger count, MTL::RenderStages stages); +} // namespace MTL - void useResource(const MTL::Resource* resource, MTL::ResourceUsage usage); - void useResource(const MTL::Resource* resource, MTL::ResourceUsage usage, MTL::RenderStages stages); - void useResources(const MTL::Resource* const resources[], NS::UInteger count, MTL::ResourceUsage usage); - void useResources(const MTL::Resource* const resources[], NS::UInteger count, MTL::ResourceUsage usage, MTL::RenderStages stages); +// --- Class symbols + inline implementations --- - void waitForFence(const MTL::Fence* fence, MTL::RenderStages stages); -}; +extern "C" void *OBJC_CLASS_$_MTLRenderCommandEncoder; +_MTL_INLINE NS::UInteger MTL::RenderCommandEncoder::tileWidth() const +{ + return _MTL_msg_NS__UInteger_tileWidth((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderCommandEncoder::dispatchThreadsPerTile(MTL::Size threadsPerTile) +_MTL_INLINE NS::UInteger MTL::RenderCommandEncoder::tileHeight() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(dispatchThreadsPerTile_), threadsPerTile); + return _MTL_msg_NS__UInteger_tileHeight((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, const MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance) +_MTL_INLINE void MTL::RenderCommandEncoder::setRenderPipelineState(MTL::RenderPipelineState* pipelineState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance_), numberOfPatchControlPoints, patchStart, patchCount, patchIndexBuffer, patchIndexBufferOffset, controlPointIndexBuffer, controlPointIndexBufferOffset, instanceCount, baseInstance); + _MTL_msg_v_setRenderPipelineState__MTL__RenderPipelineStatep((const void*)this, nullptr, pipelineState); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, const MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBytes(const void * bytes, NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPatches_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_indirectBuffer_indirectBufferOffset_), numberOfPatchControlPoints, patchIndexBuffer, patchIndexBufferOffset, controlPointIndexBuffer, controlPointIndexBufferOffset, indirectBuffer, indirectBufferOffset); + _MTL_msg_v_setVertexBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger((const void*)this, nullptr, bytes, length, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, const MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_), primitiveType, indexCount, indexType, indexBuffer, indexBufferOffset, instanceCount); + _MTL_msg_v_setVertexBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, const MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBufferOffset(NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_), primitiveType, indexCount, indexType, indexBuffer, indexBufferOffset); + _MTL_msg_v_setVertexBufferOffset_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, offset, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, const MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance_), primitiveType, indexCount, indexType, indexBuffer, indexBufferOffset, instanceCount, baseVertex, baseInstance); + _MTL_msg_v_setVertexBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range((const void*)this, nullptr, buffers, offsets, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, MTL::IndexType indexType, const MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexType_indexBuffer_indexBufferOffset_indirectBuffer_indirectBufferOffset_), primitiveType, indexType, indexBuffer, indexBufferOffset, indirectBuffer, indirectBufferOffset); + _MTL_msg_v_setVertexBuffer_offset_attributeStride_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, stride, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, const NS::UInteger * strides, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), threadgroupsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); + _MTL_msg_v_setVertexBuffers_offsets_attributeStrides_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_constNS__UIntegerp_NS__Range((const void*)this, nullptr, buffers, offsets, strides, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawMeshThreadgroups(const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), indirectBuffer, indirectBufferOffset, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); + _MTL_msg_v_setVertexBufferOffset_attributeStride_atIndex__NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, offset, stride, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBytes(const void * bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), threadsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); + _MTL_msg_v_setVertexBytes_length_attributeStride_atIndex__constvoidp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, bytes, length, stride, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexTexture(MTL::Texture* texture, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance_), numberOfPatchControlPoints, patchStart, patchCount, patchIndexBuffer, patchIndexBufferOffset, instanceCount, baseInstance); + _MTL_msg_v_setVertexTexture_atIndex__MTL__Texturep_NS__UInteger((const void*)this, nullptr, texture, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawPatches(NS::UInteger numberOfPatchControlPoints, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexTextures(const MTL::Texture* const * textures, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPatches_patchIndexBuffer_patchIndexBufferOffset_indirectBuffer_indirectBufferOffset_), numberOfPatchControlPoints, patchIndexBuffer, patchIndexBufferOffset, indirectBuffer, indirectBufferOffset); + _MTL_msg_v_setVertexTextures_withRange__constMTL__Texturepconstp_NS__Range((const void*)this, nullptr, textures, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexSamplerState(MTL::SamplerState* sampler, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPrimitives_vertexStart_vertexCount_instanceCount_), primitiveType, vertexStart, vertexCount, instanceCount); + _MTL_msg_v_setVertexSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger((const void*)this, nullptr, sampler, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPrimitives_vertexStart_vertexCount_), primitiveType, vertexStart, vertexCount); + _MTL_msg_v_setVertexSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range((const void*)this, nullptr, samplers, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount, NS::UInteger baseInstance) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance_), primitiveType, vertexStart, vertexCount, instanceCount, baseInstance); + _MTL_msg_v_setVertexSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger((const void*)this, nullptr, sampler, lodMinClamp, lodMaxClamp, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPrimitives_indirectBuffer_indirectBufferOffset_), primitiveType, indirectBuffer, indirectBufferOffset); + _MTL_msg_v_setVertexSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range((const void*)this, nullptr, samplers, lodMinClamps, lodMaxClamps, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexVisibleFunctionTable(MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(executeCommandsInBuffer_withRange_), indirectCommandBuffer, executionRange); + _MTL_msg_v_setVertexVisibleFunctionTable_atBufferIndex__MTL__VisibleFunctionTablep_NS__UInteger((const void*)this, nullptr, functionTable, bufferIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::executeCommandsInBuffer(const MTL::IndirectCommandBuffer* indirectCommandbuffer, const MTL::Buffer* indirectRangeBuffer, NS::UInteger indirectBufferOffset) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexVisibleFunctionTables(const MTL::VisibleFunctionTable* const * functionTables, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(executeCommandsInBuffer_indirectBuffer_indirectBufferOffset_), indirectCommandbuffer, indirectRangeBuffer, indirectBufferOffset); + _MTL_msg_v_setVertexVisibleFunctionTables_withBufferRange__constMTL__VisibleFunctionTablepconstp_NS__Range((const void*)this, nullptr, functionTables, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::memoryBarrier(MTL::BarrierScope scope, MTL::RenderStages after, MTL::RenderStages before) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexIntersectionFunctionTable(MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(memoryBarrierWithScope_afterStages_beforeStages_), scope, after, before); + _MTL_msg_v_setVertexIntersectionFunctionTable_atBufferIndex__MTL__IntersectionFunctionTablep_NS__UInteger((const void*)this, nullptr, intersectionFunctionTable, bufferIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::memoryBarrier(const MTL::Resource* const resources[], NS::UInteger count, MTL::RenderStages after, MTL::RenderStages before) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const * intersectionFunctionTables, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(memoryBarrierWithResources_count_afterStages_beforeStages_), resources, count, after, before); + _MTL_msg_v_setVertexIntersectionFunctionTables_withBufferRange__constMTL__IntersectionFunctionTablepconstp_NS__Range((const void*)this, nullptr, intersectionFunctionTables, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::sampleCountersInBuffer(const MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleCountersInBuffer_atSampleIndex_withBarrier_), sampleBuffer, sampleIndex, barrier); + _MTL_msg_v_setVertexAccelerationStructure_atBufferIndex__MTL__AccelerationStructurep_NS__UInteger((const void*)this, nullptr, accelerationStructure, bufferIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::setBlendColor(float red, float green, float blue, float alpha) +_MTL_INLINE void MTL::RenderCommandEncoder::setViewport(MTL::Viewport viewport) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBlendColorRed_green_blue_alpha_), red, green, blue, alpha); + _MTL_msg_v_setViewport__MTL__Viewport((const void*)this, nullptr, viewport); } -_MTL_INLINE void MTL::RenderCommandEncoder::setColorAttachmentMap(const MTL::LogicalToPhysicalColorAttachmentMap* mapping) +_MTL_INLINE void MTL::RenderCommandEncoder::setViewports(const MTL::Viewport * viewports, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setColorAttachmentMap_), mapping); + _MTL_msg_v_setViewports_count__constMTL__Viewportp_NS__UInteger((const void*)this, nullptr, viewports, count); } -_MTL_INLINE void MTL::RenderCommandEncoder::setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::setFrontFacingWinding(MTL::Winding frontFacingWinding) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setColorStoreAction_atIndex_), storeAction, colorAttachmentIndex); + _MTL_msg_v_setFrontFacingWinding__MTL__Winding((const void*)this, nullptr, frontFacingWinding); } -_MTL_INLINE void MTL::RenderCommandEncoder::setColorStoreActionOptions(MTL::StoreActionOptions storeActionOptions, NS::UInteger colorAttachmentIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexAmplificationCount(NS::UInteger count, const MTL::VertexAmplificationViewMapping * viewMappings) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setColorStoreActionOptions_atIndex_), storeActionOptions, colorAttachmentIndex); + _MTL_msg_v_setVertexAmplificationCount_viewMappings__NS__UInteger_constMTL__VertexAmplificationViewMappingp((const void*)this, nullptr, count, viewMappings); } _MTL_INLINE void MTL::RenderCommandEncoder::setCullMode(MTL::CullMode cullMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCullMode_), cullMode); + _MTL_msg_v_setCullMode__MTL__CullMode((const void*)this, nullptr, cullMode); } -_MTL_INLINE void MTL::RenderCommandEncoder::setDepthBias(float depthBias, float slopeScale, float clamp) +_MTL_INLINE void MTL::RenderCommandEncoder::setDepthClipMode(MTL::DepthClipMode depthClipMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthBias_slopeScale_clamp_), depthBias, slopeScale, clamp); + _MTL_msg_v_setDepthClipMode__MTL__DepthClipMode((const void*)this, nullptr, depthClipMode); } -_MTL_INLINE void MTL::RenderCommandEncoder::setDepthClipMode(MTL::DepthClipMode depthClipMode) +_MTL_INLINE void MTL::RenderCommandEncoder::setDepthBias(float depthBias, float slopeScale, float clamp) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthClipMode_), depthClipMode); + _MTL_msg_v_setDepthBias_slopeScale_clamp__float_float_float((const void*)this, nullptr, depthBias, slopeScale, clamp); } -_MTL_INLINE void MTL::RenderCommandEncoder::setDepthStencilState(const MTL::DepthStencilState* depthStencilState) +_MTL_INLINE void MTL::RenderCommandEncoder::setDepthTestMinBound(float minBound, float maxBound) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStencilState_), depthStencilState); + _MTL_msg_v_setDepthTestMinBound_maxBound__float_float((const void*)this, nullptr, minBound, maxBound); } -_MTL_INLINE void MTL::RenderCommandEncoder::setDepthStoreAction(MTL::StoreAction storeAction) +_MTL_INLINE void MTL::RenderCommandEncoder::setScissorRect(MTL::ScissorRect rect) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStoreAction_), storeAction); + _MTL_msg_v_setScissorRect__MTL__ScissorRect((const void*)this, nullptr, rect); } -_MTL_INLINE void MTL::RenderCommandEncoder::setDepthStoreActionOptions(MTL::StoreActionOptions storeActionOptions) +_MTL_INLINE void MTL::RenderCommandEncoder::setScissorRects(const MTL::ScissorRect * scissorRects, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthStoreActionOptions_), storeActionOptions); + _MTL_msg_v_setScissorRects_count__constMTL__ScissorRectp_NS__UInteger((const void*)this, nullptr, scissorRects, count); } -_MTL_INLINE void MTL::RenderCommandEncoder::setDepthTestBounds(float minBound, float maxBound) +_MTL_INLINE void MTL::RenderCommandEncoder::setTriangleFillMode(MTL::TriangleFillMode fillMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthTestMinBound_maxBound_), minBound, maxBound); + _MTL_msg_v_setTriangleFillMode__MTL__TriangleFillMode((const void*)this, nullptr, fillMode); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentBytes(const void * bytes, NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentAccelerationStructure_atBufferIndex_), accelerationStructure, bufferIndex); + _MTL_msg_v_setFragmentBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger((const void*)this, nullptr, bytes, length, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_setFragmentBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } _MTL_INLINE void MTL::RenderCommandEncoder::setFragmentBufferOffset(NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentBufferOffset_atIndex_), offset, index); + _MTL_msg_v_setFragmentBufferOffset_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, offset, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentBuffers_offsets_withRange_), buffers, offsets, range); + _MTL_msg_v_setFragmentBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range((const void*)this, nullptr, buffers, offsets, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentBytes(const void* bytes, NS::UInteger length, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentTexture(MTL::Texture* texture, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentBytes_length_atIndex_), bytes, length, index); + _MTL_msg_v_setFragmentTexture_atIndex__MTL__Texturep_NS__UInteger((const void*)this, nullptr, texture, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentIntersectionFunctionTable(const MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentTextures(const MTL::Texture* const * textures, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentIntersectionFunctionTable_atBufferIndex_), intersectionFunctionTable, bufferIndex); + _MTL_msg_v_setFragmentTextures_withRange__constMTL__Texturepconstp_NS__Range((const void*)this, nullptr, textures, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const intersectionFunctionTables[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentSamplerState(MTL::SamplerState* sampler, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentIntersectionFunctionTables_withBufferRange_), intersectionFunctionTables, range); + _MTL_msg_v_setFragmentSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger((const void*)this, nullptr, sampler, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentSamplerState(const MTL::SamplerState* sampler, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentSamplerState_atIndex_), sampler, index); + _MTL_msg_v_setFragmentSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range((const void*)this, nullptr, samplers, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentSamplerState_lodMinClamp_lodMaxClamp_atIndex_), sampler, lodMinClamp, lodMaxClamp, index); + _MTL_msg_v_setFragmentSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger((const void*)this, nullptr, sampler, lodMinClamp, lodMaxClamp, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentSamplerStates_withRange_), samplers, range); + _MTL_msg_v_setFragmentSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range((const void*)this, nullptr, samplers, lodMinClamps, lodMaxClamps, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentSamplerStates(const MTL::SamplerState* const samplers[], const float lodMinClamps[], const float lodMaxClamps[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentVisibleFunctionTable(MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentSamplerStates_lodMinClamps_lodMaxClamps_withRange_), samplers, lodMinClamps, lodMaxClamps, range); + _MTL_msg_v_setFragmentVisibleFunctionTable_atBufferIndex__MTL__VisibleFunctionTablep_NS__UInteger((const void*)this, nullptr, functionTable, bufferIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentTexture(const MTL::Texture* texture, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentVisibleFunctionTables(const MTL::VisibleFunctionTable* const * functionTables, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentTexture_atIndex_), texture, index); + _MTL_msg_v_setFragmentVisibleFunctionTables_withBufferRange__constMTL__VisibleFunctionTablepconstp_NS__Range((const void*)this, nullptr, functionTables, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentTextures(const MTL::Texture* const textures[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentIntersectionFunctionTable(MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentTextures_withRange_), textures, range); + _MTL_msg_v_setFragmentIntersectionFunctionTable_atBufferIndex__MTL__IntersectionFunctionTablep_NS__UInteger((const void*)this, nullptr, intersectionFunctionTable, bufferIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const * intersectionFunctionTables, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentVisibleFunctionTable_atBufferIndex_), functionTable, bufferIndex); + _MTL_msg_v_setFragmentIntersectionFunctionTables_withBufferRange__constMTL__IntersectionFunctionTablepconstp_NS__Range((const void*)this, nullptr, intersectionFunctionTables, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentVisibleFunctionTables(const MTL::VisibleFunctionTable* const functionTables[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setFragmentAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentVisibleFunctionTables_withBufferRange_), functionTables, range); + _MTL_msg_v_setFragmentAccelerationStructure_atBufferIndex__MTL__AccelerationStructurep_NS__UInteger((const void*)this, nullptr, accelerationStructure, bufferIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::setFrontFacingWinding(MTL::Winding frontFacingWinding) +_MTL_INLINE void MTL::RenderCommandEncoder::setBlendColor(float red, float green, float blue, float alpha) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFrontFacingWinding_), frontFacingWinding); + _MTL_msg_v_setBlendColorRed_green_blue_alpha__float_float_float_float((const void*)this, nullptr, red, green, blue, alpha); } -_MTL_INLINE void MTL::RenderCommandEncoder::setMeshBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setDepthStencilState(MTL::DepthStencilState* depthStencilState) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_setDepthStencilState__MTL__DepthStencilStatep((const void*)this, nullptr, depthStencilState); } -_MTL_INLINE void MTL::RenderCommandEncoder::setMeshBufferOffset(NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setStencilReferenceValue(uint32_t referenceValue) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshBufferOffset_atIndex_), offset, index); + _MTL_msg_v_setStencilReferenceValue__uint32_t((const void*)this, nullptr, referenceValue); } -_MTL_INLINE void MTL::RenderCommandEncoder::setMeshBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setStencilReferenceValues(uint32_t frontReferenceValue, uint32_t backReferenceValue) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshBuffers_offsets_withRange_), buffers, offsets, range); + _MTL_msg_v_setStencilFrontReferenceValue_backReferenceValue__uint32_t_uint32_t((const void*)this, nullptr, frontReferenceValue, backReferenceValue); } -_MTL_INLINE void MTL::RenderCommandEncoder::setMeshBytes(const void* bytes, NS::UInteger length, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setVisibilityResultMode(MTL::VisibilityResultMode mode, NS::UInteger offset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshBytes_length_atIndex_), bytes, length, index); + _MTL_msg_v_setVisibilityResultMode_offset__MTL__VisibilityResultMode_NS__UInteger((const void*)this, nullptr, mode, offset); } -_MTL_INLINE void MTL::RenderCommandEncoder::setMeshSamplerState(const MTL::SamplerState* sampler, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshSamplerState_atIndex_), sampler, index); + _MTL_msg_v_setColorStoreAction_atIndex__MTL__StoreAction_NS__UInteger((const void*)this, nullptr, storeAction, colorAttachmentIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::setMeshSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setDepthStoreAction(MTL::StoreAction storeAction) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex_), sampler, lodMinClamp, lodMaxClamp, index); + _MTL_msg_v_setDepthStoreAction__MTL__StoreAction((const void*)this, nullptr, storeAction); } -_MTL_INLINE void MTL::RenderCommandEncoder::setMeshSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setStencilStoreAction(MTL::StoreAction storeAction) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshSamplerStates_withRange_), samplers, range); + _MTL_msg_v_setStencilStoreAction__MTL__StoreAction((const void*)this, nullptr, storeAction); } -_MTL_INLINE void MTL::RenderCommandEncoder::setMeshSamplerStates(const MTL::SamplerState* const samplers[], const float* lodMinClamps, const float* lodMaxClamps, NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setColorStoreActionOptions(MTL::StoreActionOptions storeActionOptions, NS::UInteger colorAttachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshSamplerStates_lodMinClamps_lodMaxClamps_withRange_), samplers, lodMinClamps, lodMaxClamps, range); + _MTL_msg_v_setColorStoreActionOptions_atIndex__MTL__StoreActionOptions_NS__UInteger((const void*)this, nullptr, storeActionOptions, colorAttachmentIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::setMeshTexture(const MTL::Texture* texture, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setDepthStoreActionOptions(MTL::StoreActionOptions storeActionOptions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshTexture_atIndex_), texture, index); + _MTL_msg_v_setDepthStoreActionOptions__MTL__StoreActionOptions((const void*)this, nullptr, storeActionOptions); } -_MTL_INLINE void MTL::RenderCommandEncoder::setMeshTextures(const MTL::Texture* const textures[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setStencilStoreActionOptions(MTL::StoreActionOptions storeActionOptions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshTextures_withRange_), textures, range); + _MTL_msg_v_setStencilStoreActionOptions__MTL__StoreActionOptions((const void*)this, nullptr, storeActionOptions); } -_MTL_INLINE void MTL::RenderCommandEncoder::setObjectBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setObjectBytes(const void * bytes, NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_setObjectBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger((const void*)this, nullptr, bytes, length, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setObjectBufferOffset(NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setObjectBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectBufferOffset_atIndex_), offset, index); + _MTL_msg_v_setObjectBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setObjectBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setObjectBufferOffset(NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectBuffers_offsets_withRange_), buffers, offsets, range); + _MTL_msg_v_setObjectBufferOffset_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, offset, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setObjectBytes(const void* bytes, NS::UInteger length, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setObjectBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectBytes_length_atIndex_), bytes, length, index); + _MTL_msg_v_setObjectBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range((const void*)this, nullptr, buffers, offsets, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setObjectSamplerState(const MTL::SamplerState* sampler, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setObjectTexture(MTL::Texture* texture, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectSamplerState_atIndex_), sampler, index); + _MTL_msg_v_setObjectTexture_atIndex__MTL__Texturep_NS__UInteger((const void*)this, nullptr, texture, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setObjectSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setObjectTextures(const MTL::Texture* const * textures, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex_), sampler, lodMinClamp, lodMaxClamp, index); + _MTL_msg_v_setObjectTextures_withRange__constMTL__Texturepconstp_NS__Range((const void*)this, nullptr, textures, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setObjectSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setObjectSamplerState(MTL::SamplerState* sampler, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectSamplerStates_withRange_), samplers, range); + _MTL_msg_v_setObjectSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger((const void*)this, nullptr, sampler, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setObjectSamplerStates(const MTL::SamplerState* const samplers[], const float* lodMinClamps, const float* lodMaxClamps, NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setObjectSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectSamplerStates_lodMinClamps_lodMaxClamps_withRange_), samplers, lodMinClamps, lodMaxClamps, range); + _MTL_msg_v_setObjectSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range((const void*)this, nullptr, samplers, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setObjectTexture(const MTL::Texture* texture, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setObjectSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectTexture_atIndex_), texture, index); + _MTL_msg_v_setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger((const void*)this, nullptr, sampler, lodMinClamp, lodMaxClamp, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setObjectTextures(const MTL::Texture* const textures[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setObjectSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectTextures_withRange_), textures, range); + _MTL_msg_v_setObjectSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range((const void*)this, nullptr, samplers, lodMinClamps, lodMaxClamps, range); } _MTL_INLINE void MTL::RenderCommandEncoder::setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectThreadgroupMemoryLength_atIndex_), length, index); -} - -_MTL_INLINE void MTL::RenderCommandEncoder::setRenderPipelineState(const MTL::RenderPipelineState* pipelineState) -{ - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderPipelineState_), pipelineState); + _MTL_msg_v_setObjectThreadgroupMemoryLength_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, length, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setScissorRect(MTL::ScissorRect rect) +_MTL_INLINE void MTL::RenderCommandEncoder::setMeshBytes(const void * bytes, NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setScissorRect_), rect); + _MTL_msg_v_setMeshBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger((const void*)this, nullptr, bytes, length, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setScissorRects(const MTL::ScissorRect* scissorRects, NS::UInteger count) +_MTL_INLINE void MTL::RenderCommandEncoder::setMeshBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setScissorRects_count_), scissorRects, count); + _MTL_msg_v_setMeshBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setStencilReferenceValue(uint32_t referenceValue) +_MTL_INLINE void MTL::RenderCommandEncoder::setMeshBufferOffset(NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilReferenceValue_), referenceValue); + _MTL_msg_v_setMeshBufferOffset_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, offset, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setStencilReferenceValues(uint32_t frontReferenceValue, uint32_t backReferenceValue) +_MTL_INLINE void MTL::RenderCommandEncoder::setMeshBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilFrontReferenceValue_backReferenceValue_), frontReferenceValue, backReferenceValue); + _MTL_msg_v_setMeshBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range((const void*)this, nullptr, buffers, offsets, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setStencilStoreAction(MTL::StoreAction storeAction) +_MTL_INLINE void MTL::RenderCommandEncoder::setMeshTexture(MTL::Texture* texture, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilStoreAction_), storeAction); + _MTL_msg_v_setMeshTexture_atIndex__MTL__Texturep_NS__UInteger((const void*)this, nullptr, texture, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setStencilStoreActionOptions(MTL::StoreActionOptions storeActionOptions) +_MTL_INLINE void MTL::RenderCommandEncoder::setMeshTextures(const MTL::Texture* const * textures, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilStoreActionOptions_), storeActionOptions); + _MTL_msg_v_setMeshTextures_withRange__constMTL__Texturepconstp_NS__Range((const void*)this, nullptr, textures, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTessellationFactorBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride) +_MTL_INLINE void MTL::RenderCommandEncoder::setMeshSamplerState(MTL::SamplerState* sampler, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTessellationFactorBuffer_offset_instanceStride_), buffer, offset, instanceStride); + _MTL_msg_v_setMeshSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger((const void*)this, nullptr, sampler, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTessellationFactorScale(float scale) +_MTL_INLINE void MTL::RenderCommandEncoder::setMeshSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTessellationFactorScale_), scale); + _MTL_msg_v_setMeshSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range((const void*)this, nullptr, samplers, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setMeshSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadgroupMemoryLength_offset_atIndex_), length, offset, index); + _MTL_msg_v_setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger((const void*)this, nullptr, sampler, lodMinClamp, lodMaxClamp, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::setMeshSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileAccelerationStructure_atBufferIndex_), accelerationStructure, bufferIndex); + _MTL_msg_v_setMeshSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range((const void*)this, nullptr, samplers, lodMinClamps, lodMaxClamps, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Size_MTL__Size_MTL__Size((const void*)this, nullptr, threadgroupsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileBufferOffset(NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileBufferOffset_atIndex_), offset, index); + _MTL_msg_v_drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Size_MTL__Size_MTL__Size((const void*)this, nullptr, threadsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::drawMeshThreadgroups(MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileBuffers_offsets_withRange_), buffers, offsets, range); + _MTL_msg_v_drawMeshThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup__MTL__Bufferp_NS__UInteger_MTL__Size_MTL__Size((const void*)this, nullptr, indirectBuffer, indirectBufferOffset, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileBytes(const void* bytes, NS::UInteger length, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileBytes_length_atIndex_), bytes, length, index); + _MTL_msg_v_drawPrimitives_vertexStart_vertexCount_instanceCount__MTL__PrimitiveType_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, primitiveType, vertexStart, vertexCount, instanceCount); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileIntersectionFunctionTable(const MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileIntersectionFunctionTable_atBufferIndex_), intersectionFunctionTable, bufferIndex); + _MTL_msg_v_drawPrimitives_vertexStart_vertexCount__MTL__PrimitiveType_NS__UInteger_NS__UInteger((const void*)this, nullptr, primitiveType, vertexStart, vertexCount); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const intersectionFunctionTables[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileIntersectionFunctionTables_withBufferRange_), intersectionFunctionTables, range); + _MTL_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, primitiveType, indexCount, indexType, indexBuffer, indexBufferOffset, instanceCount); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileSamplerState(const MTL::SamplerState* sampler, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileSamplerState_atIndex_), sampler, index); + _MTL_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, primitiveType, indexCount, indexType, indexBuffer, indexBufferOffset); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger vertexStart, NS::UInteger vertexCount, NS::UInteger instanceCount, NS::UInteger baseInstance) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileSamplerState_lodMinClamp_lodMaxClamp_atIndex_), sampler, lodMinClamp, lodMaxClamp, index); + _MTL_msg_v_drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance__MTL__PrimitiveType_NS__UInteger_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, primitiveType, vertexStart, vertexCount, instanceCount, baseInstance); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileSamplerStates_withRange_), samplers, range); + _MTL_msg_v_drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance__MTL__PrimitiveType_NS__UInteger_MTL__IndexType_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__Integer_NS__UInteger((const void*)this, nullptr, primitiveType, indexCount, indexType, indexBuffer, indexBufferOffset, instanceCount, baseVertex, baseInstance); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileSamplerStates(const MTL::SamplerState* const samplers[], const float lodMinClamps[], const float lodMaxClamps[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::drawPrimitives(MTL::PrimitiveType primitiveType, MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileSamplerStates_lodMinClamps_lodMaxClamps_withRange_), samplers, lodMinClamps, lodMaxClamps, range); + _MTL_msg_v_drawPrimitives_indirectBuffer_indirectBufferOffset__MTL__PrimitiveType_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, primitiveType, indirectBuffer, indirectBufferOffset); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileTexture(const MTL::Texture* texture, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPrimitives(MTL::PrimitiveType primitiveType, MTL::IndexType indexType, MTL::Buffer* indexBuffer, NS::UInteger indexBufferOffset, MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileTexture_atIndex_), texture, index); + _MTL_msg_v_drawIndexedPrimitives_indexType_indexBuffer_indexBufferOffset_indirectBuffer_indirectBufferOffset__MTL__PrimitiveType_MTL__IndexType_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, primitiveType, indexType, indexBuffer, indexBufferOffset, indirectBuffer, indirectBufferOffset); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileTextures(const MTL::Texture* const textures[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::textureBarrier() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileTextures_withRange_), textures, range); + _MTL_msg_v_textureBarrier((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::updateFence(MTL::Fence* fence, MTL::RenderStages stages) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileVisibleFunctionTable_atBufferIndex_), functionTable, bufferIndex); + _MTL_msg_v_updateFence_afterStages__MTL__Fencep_MTL__RenderStages((const void*)this, nullptr, fence, stages); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTileVisibleFunctionTables(const MTL::VisibleFunctionTable* const functionTables[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::waitForFence(MTL::Fence* fence, MTL::RenderStages stages) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileVisibleFunctionTables_withBufferRange_), functionTables, range); + _MTL_msg_v_waitForFence_beforeStages__MTL__Fencep_MTL__RenderStages((const void*)this, nullptr, fence, stages); } -_MTL_INLINE void MTL::RenderCommandEncoder::setTriangleFillMode(MTL::TriangleFillMode fillMode) +_MTL_INLINE void MTL::RenderCommandEncoder::setTessellationFactorBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTriangleFillMode_), fillMode); + _MTL_msg_v_setTessellationFactorBuffer_offset_instanceStride__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, instanceStride); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexAccelerationStructure(const MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::setTessellationFactorScale(float scale) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexAccelerationStructure_atBufferIndex_), accelerationStructure, bufferIndex); + _MTL_msg_v_setTessellationFactorScale__float((const void*)this, nullptr, scale); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexAmplificationCount(NS::UInteger count, const MTL::VertexAmplificationViewMapping* viewMappings) +_MTL_INLINE void MTL::RenderCommandEncoder::drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexAmplificationCount_viewMappings_), count, viewMappings); + _MTL_msg_v_drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance__NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, numberOfPatchControlPoints, patchStart, patchCount, patchIndexBuffer, patchIndexBufferOffset, instanceCount, baseInstance); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::drawPatches(NS::UInteger numberOfPatchControlPoints, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffer_offset_atIndex_), buffer, offset, index); + _MTL_msg_v_drawPatches_patchIndexBuffer_patchIndexBufferOffset_indirectBuffer_indirectBufferOffset__NS__UInteger_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, numberOfPatchControlPoints, patchIndexBuffer, patchIndexBufferOffset, indirectBuffer, indirectBufferOffset); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); + _MTL_msg_v_drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance__NS__UInteger_NS__UInteger_NS__UInteger_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, numberOfPatchControlPoints, patchStart, patchCount, patchIndexBuffer, patchIndexBufferOffset, controlPointIndexBuffer, controlPointIndexBufferOffset, instanceCount, baseInstance); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBufferOffset(NS::UInteger offset, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, MTL::Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBufferOffset_atIndex_), offset, index); + _MTL_msg_v_drawIndexedPatches_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_indirectBuffer_indirectBufferOffset__NS__UInteger_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, numberOfPatchControlPoints, patchIndexBuffer, patchIndexBufferOffset, controlPointIndexBuffer, controlPointIndexBufferOffset, indirectBuffer, indirectBufferOffset); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileBytes(const void * bytes, NS::UInteger length, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBufferOffset_attributeStride_atIndex_), offset, stride, index); + _MTL_msg_v_setTileBytes_length_atIndex__constvoidp_NS__UInteger_NS__UInteger((const void*)this, nullptr, bytes, length, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileBuffer(MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffers_offsets_withRange_), buffers, offsets, range); + _MTL_msg_v_setTileBuffer_offset_atIndex__MTL__Bufferp_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, offset, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileBufferOffset(NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffers_offsets_attributeStrides_withRange_), buffers, offsets, strides, range); + _MTL_msg_v_setTileBufferOffset_atIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, offset, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBytes(const void* bytes, NS::UInteger length, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileBuffers(const MTL::Buffer* const * buffers, const NS::UInteger * offsets, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBytes_length_atIndex_), bytes, length, index); + _MTL_msg_v_setTileBuffers_offsets_withRange__constMTL__Bufferpconstp_constNS__UIntegerp_NS__Range((const void*)this, nullptr, buffers, offsets, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileTexture(MTL::Texture* texture, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBytes_length_attributeStride_atIndex_), bytes, length, stride, index); + _MTL_msg_v_setTileTexture_atIndex__MTL__Texturep_NS__UInteger((const void*)this, nullptr, texture, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexIntersectionFunctionTable(const MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileTextures(const MTL::Texture* const * textures, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexIntersectionFunctionTable_atBufferIndex_), intersectionFunctionTable, bufferIndex); + _MTL_msg_v_setTileTextures_withRange__constMTL__Texturepconstp_NS__Range((const void*)this, nullptr, textures, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const intersectionFunctionTables[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileSamplerState(MTL::SamplerState* sampler, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexIntersectionFunctionTables_withBufferRange_), intersectionFunctionTables, range); + _MTL_msg_v_setTileSamplerState_atIndex__MTL__SamplerStatep_NS__UInteger((const void*)this, nullptr, sampler, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexSamplerState(const MTL::SamplerState* sampler, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileSamplerStates(const MTL::SamplerState* const * samplers, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexSamplerState_atIndex_), sampler, index); + _MTL_msg_v_setTileSamplerStates_withRange__constMTL__SamplerStatepconstp_NS__Range((const void*)this, nullptr, samplers, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexSamplerState(const MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileSamplerState(MTL::SamplerState* sampler, float lodMinClamp, float lodMaxClamp, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexSamplerState_lodMinClamp_lodMaxClamp_atIndex_), sampler, lodMinClamp, lodMaxClamp, index); + _MTL_msg_v_setTileSamplerState_lodMinClamp_lodMaxClamp_atIndex__MTL__SamplerStatep_float_float_NS__UInteger((const void*)this, nullptr, sampler, lodMinClamp, lodMaxClamp, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexSamplerStates(const MTL::SamplerState* const samplers[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileSamplerStates(const MTL::SamplerState* const * samplers, const float * lodMinClamps, const float * lodMaxClamps, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexSamplerStates_withRange_), samplers, range); + _MTL_msg_v_setTileSamplerStates_lodMinClamps_lodMaxClamps_withRange__constMTL__SamplerStatepconstp_constfloatp_constfloatp_NS__Range((const void*)this, nullptr, samplers, lodMinClamps, lodMaxClamps, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexSamplerStates(const MTL::SamplerState* const samplers[], const float lodMinClamps[], const float lodMaxClamps[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileVisibleFunctionTable(MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexSamplerStates_lodMinClamps_lodMaxClamps_withRange_), samplers, lodMinClamps, lodMaxClamps, range); + _MTL_msg_v_setTileVisibleFunctionTable_atBufferIndex__MTL__VisibleFunctionTablep_NS__UInteger((const void*)this, nullptr, functionTable, bufferIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexTexture(const MTL::Texture* texture, NS::UInteger index) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileVisibleFunctionTables(const MTL::VisibleFunctionTable* const * functionTables, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexTexture_atIndex_), texture, index); + _MTL_msg_v_setTileVisibleFunctionTables_withBufferRange__constMTL__VisibleFunctionTablepconstp_NS__Range((const void*)this, nullptr, functionTables, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexTextures(const MTL::Texture* const textures[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileIntersectionFunctionTable(MTL::IntersectionFunctionTable* intersectionFunctionTable, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexTextures_withRange_), textures, range); + _MTL_msg_v_setTileIntersectionFunctionTable_atBufferIndex__MTL__IntersectionFunctionTablep_NS__UInteger((const void*)this, nullptr, intersectionFunctionTable, bufferIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileIntersectionFunctionTables(const MTL::IntersectionFunctionTable* const * intersectionFunctionTables, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexVisibleFunctionTable_atBufferIndex_), functionTable, bufferIndex); + _MTL_msg_v_setTileIntersectionFunctionTables_withBufferRange__constMTL__IntersectionFunctionTablepconstp_NS__Range((const void*)this, nullptr, intersectionFunctionTables, range); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVertexVisibleFunctionTables(const MTL::VisibleFunctionTable* const functionTables[], NS::Range range) +_MTL_INLINE void MTL::RenderCommandEncoder::setTileAccelerationStructure(MTL::AccelerationStructure* accelerationStructure, NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexVisibleFunctionTables_withBufferRange_), functionTables, range); + _MTL_msg_v_setTileAccelerationStructure_atBufferIndex__MTL__AccelerationStructurep_NS__UInteger((const void*)this, nullptr, accelerationStructure, bufferIndex); } -_MTL_INLINE void MTL::RenderCommandEncoder::setViewport(MTL::Viewport viewport) +_MTL_INLINE void MTL::RenderCommandEncoder::dispatchThreadsPerTile(MTL::Size threadsPerTile) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setViewport_), viewport); + _MTL_msg_v_dispatchThreadsPerTile__MTL__Size((const void*)this, nullptr, threadsPerTile); } -_MTL_INLINE void MTL::RenderCommandEncoder::setViewports(const MTL::Viewport* viewports, NS::UInteger count) +_MTL_INLINE void MTL::RenderCommandEncoder::setThreadgroupMemoryLength(NS::UInteger length, NS::UInteger offset, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setViewports_count_), viewports, count); + _MTL_msg_v_setThreadgroupMemoryLength_offset_atIndex__NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, length, offset, index); } -_MTL_INLINE void MTL::RenderCommandEncoder::setVisibilityResultMode(MTL::VisibilityResultMode mode, NS::UInteger offset) +_MTL_INLINE void MTL::RenderCommandEncoder::useResource(MTL::Resource* resource, MTL::ResourceUsage usage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibilityResultMode_offset_), mode, offset); + _MTL_msg_v_useResource_usage__MTL__Resourcep_MTL__ResourceUsage((const void*)this, nullptr, resource, usage); } -_MTL_INLINE void MTL::RenderCommandEncoder::textureBarrier() +_MTL_INLINE void MTL::RenderCommandEncoder::useResources(const MTL::Resource* const * resources, NS::UInteger count, MTL::ResourceUsage usage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(textureBarrier)); + _MTL_msg_v_useResources_count_usage__constMTL__Resourcepconstp_NS__UInteger_MTL__ResourceUsage((const void*)this, nullptr, resources, count, usage); } -_MTL_INLINE NS::UInteger MTL::RenderCommandEncoder::tileHeight() const +_MTL_INLINE void MTL::RenderCommandEncoder::useResource(MTL::Resource* resource, MTL::ResourceUsage usage, MTL::RenderStages stages) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileHeight)); + _MTL_msg_v_useResource_usage_stages__MTL__Resourcep_MTL__ResourceUsage_MTL__RenderStages((const void*)this, nullptr, resource, usage, stages); } -_MTL_INLINE NS::UInteger MTL::RenderCommandEncoder::tileWidth() const +_MTL_INLINE void MTL::RenderCommandEncoder::useResources(const MTL::Resource* const * resources, NS::UInteger count, MTL::ResourceUsage usage, MTL::RenderStages stages) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileWidth)); + _MTL_msg_v_useResources_count_usage_stages__constMTL__Resourcepconstp_NS__UInteger_MTL__ResourceUsage_MTL__RenderStages((const void*)this, nullptr, resources, count, usage, stages); } -_MTL_INLINE void MTL::RenderCommandEncoder::updateFence(const MTL::Fence* fence, MTL::RenderStages stages) +_MTL_INLINE void MTL::RenderCommandEncoder::useHeap(MTL::Heap* heap) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateFence_afterStages_), fence, stages); + _MTL_msg_v_useHeap__MTL__Heapp((const void*)this, nullptr, heap); } -_MTL_INLINE void MTL::RenderCommandEncoder::useHeap(const MTL::Heap* heap) +_MTL_INLINE void MTL::RenderCommandEncoder::useHeaps(const MTL::Heap* const * heaps, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useHeap_), heap); + _MTL_msg_v_useHeaps_count__constMTL__Heappconstp_NS__UInteger((const void*)this, nullptr, heaps, count); } -_MTL_INLINE void MTL::RenderCommandEncoder::useHeap(const MTL::Heap* heap, MTL::RenderStages stages) +_MTL_INLINE void MTL::RenderCommandEncoder::useHeap(MTL::Heap* heap, MTL::RenderStages stages) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useHeap_stages_), heap, stages); + _MTL_msg_v_useHeap_stages__MTL__Heapp_MTL__RenderStages((const void*)this, nullptr, heap, stages); } -_MTL_INLINE void MTL::RenderCommandEncoder::useHeaps(const MTL::Heap* const heaps[], NS::UInteger count) +_MTL_INLINE void MTL::RenderCommandEncoder::useHeaps(const MTL::Heap* const * heaps, NS::UInteger count, MTL::RenderStages stages) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useHeaps_count_), heaps, count); + _MTL_msg_v_useHeaps_count_stages__constMTL__Heappconstp_NS__UInteger_MTL__RenderStages((const void*)this, nullptr, heaps, count, stages); } -_MTL_INLINE void MTL::RenderCommandEncoder::useHeaps(const MTL::Heap* const heaps[], NS::UInteger count, MTL::RenderStages stages) +_MTL_INLINE void MTL::RenderCommandEncoder::executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandBuffer, NS::Range executionRange) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useHeaps_count_stages_), heaps, count, stages); + _MTL_msg_v_executeCommandsInBuffer_withRange__MTL__IndirectCommandBufferp_NS__Range((const void*)this, nullptr, indirectCommandBuffer, executionRange); } -_MTL_INLINE void MTL::RenderCommandEncoder::useResource(const MTL::Resource* resource, MTL::ResourceUsage usage) +_MTL_INLINE void MTL::RenderCommandEncoder::executeCommandsInBuffer(MTL::IndirectCommandBuffer* indirectCommandbuffer, MTL::Buffer* indirectRangeBuffer, NS::UInteger indirectBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResource_usage_), resource, usage); + _MTL_msg_v_executeCommandsInBuffer_indirectBuffer_indirectBufferOffset__MTL__IndirectCommandBufferp_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, indirectCommandbuffer, indirectRangeBuffer, indirectBufferOffset); } -_MTL_INLINE void MTL::RenderCommandEncoder::useResource(const MTL::Resource* resource, MTL::ResourceUsage usage, MTL::RenderStages stages) +_MTL_INLINE void MTL::RenderCommandEncoder::memoryBarrier(MTL::BarrierScope scope, MTL::RenderStages after, MTL::RenderStages before) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResource_usage_stages_), resource, usage, stages); + _MTL_msg_v_memoryBarrierWithScope_afterStages_beforeStages__MTL__BarrierScope_MTL__RenderStages_MTL__RenderStages((const void*)this, nullptr, scope, after, before); } -_MTL_INLINE void MTL::RenderCommandEncoder::useResources(const MTL::Resource* const resources[], NS::UInteger count, MTL::ResourceUsage usage) +_MTL_INLINE void MTL::RenderCommandEncoder::memoryBarrier(const MTL::Resource* const * resources, NS::UInteger count, MTL::RenderStages after, MTL::RenderStages before) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResources_count_usage_), resources, count, usage); + _MTL_msg_v_memoryBarrierWithResources_count_afterStages_beforeStages__constMTL__Resourcepconstp_NS__UInteger_MTL__RenderStages_MTL__RenderStages((const void*)this, nullptr, resources, count, after, before); } -_MTL_INLINE void MTL::RenderCommandEncoder::useResources(const MTL::Resource* const resources[], NS::UInteger count, MTL::ResourceUsage usage, MTL::RenderStages stages) +_MTL_INLINE void MTL::RenderCommandEncoder::sampleCountersInBuffer(MTL::CounterSampleBuffer* sampleBuffer, NS::UInteger sampleIndex, bool barrier) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(useResources_count_usage_stages_), resources, count, usage, stages); + _MTL_msg_v_sampleCountersInBuffer_atSampleIndex_withBarrier__MTL__CounterSampleBufferp_NS__UInteger_bool((const void*)this, nullptr, sampleBuffer, sampleIndex, barrier); } -_MTL_INLINE void MTL::RenderCommandEncoder::waitForFence(const MTL::Fence* fence, MTL::RenderStages stages) +_MTL_INLINE void MTL::RenderCommandEncoder::setColorAttachmentMap(MTL::LogicalToPhysicalColorAttachmentMap* mapping) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitForFence_beforeStages_), fence, stages); + _MTL_msg_v_setColorAttachmentMap__MTL__LogicalToPhysicalColorAttachmentMapp((const void*)this, nullptr, mapping); } diff --git a/thirdparty/metal-cpp/Metal/MTLRenderPass.hpp b/thirdparty/metal-cpp/Metal/MTLRenderPass.hpp index ed2172d73132..23c789da71bb 100644 --- a/thirdparty/metal-cpp/Metal/MTLRenderPass.hpp +++ b/thirdparty/metal-cpp/Metal/MTLRenderPass.hpp @@ -1,46 +1,23 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLRenderPass.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Buffer; + class CounterSampleBuffer; + class RasterizationRateMap; + class Texture; +} namespace MTL { -class Buffer; -class CounterSampleBuffer; -class RasterizationRateMap; -class RenderPassAttachmentDescriptor; -class RenderPassColorAttachmentDescriptor; -class RenderPassColorAttachmentDescriptorArray; -class RenderPassDepthAttachmentDescriptor; -class RenderPassDescriptor; -class RenderPassSampleBufferAttachmentDescriptor; -class RenderPassSampleBufferAttachmentDescriptorArray; -class RenderPassStencilAttachmentDescriptor; -struct SamplePosition; -class Texture; + _MTL_ENUM(NS::UInteger, LoadAction) { LoadActionDontCare = 0, LoadActionLoad = 1, @@ -56,6 +33,11 @@ _MTL_ENUM(NS::UInteger, StoreAction) { StoreActionCustomSampleDepthStore = 5, }; +_MTL_OPTIONS(NS::UInteger, StoreActionOptions) { + StoreActionOptionNone = 0, + StoreActionOptionCustomSamplePositions = 1 << 0, +}; + _MTL_ENUM(NS::Integer, VisibilityResultType) { VisibilityResultTypeReset = 0, VisibilityResultTypeAccumulate = 1, @@ -72,721 +54,652 @@ _MTL_ENUM(NS::UInteger, MultisampleStencilResolveFilter) { MultisampleStencilResolveFilterDepthResolvedSample = 1, }; -_MTL_OPTIONS(NS::UInteger, StoreActionOptions) { - StoreActionOptionNone = 0, - StoreActionOptionCustomSamplePositions = 1, - StoreActionOptionValidMask = 1, -}; - -struct ClearColor -{ - ClearColor() = default; - - ClearColor(double red, double green, double blue, double alpha); - - static ClearColor Make(double red, double green, double blue, double alpha); - double red; - double green; - double blue; - double alpha; -} _MTL_PACKED; +class RenderPassAttachmentDescriptor; +class RenderPassColorAttachmentDescriptor; +class RenderPassDepthAttachmentDescriptor; +class RenderPassStencilAttachmentDescriptor; +class RenderPassColorAttachmentDescriptorArray; +class RenderPassSampleBufferAttachmentDescriptor; +class RenderPassSampleBufferAttachmentDescriptorArray; +class RenderPassDescriptor; class RenderPassAttachmentDescriptor : public NS::Copying { public: static RenderPassAttachmentDescriptor* alloc(); + RenderPassAttachmentDescriptor* init() const; + + NS::UInteger depthPlane() const; + NS::UInteger level() const; + MTL::LoadAction loadAction() const; + NS::UInteger resolveDepthPlane() const; + NS::UInteger resolveLevel() const; + NS::UInteger resolveSlice() const; + MTL::Texture* resolveTexture() const; + void setDepthPlane(NS::UInteger depthPlane); + void setLevel(NS::UInteger level); + void setLoadAction(MTL::LoadAction loadAction); + void setResolveDepthPlane(NS::UInteger resolveDepthPlane); + void setResolveLevel(NS::UInteger resolveLevel); + void setResolveSlice(NS::UInteger resolveSlice); + void setResolveTexture(MTL::Texture* resolveTexture); + void setSlice(NS::UInteger slice); + void setStoreAction(MTL::StoreAction storeAction); + void setStoreActionOptions(MTL::StoreActionOptions storeActionOptions); + void setTexture(MTL::Texture* texture); + NS::UInteger slice() const; + MTL::StoreAction storeAction() const; + MTL::StoreActionOptions storeActionOptions() const; + MTL::Texture* texture() const; - NS::UInteger depthPlane() const; - - RenderPassAttachmentDescriptor* init(); - - NS::UInteger level() const; - - LoadAction loadAction() const; - - NS::UInteger resolveDepthPlane() const; - - NS::UInteger resolveLevel() const; - - NS::UInteger resolveSlice() const; - - Texture* resolveTexture() const; - - void setDepthPlane(NS::UInteger depthPlane); - - void setLevel(NS::UInteger level); - - void setLoadAction(MTL::LoadAction loadAction); - - void setResolveDepthPlane(NS::UInteger resolveDepthPlane); - - void setResolveLevel(NS::UInteger resolveLevel); - - void setResolveSlice(NS::UInteger resolveSlice); - - void setResolveTexture(const MTL::Texture* resolveTexture); - - void setSlice(NS::UInteger slice); - - void setStoreAction(MTL::StoreAction storeAction); - void setStoreActionOptions(MTL::StoreActionOptions storeActionOptions); - - void setTexture(const MTL::Texture* texture); - - NS::UInteger slice() const; - - StoreAction storeAction() const; - StoreActionOptions storeActionOptions() const; - - Texture* texture() const; }; -class RenderPassColorAttachmentDescriptor : public NS::Copying + +class RenderPassColorAttachmentDescriptor : public NS::Referencing { public: static RenderPassColorAttachmentDescriptor* alloc(); + RenderPassColorAttachmentDescriptor* init() const; - ClearColor clearColor() const; + MTL::ClearColor clearColor() const; + void setClearColor(MTL::ClearColor clearColor); - RenderPassColorAttachmentDescriptor* init(); - - void setClearColor(MTL::ClearColor clearColor); }; -class RenderPassDepthAttachmentDescriptor : public NS::Copying + +class RenderPassDepthAttachmentDescriptor : public NS::Referencing { public: static RenderPassDepthAttachmentDescriptor* alloc(); + RenderPassDepthAttachmentDescriptor* init() const; - double clearDepth() const; - - MultisampleDepthResolveFilter depthResolveFilter() const; - - RenderPassDepthAttachmentDescriptor* init(); + double clearDepth() const; + MTL::MultisampleDepthResolveFilter depthResolveFilter() const; + void setClearDepth(double clearDepth); + void setDepthResolveFilter(MTL::MultisampleDepthResolveFilter depthResolveFilter); - void setClearDepth(double clearDepth); - - void setDepthResolveFilter(MTL::MultisampleDepthResolveFilter depthResolveFilter); }; -class RenderPassStencilAttachmentDescriptor : public NS::Copying + +class RenderPassStencilAttachmentDescriptor : public NS::Referencing { public: static RenderPassStencilAttachmentDescriptor* alloc(); + RenderPassStencilAttachmentDescriptor* init() const; - uint32_t clearStencil() const; - - RenderPassStencilAttachmentDescriptor* init(); + uint32_t clearStencil() const; + void setClearStencil(uint32_t clearStencil); + void setStencilResolveFilter(MTL::MultisampleStencilResolveFilter stencilResolveFilter); + MTL::MultisampleStencilResolveFilter stencilResolveFilter() const; - void setClearStencil(uint32_t clearStencil); - - void setStencilResolveFilter(MTL::MultisampleStencilResolveFilter stencilResolveFilter); - MultisampleStencilResolveFilter stencilResolveFilter() const; }; + class RenderPassColorAttachmentDescriptorArray : public NS::Referencing { public: static RenderPassColorAttachmentDescriptorArray* alloc(); + RenderPassColorAttachmentDescriptorArray* init() const; - RenderPassColorAttachmentDescriptorArray* init(); + MTL::RenderPassColorAttachmentDescriptor* object(NS::UInteger attachmentIndex); + void setObject(MTL::RenderPassColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); - RenderPassColorAttachmentDescriptor* object(NS::UInteger attachmentIndex); - void setObject(const MTL::RenderPassColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); }; + class RenderPassSampleBufferAttachmentDescriptor : public NS::Copying { public: static RenderPassSampleBufferAttachmentDescriptor* alloc(); + RenderPassSampleBufferAttachmentDescriptor* init() const; + + NS::UInteger endOfFragmentSampleIndex() const; + NS::UInteger endOfVertexSampleIndex() const; + MTL::CounterSampleBuffer* sampleBuffer() const; + void setEndOfFragmentSampleIndex(NS::UInteger endOfFragmentSampleIndex); + void setEndOfVertexSampleIndex(NS::UInteger endOfVertexSampleIndex); + void setSampleBuffer(MTL::CounterSampleBuffer* sampleBuffer); + void setStartOfFragmentSampleIndex(NS::UInteger startOfFragmentSampleIndex); + void setStartOfVertexSampleIndex(NS::UInteger startOfVertexSampleIndex); + NS::UInteger startOfFragmentSampleIndex() const; + NS::UInteger startOfVertexSampleIndex() const; - NS::UInteger endOfFragmentSampleIndex() const; - - NS::UInteger endOfVertexSampleIndex() const; - - RenderPassSampleBufferAttachmentDescriptor* init(); - - CounterSampleBuffer* sampleBuffer() const; - - void setEndOfFragmentSampleIndex(NS::UInteger endOfFragmentSampleIndex); - - void setEndOfVertexSampleIndex(NS::UInteger endOfVertexSampleIndex); - - void setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer); - - void setStartOfFragmentSampleIndex(NS::UInteger startOfFragmentSampleIndex); - - void setStartOfVertexSampleIndex(NS::UInteger startOfVertexSampleIndex); - - NS::UInteger startOfFragmentSampleIndex() const; - - NS::UInteger startOfVertexSampleIndex() const; }; + class RenderPassSampleBufferAttachmentDescriptorArray : public NS::Referencing { public: static RenderPassSampleBufferAttachmentDescriptorArray* alloc(); + RenderPassSampleBufferAttachmentDescriptorArray* init() const; - RenderPassSampleBufferAttachmentDescriptorArray* init(); + MTL::RenderPassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); + void setObject(MTL::RenderPassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); - RenderPassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); - void setObject(const MTL::RenderPassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); }; + class RenderPassDescriptor : public NS::Copying { public: - static RenderPassDescriptor* alloc(); - - RenderPassColorAttachmentDescriptorArray* colorAttachments() const; - - NS::UInteger defaultRasterSampleCount() const; - - RenderPassDepthAttachmentDescriptor* depthAttachment() const; - - NS::UInteger getSamplePositions(MTL::SamplePosition* positions, NS::UInteger count); - - NS::UInteger imageblockSampleLength() const; - - RenderPassDescriptor* init(); - - RasterizationRateMap* rasterizationRateMap() const; - - static RenderPassDescriptor* renderPassDescriptor(); - - NS::UInteger renderTargetArrayLength() const; - - NS::UInteger renderTargetHeight() const; - - NS::UInteger renderTargetWidth() const; - - RenderPassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; - - void setDefaultRasterSampleCount(NS::UInteger defaultRasterSampleCount); - - void setDepthAttachment(const MTL::RenderPassDepthAttachmentDescriptor* depthAttachment); - - void setImageblockSampleLength(NS::UInteger imageblockSampleLength); + static RenderPassDescriptor* alloc(); + RenderPassDescriptor* init() const; + + static MTL::RenderPassDescriptor* renderPassDescriptor(); + + MTL::RenderPassColorAttachmentDescriptorArray* colorAttachments() const; + NS::UInteger defaultRasterSampleCount() const; + MTL::RenderPassDepthAttachmentDescriptor* depthAttachment() const; + NS::UInteger getSamplePositions(MTL::SamplePosition* positions, NS::UInteger count); + NS::UInteger imageblockSampleLength() const; + MTL::RasterizationRateMap* rasterizationRateMap() const; + NS::UInteger renderTargetArrayLength() const; + NS::UInteger renderTargetHeight() const; + NS::UInteger renderTargetWidth() const; + MTL::RenderPassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; + void setDefaultRasterSampleCount(NS::UInteger defaultRasterSampleCount); + void setDepthAttachment(MTL::RenderPassDepthAttachmentDescriptor* depthAttachment); + void setImageblockSampleLength(NS::UInteger imageblockSampleLength); + void setRasterizationRateMap(MTL::RasterizationRateMap* rasterizationRateMap); + void setRenderTargetArrayLength(NS::UInteger renderTargetArrayLength); + void setRenderTargetHeight(NS::UInteger renderTargetHeight); + void setRenderTargetWidth(NS::UInteger renderTargetWidth); + void setSamplePositions(const MTL::SamplePosition * positions, NS::UInteger count); + void setStencilAttachment(MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment); + void setSupportColorAttachmentMapping(bool supportColorAttachmentMapping); + void setThreadgroupMemoryLength(NS::UInteger threadgroupMemoryLength); + void setTileHeight(NS::UInteger tileHeight); + void setTileWidth(NS::UInteger tileWidth); + void setVisibilityResultBuffer(MTL::Buffer* visibilityResultBuffer); + void setVisibilityResultType(MTL::VisibilityResultType visibilityResultType); + MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment() const; + bool supportColorAttachmentMapping() const; + NS::UInteger threadgroupMemoryLength() const; + NS::UInteger tileHeight() const; + NS::UInteger tileWidth() const; + MTL::Buffer* visibilityResultBuffer() const; + MTL::VisibilityResultType visibilityResultType() const; - void setRasterizationRateMap(const MTL::RasterizationRateMap* rasterizationRateMap); - - void setRenderTargetArrayLength(NS::UInteger renderTargetArrayLength); - - void setRenderTargetHeight(NS::UInteger renderTargetHeight); - - void setRenderTargetWidth(NS::UInteger renderTargetWidth); - - void setSamplePositions(const MTL::SamplePosition* positions, NS::UInteger count); - - void setStencilAttachment(const MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment); - - void setSupportColorAttachmentMapping(bool supportColorAttachmentMapping); - - void setThreadgroupMemoryLength(NS::UInteger threadgroupMemoryLength); - - void setTileHeight(NS::UInteger tileHeight); - - void setTileWidth(NS::UInteger tileWidth); - - void setVisibilityResultBuffer(const MTL::Buffer* visibilityResultBuffer); - - void setVisibilityResultType(MTL::VisibilityResultType visibilityResultType); - - RenderPassStencilAttachmentDescriptor* stencilAttachment() const; - - bool supportColorAttachmentMapping() const; - - NS::UInteger threadgroupMemoryLength() const; - - NS::UInteger tileHeight() const; - - NS::UInteger tileWidth() const; - - Buffer* visibilityResultBuffer() const; - - VisibilityResultType visibilityResultType() const; }; -} -_MTL_INLINE MTL::ClearColor::ClearColor(double red, double green, double blue, double alpha) - : red(red) - , green(green) - , blue(blue) - , alpha(alpha) -{ -} +} // namespace MTL -_MTL_INLINE MTL::ClearColor MTL::ClearColor::Make(double red, double green, double blue, double alpha) -{ - return ClearColor(red, green, blue, alpha); -} +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLRenderPassAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLRenderPassColorAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLRenderPassDepthAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLRenderPassStencilAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLRenderPassColorAttachmentDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLRenderPassSampleBufferAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLRenderPassSampleBufferAttachmentDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLRenderPassDescriptor; _MTL_INLINE MTL::RenderPassAttachmentDescriptor* MTL::RenderPassAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPassAttachmentDescriptor)); + return _MTL_msg_MTL__RenderPassAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPassAttachmentDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::depthPlane() const +_MTL_INLINE MTL::RenderPassAttachmentDescriptor* MTL::RenderPassAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depthPlane)); + return _MTL_msg_MTL__RenderPassAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPassAttachmentDescriptor* MTL::RenderPassAttachmentDescriptor::init() +_MTL_INLINE MTL::Texture* MTL::RenderPassAttachmentDescriptor::texture() const { - return NS::Object::init(); + return _MTL_msg_MTL__Texturep_texture((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::level() const +_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setTexture(MTL::Texture* texture) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(level)); + _MTL_msg_v_setTexture__MTL__Texturep((const void*)this, nullptr, texture); } -_MTL_INLINE MTL::LoadAction MTL::RenderPassAttachmentDescriptor::loadAction() const +_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::level() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(loadAction)); + return _MTL_msg_NS__UInteger_level((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::resolveDepthPlane() const +_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setLevel(NS::UInteger level) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resolveDepthPlane)); + _MTL_msg_v_setLevel__NS__UInteger((const void*)this, nullptr, level); } -_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::resolveLevel() const +_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::slice() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resolveLevel)); + return _MTL_msg_NS__UInteger_slice((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::resolveSlice() const +_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setSlice(NS::UInteger slice) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resolveSlice)); + _MTL_msg_v_setSlice__NS__UInteger((const void*)this, nullptr, slice); } -_MTL_INLINE MTL::Texture* MTL::RenderPassAttachmentDescriptor::resolveTexture() const +_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::depthPlane() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resolveTexture)); + return _MTL_msg_NS__UInteger_depthPlane((const void*)this, nullptr); } _MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setDepthPlane(NS::UInteger depthPlane) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthPlane_), depthPlane); + _MTL_msg_v_setDepthPlane__NS__UInteger((const void*)this, nullptr, depthPlane); } -_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setLevel(NS::UInteger level) +_MTL_INLINE MTL::Texture* MTL::RenderPassAttachmentDescriptor::resolveTexture() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLevel_), level); + return _MTL_msg_MTL__Texturep_resolveTexture((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setLoadAction(MTL::LoadAction loadAction) +_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setResolveTexture(MTL::Texture* resolveTexture) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLoadAction_), loadAction); + _MTL_msg_v_setResolveTexture__MTL__Texturep((const void*)this, nullptr, resolveTexture); } -_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setResolveDepthPlane(NS::UInteger resolveDepthPlane) +_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::resolveLevel() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setResolveDepthPlane_), resolveDepthPlane); + return _MTL_msg_NS__UInteger_resolveLevel((const void*)this, nullptr); } _MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setResolveLevel(NS::UInteger resolveLevel) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setResolveLevel_), resolveLevel); + _MTL_msg_v_setResolveLevel__NS__UInteger((const void*)this, nullptr, resolveLevel); } -_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setResolveSlice(NS::UInteger resolveSlice) +_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::resolveSlice() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setResolveSlice_), resolveSlice); + return _MTL_msg_NS__UInteger_resolveSlice((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setResolveTexture(const MTL::Texture* resolveTexture) +_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setResolveSlice(NS::UInteger resolveSlice) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setResolveTexture_), resolveTexture); + _MTL_msg_v_setResolveSlice__NS__UInteger((const void*)this, nullptr, resolveSlice); } -_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setSlice(NS::UInteger slice) +_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::resolveDepthPlane() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSlice_), slice); + return _MTL_msg_NS__UInteger_resolveDepthPlane((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setStoreAction(MTL::StoreAction storeAction) +_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setResolveDepthPlane(NS::UInteger resolveDepthPlane) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStoreAction_), storeAction); + _MTL_msg_v_setResolveDepthPlane__NS__UInteger((const void*)this, nullptr, resolveDepthPlane); } -_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setStoreActionOptions(MTL::StoreActionOptions storeActionOptions) +_MTL_INLINE MTL::LoadAction MTL::RenderPassAttachmentDescriptor::loadAction() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStoreActionOptions_), storeActionOptions); + return _MTL_msg_MTL__LoadAction_loadAction((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setTexture(const MTL::Texture* texture) +_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setLoadAction(MTL::LoadAction loadAction) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTexture_), texture); + _MTL_msg_v_setLoadAction__MTL__LoadAction((const void*)this, nullptr, loadAction); } -_MTL_INLINE NS::UInteger MTL::RenderPassAttachmentDescriptor::slice() const +_MTL_INLINE MTL::StoreAction MTL::RenderPassAttachmentDescriptor::storeAction() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(slice)); + return _MTL_msg_MTL__StoreAction_storeAction((const void*)this, nullptr); } -_MTL_INLINE MTL::StoreAction MTL::RenderPassAttachmentDescriptor::storeAction() const +_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setStoreAction(MTL::StoreAction storeAction) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(storeAction)); + _MTL_msg_v_setStoreAction__MTL__StoreAction((const void*)this, nullptr, storeAction); } _MTL_INLINE MTL::StoreActionOptions MTL::RenderPassAttachmentDescriptor::storeActionOptions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(storeActionOptions)); + return _MTL_msg_MTL__StoreActionOptions_storeActionOptions((const void*)this, nullptr); } -_MTL_INLINE MTL::Texture* MTL::RenderPassAttachmentDescriptor::texture() const +_MTL_INLINE void MTL::RenderPassAttachmentDescriptor::setStoreActionOptions(MTL::StoreActionOptions storeActionOptions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(texture)); + _MTL_msg_v_setStoreActionOptions__MTL__StoreActionOptions((const void*)this, nullptr, storeActionOptions); } _MTL_INLINE MTL::RenderPassColorAttachmentDescriptor* MTL::RenderPassColorAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPassColorAttachmentDescriptor)); + return _MTL_msg_MTL__RenderPassColorAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPassColorAttachmentDescriptor, nullptr); } -_MTL_INLINE MTL::ClearColor MTL::RenderPassColorAttachmentDescriptor::clearColor() const +_MTL_INLINE MTL::RenderPassColorAttachmentDescriptor* MTL::RenderPassColorAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(clearColor)); + return _MTL_msg_MTL__RenderPassColorAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPassColorAttachmentDescriptor* MTL::RenderPassColorAttachmentDescriptor::init() +_MTL_INLINE MTL::ClearColor MTL::RenderPassColorAttachmentDescriptor::clearColor() const { - return NS::Object::init(); + return _MTL_msg_MTL__ClearColor_clearColor((const void*)this, nullptr); } _MTL_INLINE void MTL::RenderPassColorAttachmentDescriptor::setClearColor(MTL::ClearColor clearColor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setClearColor_), clearColor); + _MTL_msg_v_setClearColor__MTL__ClearColor((const void*)this, nullptr, clearColor); } _MTL_INLINE MTL::RenderPassDepthAttachmentDescriptor* MTL::RenderPassDepthAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPassDepthAttachmentDescriptor)); + return _MTL_msg_MTL__RenderPassDepthAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPassDepthAttachmentDescriptor, nullptr); } -_MTL_INLINE double MTL::RenderPassDepthAttachmentDescriptor::clearDepth() const +_MTL_INLINE MTL::RenderPassDepthAttachmentDescriptor* MTL::RenderPassDepthAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(clearDepth)); + return _MTL_msg_MTL__RenderPassDepthAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::MultisampleDepthResolveFilter MTL::RenderPassDepthAttachmentDescriptor::depthResolveFilter() const +_MTL_INLINE double MTL::RenderPassDepthAttachmentDescriptor::clearDepth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depthResolveFilter)); + return _MTL_msg_double_clearDepth((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPassDepthAttachmentDescriptor* MTL::RenderPassDepthAttachmentDescriptor::init() +_MTL_INLINE void MTL::RenderPassDepthAttachmentDescriptor::setClearDepth(double clearDepth) { - return NS::Object::init(); + _MTL_msg_v_setClearDepth__double((const void*)this, nullptr, clearDepth); } -_MTL_INLINE void MTL::RenderPassDepthAttachmentDescriptor::setClearDepth(double clearDepth) +_MTL_INLINE MTL::MultisampleDepthResolveFilter MTL::RenderPassDepthAttachmentDescriptor::depthResolveFilter() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setClearDepth_), clearDepth); + return _MTL_msg_MTL__MultisampleDepthResolveFilter_depthResolveFilter((const void*)this, nullptr); } _MTL_INLINE void MTL::RenderPassDepthAttachmentDescriptor::setDepthResolveFilter(MTL::MultisampleDepthResolveFilter depthResolveFilter) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthResolveFilter_), depthResolveFilter); + _MTL_msg_v_setDepthResolveFilter__MTL__MultisampleDepthResolveFilter((const void*)this, nullptr, depthResolveFilter); } _MTL_INLINE MTL::RenderPassStencilAttachmentDescriptor* MTL::RenderPassStencilAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPassStencilAttachmentDescriptor)); + return _MTL_msg_MTL__RenderPassStencilAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPassStencilAttachmentDescriptor, nullptr); } -_MTL_INLINE uint32_t MTL::RenderPassStencilAttachmentDescriptor::clearStencil() const +_MTL_INLINE MTL::RenderPassStencilAttachmentDescriptor* MTL::RenderPassStencilAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(clearStencil)); + return _MTL_msg_MTL__RenderPassStencilAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPassStencilAttachmentDescriptor* MTL::RenderPassStencilAttachmentDescriptor::init() +_MTL_INLINE uint32_t MTL::RenderPassStencilAttachmentDescriptor::clearStencil() const { - return NS::Object::init(); + return _MTL_msg_uint32_t_clearStencil((const void*)this, nullptr); } _MTL_INLINE void MTL::RenderPassStencilAttachmentDescriptor::setClearStencil(uint32_t clearStencil) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setClearStencil_), clearStencil); + _MTL_msg_v_setClearStencil__uint32_t((const void*)this, nullptr, clearStencil); } -_MTL_INLINE void MTL::RenderPassStencilAttachmentDescriptor::setStencilResolveFilter(MTL::MultisampleStencilResolveFilter stencilResolveFilter) +_MTL_INLINE MTL::MultisampleStencilResolveFilter MTL::RenderPassStencilAttachmentDescriptor::stencilResolveFilter() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilResolveFilter_), stencilResolveFilter); + return _MTL_msg_MTL__MultisampleStencilResolveFilter_stencilResolveFilter((const void*)this, nullptr); } -_MTL_INLINE MTL::MultisampleStencilResolveFilter MTL::RenderPassStencilAttachmentDescriptor::stencilResolveFilter() const +_MTL_INLINE void MTL::RenderPassStencilAttachmentDescriptor::setStencilResolveFilter(MTL::MultisampleStencilResolveFilter stencilResolveFilter) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stencilResolveFilter)); + _MTL_msg_v_setStencilResolveFilter__MTL__MultisampleStencilResolveFilter((const void*)this, nullptr, stencilResolveFilter); } _MTL_INLINE MTL::RenderPassColorAttachmentDescriptorArray* MTL::RenderPassColorAttachmentDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPassColorAttachmentDescriptorArray)); + return _MTL_msg_MTL__RenderPassColorAttachmentDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPassColorAttachmentDescriptorArray, nullptr); } -_MTL_INLINE MTL::RenderPassColorAttachmentDescriptorArray* MTL::RenderPassColorAttachmentDescriptorArray::init() +_MTL_INLINE MTL::RenderPassColorAttachmentDescriptorArray* MTL::RenderPassColorAttachmentDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__RenderPassColorAttachmentDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::RenderPassColorAttachmentDescriptor* MTL::RenderPassColorAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex); + return _MTL_msg_MTL__RenderPassColorAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, attachmentIndex); } -_MTL_INLINE void MTL::RenderPassColorAttachmentDescriptorArray::setObject(const MTL::RenderPassColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) +_MTL_INLINE void MTL::RenderPassColorAttachmentDescriptorArray::setObject(MTL::RenderPassColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__RenderPassColorAttachmentDescriptorp_NS__UInteger((const void*)this, nullptr, attachment, attachmentIndex); } _MTL_INLINE MTL::RenderPassSampleBufferAttachmentDescriptor* MTL::RenderPassSampleBufferAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPassSampleBufferAttachmentDescriptor)); + return _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPassSampleBufferAttachmentDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassSampleBufferAttachmentDescriptor::endOfFragmentSampleIndex() const +_MTL_INLINE MTL::RenderPassSampleBufferAttachmentDescriptor* MTL::RenderPassSampleBufferAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(endOfFragmentSampleIndex)); + return _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassSampleBufferAttachmentDescriptor::endOfVertexSampleIndex() const +_MTL_INLINE MTL::CounterSampleBuffer* MTL::RenderPassSampleBufferAttachmentDescriptor::sampleBuffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(endOfVertexSampleIndex)); + return _MTL_msg_MTL__CounterSampleBufferp_sampleBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPassSampleBufferAttachmentDescriptor* MTL::RenderPassSampleBufferAttachmentDescriptor::init() +_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptor::setSampleBuffer(MTL::CounterSampleBuffer* sampleBuffer) { - return NS::Object::init(); + _MTL_msg_v_setSampleBuffer__MTL__CounterSampleBufferp((const void*)this, nullptr, sampleBuffer); } -_MTL_INLINE MTL::CounterSampleBuffer* MTL::RenderPassSampleBufferAttachmentDescriptor::sampleBuffer() const +_MTL_INLINE NS::UInteger MTL::RenderPassSampleBufferAttachmentDescriptor::startOfVertexSampleIndex() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleBuffer)); + return _MTL_msg_NS__UInteger_startOfVertexSampleIndex((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptor::setEndOfFragmentSampleIndex(NS::UInteger endOfFragmentSampleIndex) +_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptor::setStartOfVertexSampleIndex(NS::UInteger startOfVertexSampleIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setEndOfFragmentSampleIndex_), endOfFragmentSampleIndex); + _MTL_msg_v_setStartOfVertexSampleIndex__NS__UInteger((const void*)this, nullptr, startOfVertexSampleIndex); } -_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptor::setEndOfVertexSampleIndex(NS::UInteger endOfVertexSampleIndex) +_MTL_INLINE NS::UInteger MTL::RenderPassSampleBufferAttachmentDescriptor::endOfVertexSampleIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setEndOfVertexSampleIndex_), endOfVertexSampleIndex); + return _MTL_msg_NS__UInteger_endOfVertexSampleIndex((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptor::setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer) +_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptor::setEndOfVertexSampleIndex(NS::UInteger endOfVertexSampleIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSampleBuffer_), sampleBuffer); + _MTL_msg_v_setEndOfVertexSampleIndex__NS__UInteger((const void*)this, nullptr, endOfVertexSampleIndex); } -_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptor::setStartOfFragmentSampleIndex(NS::UInteger startOfFragmentSampleIndex) +_MTL_INLINE NS::UInteger MTL::RenderPassSampleBufferAttachmentDescriptor::startOfFragmentSampleIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStartOfFragmentSampleIndex_), startOfFragmentSampleIndex); + return _MTL_msg_NS__UInteger_startOfFragmentSampleIndex((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptor::setStartOfVertexSampleIndex(NS::UInteger startOfVertexSampleIndex) +_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptor::setStartOfFragmentSampleIndex(NS::UInteger startOfFragmentSampleIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStartOfVertexSampleIndex_), startOfVertexSampleIndex); + _MTL_msg_v_setStartOfFragmentSampleIndex__NS__UInteger((const void*)this, nullptr, startOfFragmentSampleIndex); } -_MTL_INLINE NS::UInteger MTL::RenderPassSampleBufferAttachmentDescriptor::startOfFragmentSampleIndex() const +_MTL_INLINE NS::UInteger MTL::RenderPassSampleBufferAttachmentDescriptor::endOfFragmentSampleIndex() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(startOfFragmentSampleIndex)); + return _MTL_msg_NS__UInteger_endOfFragmentSampleIndex((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassSampleBufferAttachmentDescriptor::startOfVertexSampleIndex() const +_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptor::setEndOfFragmentSampleIndex(NS::UInteger endOfFragmentSampleIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(startOfVertexSampleIndex)); + _MTL_msg_v_setEndOfFragmentSampleIndex__NS__UInteger((const void*)this, nullptr, endOfFragmentSampleIndex); } _MTL_INLINE MTL::RenderPassSampleBufferAttachmentDescriptorArray* MTL::RenderPassSampleBufferAttachmentDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPassSampleBufferAttachmentDescriptorArray)); + return _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPassSampleBufferAttachmentDescriptorArray, nullptr); } -_MTL_INLINE MTL::RenderPassSampleBufferAttachmentDescriptorArray* MTL::RenderPassSampleBufferAttachmentDescriptorArray::init() +_MTL_INLINE MTL::RenderPassSampleBufferAttachmentDescriptorArray* MTL::RenderPassSampleBufferAttachmentDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::RenderPassSampleBufferAttachmentDescriptor* MTL::RenderPassSampleBufferAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex); + return _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, attachmentIndex); } -_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptorArray::setObject(const MTL::RenderPassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) +_MTL_INLINE void MTL::RenderPassSampleBufferAttachmentDescriptorArray::setObject(MTL::RenderPassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__RenderPassSampleBufferAttachmentDescriptorp_NS__UInteger((const void*)this, nullptr, attachment, attachmentIndex); } _MTL_INLINE MTL::RenderPassDescriptor* MTL::RenderPassDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPassDescriptor)); + return _MTL_msg_MTL__RenderPassDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPassDescriptor, nullptr); } -_MTL_INLINE MTL::RenderPassColorAttachmentDescriptorArray* MTL::RenderPassDescriptor::colorAttachments() const +_MTL_INLINE MTL::RenderPassDescriptor* MTL::RenderPassDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(colorAttachments)); + return _MTL_msg_MTL__RenderPassDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::defaultRasterSampleCount() const +_MTL_INLINE MTL::RenderPassDescriptor* MTL::RenderPassDescriptor::renderPassDescriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(defaultRasterSampleCount)); + return _MTL_msg_MTL__RenderPassDescriptorp_renderPassDescriptor((const void*)&OBJC_CLASS_$_MTLRenderPassDescriptor, nullptr); } -_MTL_INLINE MTL::RenderPassDepthAttachmentDescriptor* MTL::RenderPassDescriptor::depthAttachment() const +_MTL_INLINE MTL::RenderPassColorAttachmentDescriptorArray* MTL::RenderPassDescriptor::colorAttachments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depthAttachment)); + return _MTL_msg_MTL__RenderPassColorAttachmentDescriptorArrayp_colorAttachments((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::getSamplePositions(MTL::SamplePosition* positions, NS::UInteger count) +_MTL_INLINE MTL::RenderPassDepthAttachmentDescriptor* MTL::RenderPassDescriptor::depthAttachment() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(getSamplePositions_count_), positions, count); + return _MTL_msg_MTL__RenderPassDepthAttachmentDescriptorp_depthAttachment((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::imageblockSampleLength() const +_MTL_INLINE void MTL::RenderPassDescriptor::setDepthAttachment(MTL::RenderPassDepthAttachmentDescriptor* depthAttachment) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(imageblockSampleLength)); + _MTL_msg_v_setDepthAttachment__MTL__RenderPassDepthAttachmentDescriptorp((const void*)this, nullptr, depthAttachment); } -_MTL_INLINE MTL::RenderPassDescriptor* MTL::RenderPassDescriptor::init() +_MTL_INLINE MTL::RenderPassStencilAttachmentDescriptor* MTL::RenderPassDescriptor::stencilAttachment() const { - return NS::Object::init(); + return _MTL_msg_MTL__RenderPassStencilAttachmentDescriptorp_stencilAttachment((const void*)this, nullptr); } -_MTL_INLINE MTL::RasterizationRateMap* MTL::RenderPassDescriptor::rasterizationRateMap() const +_MTL_INLINE void MTL::RenderPassDescriptor::setStencilAttachment(MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rasterizationRateMap)); + _MTL_msg_v_setStencilAttachment__MTL__RenderPassStencilAttachmentDescriptorp((const void*)this, nullptr, stencilAttachment); } -_MTL_INLINE MTL::RenderPassDescriptor* MTL::RenderPassDescriptor::renderPassDescriptor() +_MTL_INLINE MTL::Buffer* MTL::RenderPassDescriptor::visibilityResultBuffer() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLRenderPassDescriptor), _MTL_PRIVATE_SEL(renderPassDescriptor)); + return _MTL_msg_MTL__Bufferp_visibilityResultBuffer((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::renderTargetArrayLength() const +_MTL_INLINE void MTL::RenderPassDescriptor::setVisibilityResultBuffer(MTL::Buffer* visibilityResultBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(renderTargetArrayLength)); + _MTL_msg_v_setVisibilityResultBuffer__MTL__Bufferp((const void*)this, nullptr, visibilityResultBuffer); } -_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::renderTargetHeight() const +_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::renderTargetArrayLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(renderTargetHeight)); + return _MTL_msg_NS__UInteger_renderTargetArrayLength((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::renderTargetWidth() const +_MTL_INLINE void MTL::RenderPassDescriptor::setRenderTargetArrayLength(NS::UInteger renderTargetArrayLength) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(renderTargetWidth)); + _MTL_msg_v_setRenderTargetArrayLength__NS__UInteger((const void*)this, nullptr, renderTargetArrayLength); } -_MTL_INLINE MTL::RenderPassSampleBufferAttachmentDescriptorArray* MTL::RenderPassDescriptor::sampleBufferAttachments() const +_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::imageblockSampleLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleBufferAttachments)); + return _MTL_msg_NS__UInteger_imageblockSampleLength((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassDescriptor::setDefaultRasterSampleCount(NS::UInteger defaultRasterSampleCount) +_MTL_INLINE void MTL::RenderPassDescriptor::setImageblockSampleLength(NS::UInteger imageblockSampleLength) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDefaultRasterSampleCount_), defaultRasterSampleCount); + _MTL_msg_v_setImageblockSampleLength__NS__UInteger((const void*)this, nullptr, imageblockSampleLength); } -_MTL_INLINE void MTL::RenderPassDescriptor::setDepthAttachment(const MTL::RenderPassDepthAttachmentDescriptor* depthAttachment) +_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::threadgroupMemoryLength() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthAttachment_), depthAttachment); + return _MTL_msg_NS__UInteger_threadgroupMemoryLength((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassDescriptor::setImageblockSampleLength(NS::UInteger imageblockSampleLength) +_MTL_INLINE void MTL::RenderPassDescriptor::setThreadgroupMemoryLength(NS::UInteger threadgroupMemoryLength) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setImageblockSampleLength_), imageblockSampleLength); + _MTL_msg_v_setThreadgroupMemoryLength__NS__UInteger((const void*)this, nullptr, threadgroupMemoryLength); } -_MTL_INLINE void MTL::RenderPassDescriptor::setRasterizationRateMap(const MTL::RasterizationRateMap* rasterizationRateMap) +_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::tileWidth() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterizationRateMap_), rasterizationRateMap); + return _MTL_msg_NS__UInteger_tileWidth((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassDescriptor::setRenderTargetArrayLength(NS::UInteger renderTargetArrayLength) +_MTL_INLINE void MTL::RenderPassDescriptor::setTileWidth(NS::UInteger tileWidth) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderTargetArrayLength_), renderTargetArrayLength); + _MTL_msg_v_setTileWidth__NS__UInteger((const void*)this, nullptr, tileWidth); } -_MTL_INLINE void MTL::RenderPassDescriptor::setRenderTargetHeight(NS::UInteger renderTargetHeight) +_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::tileHeight() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderTargetHeight_), renderTargetHeight); + return _MTL_msg_NS__UInteger_tileHeight((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassDescriptor::setRenderTargetWidth(NS::UInteger renderTargetWidth) +_MTL_INLINE void MTL::RenderPassDescriptor::setTileHeight(NS::UInteger tileHeight) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRenderTargetWidth_), renderTargetWidth); + _MTL_msg_v_setTileHeight__NS__UInteger((const void*)this, nullptr, tileHeight); } -_MTL_INLINE void MTL::RenderPassDescriptor::setSamplePositions(const MTL::SamplePosition* positions, NS::UInteger count) +_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::defaultRasterSampleCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSamplePositions_count_), positions, count); + return _MTL_msg_NS__UInteger_defaultRasterSampleCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassDescriptor::setStencilAttachment(const MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment) +_MTL_INLINE void MTL::RenderPassDescriptor::setDefaultRasterSampleCount(NS::UInteger defaultRasterSampleCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilAttachment_), stencilAttachment); + _MTL_msg_v_setDefaultRasterSampleCount__NS__UInteger((const void*)this, nullptr, defaultRasterSampleCount); } -_MTL_INLINE void MTL::RenderPassDescriptor::setSupportColorAttachmentMapping(bool supportColorAttachmentMapping) +_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::renderTargetWidth() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportColorAttachmentMapping_), supportColorAttachmentMapping); + return _MTL_msg_NS__UInteger_renderTargetWidth((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassDescriptor::setThreadgroupMemoryLength(NS::UInteger threadgroupMemoryLength) +_MTL_INLINE void MTL::RenderPassDescriptor::setRenderTargetWidth(NS::UInteger renderTargetWidth) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadgroupMemoryLength_), threadgroupMemoryLength); + _MTL_msg_v_setRenderTargetWidth__NS__UInteger((const void*)this, nullptr, renderTargetWidth); } -_MTL_INLINE void MTL::RenderPassDescriptor::setTileHeight(NS::UInteger tileHeight) +_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::renderTargetHeight() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileHeight_), tileHeight); + return _MTL_msg_NS__UInteger_renderTargetHeight((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassDescriptor::setTileWidth(NS::UInteger tileWidth) +_MTL_INLINE void MTL::RenderPassDescriptor::setRenderTargetHeight(NS::UInteger renderTargetHeight) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileWidth_), tileWidth); + _MTL_msg_v_setRenderTargetHeight__NS__UInteger((const void*)this, nullptr, renderTargetHeight); } -_MTL_INLINE void MTL::RenderPassDescriptor::setVisibilityResultBuffer(const MTL::Buffer* visibilityResultBuffer) +_MTL_INLINE MTL::RasterizationRateMap* MTL::RenderPassDescriptor::rasterizationRateMap() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibilityResultBuffer_), visibilityResultBuffer); + return _MTL_msg_MTL__RasterizationRateMapp_rasterizationRateMap((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPassDescriptor::setVisibilityResultType(MTL::VisibilityResultType visibilityResultType) +_MTL_INLINE void MTL::RenderPassDescriptor::setRasterizationRateMap(MTL::RasterizationRateMap* rasterizationRateMap) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibilityResultType_), visibilityResultType); + _MTL_msg_v_setRasterizationRateMap__MTL__RasterizationRateMapp((const void*)this, nullptr, rasterizationRateMap); } -_MTL_INLINE MTL::RenderPassStencilAttachmentDescriptor* MTL::RenderPassDescriptor::stencilAttachment() const +_MTL_INLINE MTL::RenderPassSampleBufferAttachmentDescriptorArray* MTL::RenderPassDescriptor::sampleBufferAttachments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stencilAttachment)); + return _MTL_msg_MTL__RenderPassSampleBufferAttachmentDescriptorArrayp_sampleBufferAttachments((const void*)this, nullptr); } -_MTL_INLINE bool MTL::RenderPassDescriptor::supportColorAttachmentMapping() const +_MTL_INLINE MTL::VisibilityResultType MTL::RenderPassDescriptor::visibilityResultType() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportColorAttachmentMapping)); + return _MTL_msg_MTL__VisibilityResultType_visibilityResultType((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::threadgroupMemoryLength() const +_MTL_INLINE void MTL::RenderPassDescriptor::setVisibilityResultType(MTL::VisibilityResultType visibilityResultType) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadgroupMemoryLength)); + _MTL_msg_v_setVisibilityResultType__MTL__VisibilityResultType((const void*)this, nullptr, visibilityResultType); } -_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::tileHeight() const +_MTL_INLINE bool MTL::RenderPassDescriptor::supportColorAttachmentMapping() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileHeight)); + return _MTL_msg_bool_supportColorAttachmentMapping((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::tileWidth() const +_MTL_INLINE void MTL::RenderPassDescriptor::setSupportColorAttachmentMapping(bool supportColorAttachmentMapping) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileWidth)); + _MTL_msg_v_setSupportColorAttachmentMapping__bool((const void*)this, nullptr, supportColorAttachmentMapping); } -_MTL_INLINE MTL::Buffer* MTL::RenderPassDescriptor::visibilityResultBuffer() const +_MTL_INLINE void MTL::RenderPassDescriptor::setSamplePositions(const MTL::SamplePosition * positions, NS::UInteger count) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(visibilityResultBuffer)); + _MTL_msg_v_setSamplePositions_count__constMTL__SamplePositionp_NS__UInteger((const void*)this, nullptr, positions, count); } -_MTL_INLINE MTL::VisibilityResultType MTL::RenderPassDescriptor::visibilityResultType() const +_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::getSamplePositions(MTL::SamplePosition* positions, NS::UInteger count) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(visibilityResultType)); + return _MTL_msg_NS__UInteger_getSamplePositions_count__MTL__SamplePositionp_NS__UInteger((const void*)this, nullptr, positions, count); } diff --git a/thirdparty/metal-cpp/Metal/MTLRenderPipeline.hpp b/thirdparty/metal-cpp/Metal/MTLRenderPipeline.hpp index aaa9cdad67b6..1841f79df3cf 100644 --- a/thirdparty/metal-cpp/Metal/MTLRenderPipeline.hpp +++ b/thirdparty/metal-cpp/Metal/MTLRenderPipeline.hpp @@ -1,69 +1,44 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLRenderPipeline.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLAllocation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPipeline.hpp" -#include "MTLPixelFormat.hpp" -#include "MTLPrivate.hpp" -#include "MTLRenderCommandEncoder.hpp" -#include "MTLTypes.hpp" - -namespace MTL -{ -class Device; -class Function; -class FunctionHandle; -class IntersectionFunctionTable; -class IntersectionFunctionTableDescriptor; -class LinkedFunctions; -class LogicalToPhysicalColorAttachmentMap; -class MeshRenderPipelineDescriptor; -class PipelineBufferDescriptorArray; -class RenderPipelineColorAttachmentDescriptor; -class RenderPipelineColorAttachmentDescriptorArray; -class RenderPipelineDescriptor; -class RenderPipelineFunctionsDescriptor; -class RenderPipelineReflection; -class RenderPipelineState; -class TileRenderPipelineColorAttachmentDescriptor; -class TileRenderPipelineColorAttachmentDescriptorArray; -class TileRenderPipelineDescriptor; -class VertexDescriptor; -class VisibleFunctionTable; -class VisibleFunctionTableDescriptor; +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLAllocation.hpp" +namespace MTL { + class Device; + class Function; + class FunctionHandle; + class IntersectionFunctionTable; + class IntersectionFunctionTableDescriptor; + class LinkedFunctions; + class PipelineBufferDescriptorArray; + class VertexDescriptor; + class VisibleFunctionTable; + class VisibleFunctionTableDescriptor; + enum PixelFormat : NS::UInteger; + using RenderStages = NS::UInteger; + enum ShaderValidation : NS::Integer; + enum Winding : NS::UInteger; +} +namespace MTL4 { + class BinaryFunction; + class PipelineDescriptor; + class RenderPipelineBinaryFunctionsDescriptor; +} +namespace NS { + class Array; + class Error; + class String; } -namespace MTL4 -{ -class BinaryFunction; -class PipelineDescriptor; -class RenderPipelineBinaryFunctionsDescriptor; -} namespace MTL { + _MTL_ENUM(NS::UInteger, BlendFactor) { BlendFactorZero = 0, BlendFactorOne = 1, @@ -96,6 +71,16 @@ _MTL_ENUM(NS::UInteger, BlendOperation) { BlendOperationUnspecialized = 5, }; +_MTL_OPTIONS(NS::UInteger, ColorWriteMask) { + ColorWriteMaskNone = 0, + ColorWriteMaskRed = 0x1 << 3, + ColorWriteMaskGreen = 0x1 << 2, + ColorWriteMaskBlue = 0x1 << 1, + ColorWriteMaskAlpha = 0x1 << 0, + ColorWriteMaskAll = 0xf, + ColorWriteMaskUnspecialized = 0x10, +}; + _MTL_ENUM(NS::UInteger, PrimitiveTopologyClass) { PrimitiveTopologyClassUnspecified = 0, PrimitiveTopologyClassPoint = 1, @@ -127,1750 +112,1565 @@ _MTL_ENUM(NS::UInteger, TessellationControlPointIndexType) { TessellationControlPointIndexTypeUInt32 = 2, }; -_MTL_OPTIONS(NS::UInteger, ColorWriteMask) { - ColorWriteMaskNone = 0, - ColorWriteMaskRed = 1 << 3, - ColorWriteMaskGreen = 1 << 2, - ColorWriteMaskBlue = 1 << 1, - ColorWriteMaskAlpha = 1, - ColorWriteMaskAll = 15, - ColorWriteMaskUnspecialized = 1 << 4, -}; + +class RenderPipelineColorAttachmentDescriptor; +class LogicalToPhysicalColorAttachmentMap; +class RenderPipelineReflection; +class RenderPipelineDescriptor; +class RenderPipelineFunctionsDescriptor; +class RenderPipelineState; +class RenderPipelineColorAttachmentDescriptorArray; +class TileRenderPipelineColorAttachmentDescriptor; +class TileRenderPipelineColorAttachmentDescriptorArray; +class TileRenderPipelineDescriptor; +class MeshRenderPipelineDescriptor; class RenderPipelineColorAttachmentDescriptor : public NS::Copying { public: static RenderPipelineColorAttachmentDescriptor* alloc(); + RenderPipelineColorAttachmentDescriptor* init() const; + + MTL::BlendOperation alphaBlendOperation() const; + bool blendingEnabled() const; + MTL::BlendFactor destinationAlphaBlendFactor() const; + MTL::BlendFactor destinationRGBBlendFactor() const; + bool isBlendingEnabled(); + MTL::PixelFormat pixelFormat() const; + MTL::BlendOperation rgbBlendOperation() const; + void setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation); + void setBlendingEnabled(bool blendingEnabled); + void setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor); + void setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor); + void setPixelFormat(MTL::PixelFormat pixelFormat); + void setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation); + void setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor); + void setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor); + void setWriteMask(MTL::ColorWriteMask writeMask); + MTL::BlendFactor sourceAlphaBlendFactor() const; + MTL::BlendFactor sourceRGBBlendFactor() const; + MTL::ColorWriteMask writeMask() const; - BlendOperation alphaBlendOperation() const; - - [[deprecated("please use isBlendingEnabled instead")]] - bool blendingEnabled() const; - - BlendFactor destinationAlphaBlendFactor() const; - - BlendFactor destinationRGBBlendFactor() const; - - RenderPipelineColorAttachmentDescriptor* init(); - - bool isBlendingEnabled() const; - - PixelFormat pixelFormat() const; - - BlendOperation rgbBlendOperation() const; - - void setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation); - - void setBlendingEnabled(bool blendingEnabled); - - void setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor); - - void setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor); - - void setPixelFormat(MTL::PixelFormat pixelFormat); - - void setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation); - - void setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor); - - void setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor); - - void setWriteMask(MTL::ColorWriteMask writeMask); - - BlendFactor sourceAlphaBlendFactor() const; - - BlendFactor sourceRGBBlendFactor() const; - - ColorWriteMask writeMask() const; }; + class LogicalToPhysicalColorAttachmentMap : public NS::Copying { public: static LogicalToPhysicalColorAttachmentMap* alloc(); + LogicalToPhysicalColorAttachmentMap* init() const; - NS::UInteger getPhysicalIndex(NS::UInteger logicalIndex); - - LogicalToPhysicalColorAttachmentMap* init(); + NS::UInteger getPhysicalIndex(NS::UInteger logicalIndex); + void reset(); + void setPhysicalIndex(NS::UInteger physicalIndex, NS::UInteger logicalIndex); - void reset(); - - void setPhysicalIndex(NS::UInteger physicalIndex, NS::UInteger logicalIndex); }; + class RenderPipelineReflection : public NS::Referencing { public: static RenderPipelineReflection* alloc(); + RenderPipelineReflection* init() const; - NS::Array* fragmentArguments() const; - - NS::Array* fragmentBindings() const; - - RenderPipelineReflection* init(); - - NS::Array* meshBindings() const; + NS::Array* fragmentArguments() const; + NS::Array* fragmentBindings() const; + NS::Array* meshBindings() const; + NS::Array* objectBindings() const; + NS::Array* tileArguments() const; + NS::Array* tileBindings() const; + NS::Array* vertexArguments() const; + NS::Array* vertexBindings() const; - NS::Array* objectBindings() const; - - NS::Array* tileArguments() const; - - NS::Array* tileBindings() const; - - NS::Array* vertexArguments() const; - - NS::Array* vertexBindings() const; }; + class RenderPipelineDescriptor : public NS::Copying { public: static RenderPipelineDescriptor* alloc(); + RenderPipelineDescriptor* init() const; + + bool alphaToCoverageEnabled() const; + bool alphaToOneEnabled() const; + NS::Array* binaryArchives() const; + MTL::RenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; + MTL::PixelFormat depthAttachmentPixelFormat() const; + MTL::PipelineBufferDescriptorArray* fragmentBuffers() const; + MTL::Function* fragmentFunction() const; + MTL::LinkedFunctions* fragmentLinkedFunctions() const; + NS::Array* fragmentPreloadedLibraries() const; + MTL::PrimitiveTopologyClass inputPrimitiveTopology() const; + bool isAlphaToCoverageEnabled(); + bool isAlphaToOneEnabled(); + bool isRasterizationEnabled(); + bool isTessellationFactorScaleEnabled(); + NS::String* label() const; + NS::UInteger maxFragmentCallStackDepth() const; + NS::UInteger maxTessellationFactor() const; + NS::UInteger maxVertexAmplificationCount() const; + NS::UInteger maxVertexCallStackDepth() const; + NS::UInteger rasterSampleCount() const; + bool rasterizationEnabled() const; + void reset(); + NS::UInteger sampleCount() const; + void setAlphaToCoverageEnabled(bool alphaToCoverageEnabled); + void setAlphaToOneEnabled(bool alphaToOneEnabled); + void setBinaryArchives(NS::Array* binaryArchives); + void setDepthAttachmentPixelFormat(MTL::PixelFormat depthAttachmentPixelFormat); + void setFragmentFunction(MTL::Function* fragmentFunction); + void setFragmentLinkedFunctions(MTL::LinkedFunctions* fragmentLinkedFunctions); + void setFragmentPreloadedLibraries(NS::Array* fragmentPreloadedLibraries); + void setInputPrimitiveTopology(MTL::PrimitiveTopologyClass inputPrimitiveTopology); + void setLabel(NS::String* label); + void setMaxFragmentCallStackDepth(NS::UInteger maxFragmentCallStackDepth); + void setMaxTessellationFactor(NS::UInteger maxTessellationFactor); + void setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount); + void setMaxVertexCallStackDepth(NS::UInteger maxVertexCallStackDepth); + void setRasterSampleCount(NS::UInteger rasterSampleCount); + void setRasterizationEnabled(bool rasterizationEnabled); + void setSampleCount(NS::UInteger sampleCount); + void setShaderValidation(MTL::ShaderValidation shaderValidation); + void setStencilAttachmentPixelFormat(MTL::PixelFormat stencilAttachmentPixelFormat); + void setSupportAddingFragmentBinaryFunctions(bool supportAddingFragmentBinaryFunctions); + void setSupportAddingVertexBinaryFunctions(bool supportAddingVertexBinaryFunctions); + void setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers); + void setTessellationControlPointIndexType(MTL::TessellationControlPointIndexType tessellationControlPointIndexType); + void setTessellationFactorFormat(MTL::TessellationFactorFormat tessellationFactorFormat); + void setTessellationFactorScaleEnabled(bool tessellationFactorScaleEnabled); + void setTessellationFactorStepFunction(MTL::TessellationFactorStepFunction tessellationFactorStepFunction); + void setTessellationOutputWindingOrder(MTL::Winding tessellationOutputWindingOrder); + void setTessellationPartitionMode(MTL::TessellationPartitionMode tessellationPartitionMode); + void setVertexDescriptor(MTL::VertexDescriptor* vertexDescriptor); + void setVertexFunction(MTL::Function* vertexFunction); + void setVertexLinkedFunctions(MTL::LinkedFunctions* vertexLinkedFunctions); + void setVertexPreloadedLibraries(NS::Array* vertexPreloadedLibraries); + MTL::ShaderValidation shaderValidation() const; + MTL::PixelFormat stencilAttachmentPixelFormat() const; + bool supportAddingFragmentBinaryFunctions() const; + bool supportAddingVertexBinaryFunctions() const; + bool supportIndirectCommandBuffers() const; + MTL::TessellationControlPointIndexType tessellationControlPointIndexType() const; + MTL::TessellationFactorFormat tessellationFactorFormat() const; + bool tessellationFactorScaleEnabled() const; + MTL::TessellationFactorStepFunction tessellationFactorStepFunction() const; + MTL::Winding tessellationOutputWindingOrder() const; + MTL::TessellationPartitionMode tessellationPartitionMode() const; + MTL::PipelineBufferDescriptorArray* vertexBuffers() const; + MTL::VertexDescriptor* vertexDescriptor() const; + MTL::Function* vertexFunction() const; + MTL::LinkedFunctions* vertexLinkedFunctions() const; + NS::Array* vertexPreloadedLibraries() const; - [[deprecated("please use isAlphaToCoverageEnabled instead")]] - bool alphaToCoverageEnabled() const; - - [[deprecated("please use isAlphaToOneEnabled instead")]] - bool alphaToOneEnabled() const; - - NS::Array* binaryArchives() const; - - RenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; - - PixelFormat depthAttachmentPixelFormat() const; - - PipelineBufferDescriptorArray* fragmentBuffers() const; - - Function* fragmentFunction() const; - - LinkedFunctions* fragmentLinkedFunctions() const; - - NS::Array* fragmentPreloadedLibraries() const; - - RenderPipelineDescriptor* init(); - - PrimitiveTopologyClass inputPrimitiveTopology() const; - - bool isAlphaToCoverageEnabled() const; - - bool isAlphaToOneEnabled() const; - - bool isRasterizationEnabled() const; - - bool isTessellationFactorScaleEnabled() const; - - NS::String* label() const; - - NS::UInteger maxFragmentCallStackDepth() const; - - NS::UInteger maxTessellationFactor() const; - - NS::UInteger maxVertexAmplificationCount() const; - - NS::UInteger maxVertexCallStackDepth() const; - - NS::UInteger rasterSampleCount() const; - - [[deprecated("please use isRasterizationEnabled instead")]] - bool rasterizationEnabled() const; - - void reset(); - - NS::UInteger sampleCount() const; - - void setAlphaToCoverageEnabled(bool alphaToCoverageEnabled); - - void setAlphaToOneEnabled(bool alphaToOneEnabled); - - void setBinaryArchives(const NS::Array* binaryArchives); - - void setDepthAttachmentPixelFormat(MTL::PixelFormat depthAttachmentPixelFormat); - - void setFragmentFunction(const MTL::Function* fragmentFunction); - - void setFragmentLinkedFunctions(const MTL::LinkedFunctions* fragmentLinkedFunctions); - - void setFragmentPreloadedLibraries(const NS::Array* fragmentPreloadedLibraries); - - void setInputPrimitiveTopology(MTL::PrimitiveTopologyClass inputPrimitiveTopology); - - void setLabel(const NS::String* label); - - void setMaxFragmentCallStackDepth(NS::UInteger maxFragmentCallStackDepth); - - void setMaxTessellationFactor(NS::UInteger maxTessellationFactor); - - void setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount); - - void setMaxVertexCallStackDepth(NS::UInteger maxVertexCallStackDepth); - - void setRasterSampleCount(NS::UInteger rasterSampleCount); - - void setRasterizationEnabled(bool rasterizationEnabled); - - void setSampleCount(NS::UInteger sampleCount); - - void setShaderValidation(MTL::ShaderValidation shaderValidation); - - void setStencilAttachmentPixelFormat(MTL::PixelFormat stencilAttachmentPixelFormat); - - void setSupportAddingFragmentBinaryFunctions(bool supportAddingFragmentBinaryFunctions); - - void setSupportAddingVertexBinaryFunctions(bool supportAddingVertexBinaryFunctions); - - void setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers); - - void setTessellationControlPointIndexType(MTL::TessellationControlPointIndexType tessellationControlPointIndexType); - - void setTessellationFactorFormat(MTL::TessellationFactorFormat tessellationFactorFormat); - - void setTessellationFactorScaleEnabled(bool tessellationFactorScaleEnabled); - - void setTessellationFactorStepFunction(MTL::TessellationFactorStepFunction tessellationFactorStepFunction); - - void setTessellationOutputWindingOrder(MTL::Winding tessellationOutputWindingOrder); - - void setTessellationPartitionMode(MTL::TessellationPartitionMode tessellationPartitionMode); - - void setVertexDescriptor(const MTL::VertexDescriptor* vertexDescriptor); - - void setVertexFunction(const MTL::Function* vertexFunction); - - void setVertexLinkedFunctions(const MTL::LinkedFunctions* vertexLinkedFunctions); - - void setVertexPreloadedLibraries(const NS::Array* vertexPreloadedLibraries); - - ShaderValidation shaderValidation() const; - - PixelFormat stencilAttachmentPixelFormat() const; - - bool supportAddingFragmentBinaryFunctions() const; - - bool supportAddingVertexBinaryFunctions() const; - - bool supportIndirectCommandBuffers() const; - - TessellationControlPointIndexType tessellationControlPointIndexType() const; - - TessellationFactorFormat tessellationFactorFormat() const; - - [[deprecated("please use isTessellationFactorScaleEnabled instead")]] - bool tessellationFactorScaleEnabled() const; - - TessellationFactorStepFunction tessellationFactorStepFunction() const; - - Winding tessellationOutputWindingOrder() const; - - TessellationPartitionMode tessellationPartitionMode() const; - - PipelineBufferDescriptorArray* vertexBuffers() const; - - VertexDescriptor* vertexDescriptor() const; - - Function* vertexFunction() const; - - LinkedFunctions* vertexLinkedFunctions() const; - - NS::Array* vertexPreloadedLibraries() const; }; + class RenderPipelineFunctionsDescriptor : public NS::Copying { public: static RenderPipelineFunctionsDescriptor* alloc(); + RenderPipelineFunctionsDescriptor* init() const; - NS::Array* fragmentAdditionalBinaryFunctions() const; - - RenderPipelineFunctionsDescriptor* init(); - - void setFragmentAdditionalBinaryFunctions(const NS::Array* fragmentAdditionalBinaryFunctions); - - void setTileAdditionalBinaryFunctions(const NS::Array* tileAdditionalBinaryFunctions); - - void setVertexAdditionalBinaryFunctions(const NS::Array* vertexAdditionalBinaryFunctions); + NS::Array* fragmentAdditionalBinaryFunctions() const; + void setFragmentAdditionalBinaryFunctions(NS::Array* fragmentAdditionalBinaryFunctions); + void setTileAdditionalBinaryFunctions(NS::Array* tileAdditionalBinaryFunctions); + void setVertexAdditionalBinaryFunctions(NS::Array* vertexAdditionalBinaryFunctions); + NS::Array* tileAdditionalBinaryFunctions() const; + NS::Array* vertexAdditionalBinaryFunctions() const; - NS::Array* tileAdditionalBinaryFunctions() const; - - NS::Array* vertexAdditionalBinaryFunctions() const; }; -class RenderPipelineState : public NS::Referencing + +class RenderPipelineState : public NS::Referencing { public: - Device* device() const; - - FunctionHandle* functionHandle(const NS::String* name, MTL::RenderStages stage); - FunctionHandle* functionHandle(const MTL4::BinaryFunction* function, MTL::RenderStages stage); - FunctionHandle* functionHandle(const MTL::Function* function, MTL::RenderStages stage); - - ResourceID gpuResourceID() const; - - NS::UInteger imageblockMemoryLength(MTL::Size imageblockDimensions); + MTL::Device* device() const; + MTL::FunctionHandle* functionHandle(NS::String* name, MTL::RenderStages stage); + MTL::FunctionHandle* functionHandle(MTL4::BinaryFunction* function, MTL::RenderStages stage); + MTL::FunctionHandle* functionHandle(MTL::Function* function, MTL::RenderStages stage); + MTL::ResourceID gpuResourceID() const; + NS::UInteger imageblockMemoryLength(MTL::Size imageblockDimensions); + NS::UInteger imageblockSampleLength() const; + NS::String* label() const; + NS::UInteger maxTotalThreadgroupsPerMeshGrid() const; + NS::UInteger maxTotalThreadsPerMeshThreadgroup() const; + NS::UInteger maxTotalThreadsPerObjectThreadgroup() const; + NS::UInteger maxTotalThreadsPerThreadgroup() const; + NS::UInteger meshThreadExecutionWidth() const; + MTL::IntersectionFunctionTable* newIntersectionFunctionTable(MTL::IntersectionFunctionTableDescriptor* descriptor, MTL::RenderStages stage); + MTL4::PipelineDescriptor* newRenderPipelineDescriptorForSpecialization(); + MTL::RenderPipelineState* newRenderPipelineState(MTL4::RenderPipelineBinaryFunctionsDescriptor* binaryFunctionsDescriptor, NS::Error** error); + MTL::RenderPipelineState* newRenderPipelineState(MTL::RenderPipelineFunctionsDescriptor* additionalBinaryFunctions, NS::Error** error); + MTL::VisibleFunctionTable* newVisibleFunctionTable(MTL::VisibleFunctionTableDescriptor* descriptor, MTL::RenderStages stage); + NS::UInteger objectThreadExecutionWidth() const; + MTL::RenderPipelineReflection* reflection() const; + MTL::Size requiredThreadsPerMeshThreadgroup() const; + MTL::Size requiredThreadsPerObjectThreadgroup() const; + MTL::Size requiredThreadsPerTileThreadgroup() const; + MTL::ShaderValidation shaderValidation() const; + bool supportIndirectCommandBuffers() const; + bool threadgroupSizeMatchesTileSize() const; - NS::UInteger imageblockSampleLength() const; - - NS::String* label() const; - - NS::UInteger maxTotalThreadgroupsPerMeshGrid() const; - - NS::UInteger maxTotalThreadsPerMeshThreadgroup() const; - - NS::UInteger maxTotalThreadsPerObjectThreadgroup() const; - - NS::UInteger maxTotalThreadsPerThreadgroup() const; - - NS::UInteger meshThreadExecutionWidth() const; - - IntersectionFunctionTable* newIntersectionFunctionTable(const MTL::IntersectionFunctionTableDescriptor* descriptor, MTL::RenderStages stage); - - MTL4::PipelineDescriptor* newRenderPipelineDescriptor(); - - RenderPipelineState* newRenderPipelineState(const MTL4::RenderPipelineBinaryFunctionsDescriptor* binaryFunctionsDescriptor, NS::Error** error); - RenderPipelineState* newRenderPipelineState(const MTL::RenderPipelineFunctionsDescriptor* additionalBinaryFunctions, NS::Error** error); - - VisibleFunctionTable* newVisibleFunctionTable(const MTL::VisibleFunctionTableDescriptor* descriptor, MTL::RenderStages stage); - - NS::UInteger objectThreadExecutionWidth() const; - - RenderPipelineReflection* reflection() const; - - Size requiredThreadsPerMeshThreadgroup() const; - - Size requiredThreadsPerObjectThreadgroup() const; - - Size requiredThreadsPerTileThreadgroup() const; - - ShaderValidation shaderValidation() const; - - bool supportIndirectCommandBuffers() const; - - bool threadgroupSizeMatchesTileSize() const; }; + class RenderPipelineColorAttachmentDescriptorArray : public NS::Referencing { public: static RenderPipelineColorAttachmentDescriptorArray* alloc(); + RenderPipelineColorAttachmentDescriptorArray* init() const; - RenderPipelineColorAttachmentDescriptorArray* init(); + MTL::RenderPipelineColorAttachmentDescriptor* object(NS::UInteger attachmentIndex); + void setObject(MTL::RenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); - RenderPipelineColorAttachmentDescriptor* object(NS::UInteger attachmentIndex); - void setObject(const MTL::RenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); }; + class TileRenderPipelineColorAttachmentDescriptor : public NS::Copying { public: static TileRenderPipelineColorAttachmentDescriptor* alloc(); + TileRenderPipelineColorAttachmentDescriptor* init() const; - TileRenderPipelineColorAttachmentDescriptor* init(); + MTL::PixelFormat pixelFormat() const; + void setPixelFormat(MTL::PixelFormat pixelFormat); - PixelFormat pixelFormat() const; - void setPixelFormat(MTL::PixelFormat pixelFormat); }; + class TileRenderPipelineColorAttachmentDescriptorArray : public NS::Referencing { public: static TileRenderPipelineColorAttachmentDescriptorArray* alloc(); + TileRenderPipelineColorAttachmentDescriptorArray* init() const; - TileRenderPipelineColorAttachmentDescriptorArray* init(); + MTL::TileRenderPipelineColorAttachmentDescriptor* object(NS::UInteger attachmentIndex); + void setObject(MTL::TileRenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); - TileRenderPipelineColorAttachmentDescriptor* object(NS::UInteger attachmentIndex); - void setObject(const MTL::TileRenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); }; + class TileRenderPipelineDescriptor : public NS::Copying { public: - static TileRenderPipelineDescriptor* alloc(); - - NS::Array* binaryArchives() const; - - TileRenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; - - TileRenderPipelineDescriptor* init(); - - NS::String* label() const; - - LinkedFunctions* linkedFunctions() const; - - NS::UInteger maxCallStackDepth() const; - - NS::UInteger maxTotalThreadsPerThreadgroup() const; - - NS::Array* preloadedLibraries() const; - - NS::UInteger rasterSampleCount() const; - - Size requiredThreadsPerThreadgroup() const; - - void reset(); - - void setBinaryArchives(const NS::Array* binaryArchives); - - void setLabel(const NS::String* label); - - void setLinkedFunctions(const MTL::LinkedFunctions* linkedFunctions); - - void setMaxCallStackDepth(NS::UInteger maxCallStackDepth); - - void setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup); - - void setPreloadedLibraries(const NS::Array* preloadedLibraries); - - void setRasterSampleCount(NS::UInteger rasterSampleCount); - - void setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup); - - void setShaderValidation(MTL::ShaderValidation shaderValidation); - - void setSupportAddingBinaryFunctions(bool supportAddingBinaryFunctions); + static TileRenderPipelineDescriptor* alloc(); + TileRenderPipelineDescriptor* init() const; + + NS::Array* binaryArchives() const; + MTL::TileRenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; + NS::String* label() const; + MTL::LinkedFunctions* linkedFunctions() const; + NS::UInteger maxCallStackDepth() const; + NS::UInteger maxTotalThreadsPerThreadgroup() const; + NS::Array* preloadedLibraries() const; + NS::UInteger rasterSampleCount() const; + MTL::Size requiredThreadsPerThreadgroup() const; + void reset(); + void setBinaryArchives(NS::Array* binaryArchives); + void setLabel(NS::String* label); + void setLinkedFunctions(MTL::LinkedFunctions* linkedFunctions); + void setMaxCallStackDepth(NS::UInteger maxCallStackDepth); + void setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup); + void setPreloadedLibraries(NS::Array* preloadedLibraries); + void setRasterSampleCount(NS::UInteger rasterSampleCount); + void setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup); + void setShaderValidation(MTL::ShaderValidation shaderValidation); + void setSupportAddingBinaryFunctions(bool supportAddingBinaryFunctions); + void setThreadgroupSizeMatchesTileSize(bool threadgroupSizeMatchesTileSize); + void setTileFunction(MTL::Function* tileFunction); + MTL::ShaderValidation shaderValidation() const; + bool supportAddingBinaryFunctions() const; + bool threadgroupSizeMatchesTileSize() const; + MTL::PipelineBufferDescriptorArray* tileBuffers() const; + MTL::Function* tileFunction() const; - void setThreadgroupSizeMatchesTileSize(bool threadgroupSizeMatchesTileSize); - - void setTileFunction(const MTL::Function* tileFunction); - - ShaderValidation shaderValidation() const; - - bool supportAddingBinaryFunctions() const; - - bool threadgroupSizeMatchesTileSize() const; - - PipelineBufferDescriptorArray* tileBuffers() const; - - Function* tileFunction() const; }; + class MeshRenderPipelineDescriptor : public NS::Copying { public: static MeshRenderPipelineDescriptor* alloc(); + MeshRenderPipelineDescriptor* init() const; + + bool alphaToCoverageEnabled() const; + bool alphaToOneEnabled() const; + NS::Array* binaryArchives() const; + MTL::RenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; + MTL::PixelFormat depthAttachmentPixelFormat() const; + MTL::PipelineBufferDescriptorArray* fragmentBuffers() const; + MTL::Function* fragmentFunction() const; + MTL::LinkedFunctions* fragmentLinkedFunctions() const; + bool isAlphaToCoverageEnabled(); + bool isAlphaToOneEnabled(); + bool isRasterizationEnabled(); + NS::String* label() const; + NS::UInteger maxTotalThreadgroupsPerMeshGrid() const; + NS::UInteger maxTotalThreadsPerMeshThreadgroup() const; + NS::UInteger maxTotalThreadsPerObjectThreadgroup() const; + NS::UInteger maxVertexAmplificationCount() const; + MTL::PipelineBufferDescriptorArray* meshBuffers() const; + MTL::Function* meshFunction() const; + MTL::LinkedFunctions* meshLinkedFunctions() const; + bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth() const; + MTL::PipelineBufferDescriptorArray* objectBuffers() const; + MTL::Function* objectFunction() const; + MTL::LinkedFunctions* objectLinkedFunctions() const; + bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth() const; + NS::UInteger payloadMemoryLength() const; + NS::UInteger rasterSampleCount() const; + bool rasterizationEnabled() const; + MTL::Size requiredThreadsPerMeshThreadgroup() const; + MTL::Size requiredThreadsPerObjectThreadgroup() const; + void reset(); + void setAlphaToCoverageEnabled(bool alphaToCoverageEnabled); + void setAlphaToOneEnabled(bool alphaToOneEnabled); + void setBinaryArchives(NS::Array* binaryArchives); + void setDepthAttachmentPixelFormat(MTL::PixelFormat depthAttachmentPixelFormat); + void setFragmentFunction(MTL::Function* fragmentFunction); + void setFragmentLinkedFunctions(MTL::LinkedFunctions* fragmentLinkedFunctions); + void setLabel(NS::String* label); + void setMaxTotalThreadgroupsPerMeshGrid(NS::UInteger maxTotalThreadgroupsPerMeshGrid); + void setMaxTotalThreadsPerMeshThreadgroup(NS::UInteger maxTotalThreadsPerMeshThreadgroup); + void setMaxTotalThreadsPerObjectThreadgroup(NS::UInteger maxTotalThreadsPerObjectThreadgroup); + void setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount); + void setMeshFunction(MTL::Function* meshFunction); + void setMeshLinkedFunctions(MTL::LinkedFunctions* meshLinkedFunctions); + void setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth); + void setObjectFunction(MTL::Function* objectFunction); + void setObjectLinkedFunctions(MTL::LinkedFunctions* objectLinkedFunctions); + void setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth); + void setPayloadMemoryLength(NS::UInteger payloadMemoryLength); + void setRasterSampleCount(NS::UInteger rasterSampleCount); + void setRasterizationEnabled(bool rasterizationEnabled); + void setRequiredThreadsPerMeshThreadgroup(MTL::Size requiredThreadsPerMeshThreadgroup); + void setRequiredThreadsPerObjectThreadgroup(MTL::Size requiredThreadsPerObjectThreadgroup); + void setShaderValidation(MTL::ShaderValidation shaderValidation); + void setStencilAttachmentPixelFormat(MTL::PixelFormat stencilAttachmentPixelFormat); + void setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers); + MTL::ShaderValidation shaderValidation() const; + MTL::PixelFormat stencilAttachmentPixelFormat() const; + bool supportIndirectCommandBuffers() const; - [[deprecated("please use isAlphaToCoverageEnabled instead")]] - bool alphaToCoverageEnabled() const; - - [[deprecated("please use isAlphaToOneEnabled instead")]] - bool alphaToOneEnabled() const; - - NS::Array* binaryArchives() const; - - RenderPipelineColorAttachmentDescriptorArray* colorAttachments() const; - - PixelFormat depthAttachmentPixelFormat() const; - - PipelineBufferDescriptorArray* fragmentBuffers() const; - - Function* fragmentFunction() const; - - LinkedFunctions* fragmentLinkedFunctions() const; - - MeshRenderPipelineDescriptor* init(); - - bool isAlphaToCoverageEnabled() const; - - bool isAlphaToOneEnabled() const; - - bool isRasterizationEnabled() const; - - NS::String* label() const; - - NS::UInteger maxTotalThreadgroupsPerMeshGrid() const; - - NS::UInteger maxTotalThreadsPerMeshThreadgroup() const; - - NS::UInteger maxTotalThreadsPerObjectThreadgroup() const; - - NS::UInteger maxVertexAmplificationCount() const; - - PipelineBufferDescriptorArray* meshBuffers() const; - - Function* meshFunction() const; - - LinkedFunctions* meshLinkedFunctions() const; - - bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth() const; - - PipelineBufferDescriptorArray* objectBuffers() const; - - Function* objectFunction() const; - - LinkedFunctions* objectLinkedFunctions() const; - - bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth() const; - - NS::UInteger payloadMemoryLength() const; - - NS::UInteger rasterSampleCount() const; - - [[deprecated("please use isRasterizationEnabled instead")]] - bool rasterizationEnabled() const; - - Size requiredThreadsPerMeshThreadgroup() const; - - Size requiredThreadsPerObjectThreadgroup() const; - - void reset(); - - void setAlphaToCoverageEnabled(bool alphaToCoverageEnabled); - - void setAlphaToOneEnabled(bool alphaToOneEnabled); - - void setBinaryArchives(const NS::Array* binaryArchives); - - void setDepthAttachmentPixelFormat(MTL::PixelFormat depthAttachmentPixelFormat); - - void setFragmentFunction(const MTL::Function* fragmentFunction); - - void setFragmentLinkedFunctions(const MTL::LinkedFunctions* fragmentLinkedFunctions); - - void setLabel(const NS::String* label); - - void setMaxTotalThreadgroupsPerMeshGrid(NS::UInteger maxTotalThreadgroupsPerMeshGrid); - - void setMaxTotalThreadsPerMeshThreadgroup(NS::UInteger maxTotalThreadsPerMeshThreadgroup); - - void setMaxTotalThreadsPerObjectThreadgroup(NS::UInteger maxTotalThreadsPerObjectThreadgroup); - - void setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount); - - void setMeshFunction(const MTL::Function* meshFunction); - - void setMeshLinkedFunctions(const MTL::LinkedFunctions* meshLinkedFunctions); - - void setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth); - - void setObjectFunction(const MTL::Function* objectFunction); - - void setObjectLinkedFunctions(const MTL::LinkedFunctions* objectLinkedFunctions); - - void setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth); - - void setPayloadMemoryLength(NS::UInteger payloadMemoryLength); - - void setRasterSampleCount(NS::UInteger rasterSampleCount); - - void setRasterizationEnabled(bool rasterizationEnabled); - - void setRequiredThreadsPerMeshThreadgroup(MTL::Size requiredThreadsPerMeshThreadgroup); - - void setRequiredThreadsPerObjectThreadgroup(MTL::Size requiredThreadsPerObjectThreadgroup); - - void setShaderValidation(MTL::ShaderValidation shaderValidation); - - void setStencilAttachmentPixelFormat(MTL::PixelFormat stencilAttachmentPixelFormat); - - void setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers); +}; - ShaderValidation shaderValidation() const; +} // namespace MTL - PixelFormat stencilAttachmentPixelFormat() const; +// --- Class symbols + inline implementations --- - bool supportIndirectCommandBuffers() const; -}; +extern "C" void *OBJC_CLASS_$_MTLRenderPipelineColorAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLLogicalToPhysicalColorAttachmentMap; +extern "C" void *OBJC_CLASS_$_MTLRenderPipelineReflection; +extern "C" void *OBJC_CLASS_$_MTLRenderPipelineDescriptor; +extern "C" void *OBJC_CLASS_$_MTLRenderPipelineFunctionsDescriptor; +extern "C" void *OBJC_CLASS_$_MTLRenderPipelineState; +extern "C" void *OBJC_CLASS_$_MTLRenderPipelineColorAttachmentDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLTileRenderPipelineColorAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLTileRenderPipelineColorAttachmentDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLTileRenderPipelineDescriptor; +extern "C" void *OBJC_CLASS_$_MTLMeshRenderPipelineDescriptor; -} _MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptor* MTL::RenderPipelineColorAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPipelineColorAttachmentDescriptor)); + return _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPipelineColorAttachmentDescriptor, nullptr); } -_MTL_INLINE MTL::BlendOperation MTL::RenderPipelineColorAttachmentDescriptor::alphaBlendOperation() const +_MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptor* MTL::RenderPipelineColorAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(alphaBlendOperation)); + return _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE bool MTL::RenderPipelineColorAttachmentDescriptor::blendingEnabled() const +_MTL_INLINE MTL::PixelFormat MTL::RenderPipelineColorAttachmentDescriptor::pixelFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isBlendingEnabled)); + return _MTL_msg_MTL__PixelFormat_pixelFormat((const void*)this, nullptr); } -_MTL_INLINE MTL::BlendFactor MTL::RenderPipelineColorAttachmentDescriptor::destinationAlphaBlendFactor() const +_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setPixelFormat(MTL::PixelFormat pixelFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(destinationAlphaBlendFactor)); + _MTL_msg_v_setPixelFormat__MTL__PixelFormat((const void*)this, nullptr, pixelFormat); } -_MTL_INLINE MTL::BlendFactor MTL::RenderPipelineColorAttachmentDescriptor::destinationRGBBlendFactor() const +_MTL_INLINE bool MTL::RenderPipelineColorAttachmentDescriptor::blendingEnabled() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(destinationRGBBlendFactor)); + return _MTL_msg_bool_blendingEnabled((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptor* MTL::RenderPipelineColorAttachmentDescriptor::init() +_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setBlendingEnabled(bool blendingEnabled) { - return NS::Object::init(); + _MTL_msg_v_setBlendingEnabled__bool((const void*)this, nullptr, blendingEnabled); } -_MTL_INLINE bool MTL::RenderPipelineColorAttachmentDescriptor::isBlendingEnabled() const +_MTL_INLINE MTL::BlendFactor MTL::RenderPipelineColorAttachmentDescriptor::sourceRGBBlendFactor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isBlendingEnabled)); + return _MTL_msg_MTL__BlendFactor_sourceRGBBlendFactor((const void*)this, nullptr); } -_MTL_INLINE MTL::PixelFormat MTL::RenderPipelineColorAttachmentDescriptor::pixelFormat() const +_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(pixelFormat)); + _MTL_msg_v_setSourceRGBBlendFactor__MTL__BlendFactor((const void*)this, nullptr, sourceRGBBlendFactor); } -_MTL_INLINE MTL::BlendOperation MTL::RenderPipelineColorAttachmentDescriptor::rgbBlendOperation() const +_MTL_INLINE MTL::BlendFactor MTL::RenderPipelineColorAttachmentDescriptor::destinationRGBBlendFactor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rgbBlendOperation)); + return _MTL_msg_MTL__BlendFactor_destinationRGBBlendFactor((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation) +_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAlphaBlendOperation_), alphaBlendOperation); + _MTL_msg_v_setDestinationRGBBlendFactor__MTL__BlendFactor((const void*)this, nullptr, destinationRGBBlendFactor); } -_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setBlendingEnabled(bool blendingEnabled) +_MTL_INLINE MTL::BlendOperation MTL::RenderPipelineColorAttachmentDescriptor::rgbBlendOperation() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBlendingEnabled_), blendingEnabled); + return _MTL_msg_MTL__BlendOperation_rgbBlendOperation((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor) +_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDestinationAlphaBlendFactor_), destinationAlphaBlendFactor); + _MTL_msg_v_setRgbBlendOperation__MTL__BlendOperation((const void*)this, nullptr, rgbBlendOperation); } -_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor) +_MTL_INLINE MTL::BlendFactor MTL::RenderPipelineColorAttachmentDescriptor::sourceAlphaBlendFactor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDestinationRGBBlendFactor_), destinationRGBBlendFactor); + return _MTL_msg_MTL__BlendFactor_sourceAlphaBlendFactor((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setPixelFormat(MTL::PixelFormat pixelFormat) +_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPixelFormat_), pixelFormat); + _MTL_msg_v_setSourceAlphaBlendFactor__MTL__BlendFactor((const void*)this, nullptr, sourceAlphaBlendFactor); } -_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation) +_MTL_INLINE MTL::BlendFactor MTL::RenderPipelineColorAttachmentDescriptor::destinationAlphaBlendFactor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRgbBlendOperation_), rgbBlendOperation); + return _MTL_msg_MTL__BlendFactor_destinationAlphaBlendFactor((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor) +_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSourceAlphaBlendFactor_), sourceAlphaBlendFactor); + _MTL_msg_v_setDestinationAlphaBlendFactor__MTL__BlendFactor((const void*)this, nullptr, destinationAlphaBlendFactor); } -_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor) +_MTL_INLINE MTL::BlendOperation MTL::RenderPipelineColorAttachmentDescriptor::alphaBlendOperation() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSourceRGBBlendFactor_), sourceRGBBlendFactor); + return _MTL_msg_MTL__BlendOperation_alphaBlendOperation((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setWriteMask(MTL::ColorWriteMask writeMask) +_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setWriteMask_), writeMask); + _MTL_msg_v_setAlphaBlendOperation__MTL__BlendOperation((const void*)this, nullptr, alphaBlendOperation); } -_MTL_INLINE MTL::BlendFactor MTL::RenderPipelineColorAttachmentDescriptor::sourceAlphaBlendFactor() const +_MTL_INLINE MTL::ColorWriteMask MTL::RenderPipelineColorAttachmentDescriptor::writeMask() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sourceAlphaBlendFactor)); + return _MTL_msg_MTL__ColorWriteMask_writeMask((const void*)this, nullptr); } -_MTL_INLINE MTL::BlendFactor MTL::RenderPipelineColorAttachmentDescriptor::sourceRGBBlendFactor() const +_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptor::setWriteMask(MTL::ColorWriteMask writeMask) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sourceRGBBlendFactor)); + _MTL_msg_v_setWriteMask__MTL__ColorWriteMask((const void*)this, nullptr, writeMask); } -_MTL_INLINE MTL::ColorWriteMask MTL::RenderPipelineColorAttachmentDescriptor::writeMask() const +_MTL_INLINE bool MTL::RenderPipelineColorAttachmentDescriptor::isBlendingEnabled() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(writeMask)); + return _MTL_msg_bool_isBlendingEnabled((const void*)this, nullptr); } _MTL_INLINE MTL::LogicalToPhysicalColorAttachmentMap* MTL::LogicalToPhysicalColorAttachmentMap::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLLogicalToPhysicalColorAttachmentMap)); + return _MTL_msg_MTL__LogicalToPhysicalColorAttachmentMapp_alloc((const void*)&OBJC_CLASS_$_MTLLogicalToPhysicalColorAttachmentMap, nullptr); } -_MTL_INLINE NS::UInteger MTL::LogicalToPhysicalColorAttachmentMap::getPhysicalIndex(NS::UInteger logicalIndex) +_MTL_INLINE MTL::LogicalToPhysicalColorAttachmentMap* MTL::LogicalToPhysicalColorAttachmentMap::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(getPhysicalIndexForLogicalIndex_), logicalIndex); + return _MTL_msg_MTL__LogicalToPhysicalColorAttachmentMapp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::LogicalToPhysicalColorAttachmentMap* MTL::LogicalToPhysicalColorAttachmentMap::init() +_MTL_INLINE void MTL::LogicalToPhysicalColorAttachmentMap::setPhysicalIndex(NS::UInteger physicalIndex, NS::UInteger logicalIndex) { - return NS::Object::init(); + _MTL_msg_v_setPhysicalIndex_forLogicalIndex__NS__UInteger_NS__UInteger((const void*)this, nullptr, physicalIndex, logicalIndex); } -_MTL_INLINE void MTL::LogicalToPhysicalColorAttachmentMap::reset() +_MTL_INLINE NS::UInteger MTL::LogicalToPhysicalColorAttachmentMap::getPhysicalIndex(NS::UInteger logicalIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + return _MTL_msg_NS__UInteger_getPhysicalIndexForLogicalIndex__NS__UInteger((const void*)this, nullptr, logicalIndex); } -_MTL_INLINE void MTL::LogicalToPhysicalColorAttachmentMap::setPhysicalIndex(NS::UInteger physicalIndex, NS::UInteger logicalIndex) +_MTL_INLINE void MTL::LogicalToPhysicalColorAttachmentMap::reset() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPhysicalIndex_forLogicalIndex_), physicalIndex, logicalIndex); + _MTL_msg_v_reset((const void*)this, nullptr); } _MTL_INLINE MTL::RenderPipelineReflection* MTL::RenderPipelineReflection::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPipelineReflection)); + return _MTL_msg_MTL__RenderPipelineReflectionp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPipelineReflection, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::fragmentArguments() const +_MTL_INLINE MTL::RenderPipelineReflection* MTL::RenderPipelineReflection::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentArguments)); + return _MTL_msg_MTL__RenderPipelineReflectionp_init((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::fragmentBindings() const +_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::vertexBindings() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentBindings)); + return _MTL_msg_NS__Arrayp_vertexBindings((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPipelineReflection* MTL::RenderPipelineReflection::init() +_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::fragmentBindings() const { - return NS::Object::init(); + return _MTL_msg_NS__Arrayp_fragmentBindings((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::meshBindings() const +_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::tileBindings() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshBindings)); + return _MTL_msg_NS__Arrayp_tileBindings((const void*)this, nullptr); } _MTL_INLINE NS::Array* MTL::RenderPipelineReflection::objectBindings() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectBindings)); + return _MTL_msg_NS__Arrayp_objectBindings((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::tileArguments() const +_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::meshBindings() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileArguments)); + return _MTL_msg_NS__Arrayp_meshBindings((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::tileBindings() const +_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::vertexArguments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileBindings)); + return _MTL_msg_NS__Arrayp_vertexArguments((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::vertexArguments() const +_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::fragmentArguments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexArguments)); + return _MTL_msg_NS__Arrayp_fragmentArguments((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::vertexBindings() const +_MTL_INLINE NS::Array* MTL::RenderPipelineReflection::tileArguments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexBindings)); + return _MTL_msg_NS__Arrayp_tileArguments((const void*)this, nullptr); } _MTL_INLINE MTL::RenderPipelineDescriptor* MTL::RenderPipelineDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPipelineDescriptor)); + return _MTL_msg_MTL__RenderPipelineDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPipelineDescriptor, nullptr); } -_MTL_INLINE bool MTL::RenderPipelineDescriptor::alphaToCoverageEnabled() const +_MTL_INLINE MTL::RenderPipelineDescriptor* MTL::RenderPipelineDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isAlphaToCoverageEnabled)); + return _MTL_msg_MTL__RenderPipelineDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE bool MTL::RenderPipelineDescriptor::alphaToOneEnabled() const +_MTL_INLINE NS::String* MTL::RenderPipelineDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isAlphaToOneEnabled)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineDescriptor::binaryArchives() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(binaryArchives)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptorArray* MTL::RenderPipelineDescriptor::colorAttachments() const +_MTL_INLINE MTL::Function* MTL::RenderPipelineDescriptor::vertexFunction() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(colorAttachments)); + return _MTL_msg_MTL__Functionp_vertexFunction((const void*)this, nullptr); } -_MTL_INLINE MTL::PixelFormat MTL::RenderPipelineDescriptor::depthAttachmentPixelFormat() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setVertexFunction(MTL::Function* vertexFunction) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depthAttachmentPixelFormat)); + _MTL_msg_v_setVertexFunction__MTL__Functionp((const void*)this, nullptr, vertexFunction); } -_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::RenderPipelineDescriptor::fragmentBuffers() const +_MTL_INLINE MTL::Function* MTL::RenderPipelineDescriptor::fragmentFunction() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentBuffers)); + return _MTL_msg_MTL__Functionp_fragmentFunction((const void*)this, nullptr); } -_MTL_INLINE MTL::Function* MTL::RenderPipelineDescriptor::fragmentFunction() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setFragmentFunction(MTL::Function* fragmentFunction) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentFunction)); + _MTL_msg_v_setFragmentFunction__MTL__Functionp((const void*)this, nullptr, fragmentFunction); } -_MTL_INLINE MTL::LinkedFunctions* MTL::RenderPipelineDescriptor::fragmentLinkedFunctions() const +_MTL_INLINE MTL::VertexDescriptor* MTL::RenderPipelineDescriptor::vertexDescriptor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentLinkedFunctions)); + return _MTL_msg_MTL__VertexDescriptorp_vertexDescriptor((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineDescriptor::fragmentPreloadedLibraries() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setVertexDescriptor(MTL::VertexDescriptor* vertexDescriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentPreloadedLibraries)); + _MTL_msg_v_setVertexDescriptor__MTL__VertexDescriptorp((const void*)this, nullptr, vertexDescriptor); } -_MTL_INLINE MTL::RenderPipelineDescriptor* MTL::RenderPipelineDescriptor::init() +_MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::sampleCount() const { - return NS::Object::init(); + return _MTL_msg_NS__UInteger_sampleCount((const void*)this, nullptr); } -_MTL_INLINE MTL::PrimitiveTopologyClass MTL::RenderPipelineDescriptor::inputPrimitiveTopology() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setSampleCount(NS::UInteger sampleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(inputPrimitiveTopology)); + _MTL_msg_v_setSampleCount__NS__UInteger((const void*)this, nullptr, sampleCount); } -_MTL_INLINE bool MTL::RenderPipelineDescriptor::isAlphaToCoverageEnabled() const +_MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::rasterSampleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isAlphaToCoverageEnabled)); + return _MTL_msg_NS__UInteger_rasterSampleCount((const void*)this, nullptr); } -_MTL_INLINE bool MTL::RenderPipelineDescriptor::isAlphaToOneEnabled() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isAlphaToOneEnabled)); + _MTL_msg_v_setRasterSampleCount__NS__UInteger((const void*)this, nullptr, rasterSampleCount); } -_MTL_INLINE bool MTL::RenderPipelineDescriptor::isRasterizationEnabled() const +_MTL_INLINE bool MTL::RenderPipelineDescriptor::alphaToCoverageEnabled() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isRasterizationEnabled)); + return _MTL_msg_bool_alphaToCoverageEnabled((const void*)this, nullptr); } -_MTL_INLINE bool MTL::RenderPipelineDescriptor::isTessellationFactorScaleEnabled() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setAlphaToCoverageEnabled(bool alphaToCoverageEnabled) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isTessellationFactorScaleEnabled)); + _MTL_msg_v_setAlphaToCoverageEnabled__bool((const void*)this, nullptr, alphaToCoverageEnabled); } -_MTL_INLINE NS::String* MTL::RenderPipelineDescriptor::label() const +_MTL_INLINE bool MTL::RenderPipelineDescriptor::alphaToOneEnabled() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_bool_alphaToOneEnabled((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::maxFragmentCallStackDepth() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setAlphaToOneEnabled(bool alphaToOneEnabled) +{ + _MTL_msg_v_setAlphaToOneEnabled__bool((const void*)this, nullptr, alphaToOneEnabled); +} + +_MTL_INLINE bool MTL::RenderPipelineDescriptor::rasterizationEnabled() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxFragmentCallStackDepth)); + return _MTL_msg_bool_rasterizationEnabled((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::maxTessellationFactor() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setRasterizationEnabled(bool rasterizationEnabled) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTessellationFactor)); + _MTL_msg_v_setRasterizationEnabled__bool((const void*)this, nullptr, rasterizationEnabled); } _MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::maxVertexAmplificationCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxVertexAmplificationCount)); + return _MTL_msg_NS__UInteger_maxVertexAmplificationCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::maxVertexCallStackDepth() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxVertexCallStackDepth)); + _MTL_msg_v_setMaxVertexAmplificationCount__NS__UInteger((const void*)this, nullptr, maxVertexAmplificationCount); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::rasterSampleCount() const +_MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptorArray* MTL::RenderPipelineDescriptor::colorAttachments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rasterSampleCount)); + return _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorArrayp_colorAttachments((const void*)this, nullptr); } -_MTL_INLINE bool MTL::RenderPipelineDescriptor::rasterizationEnabled() const +_MTL_INLINE MTL::PixelFormat MTL::RenderPipelineDescriptor::depthAttachmentPixelFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isRasterizationEnabled)); + return _MTL_msg_MTL__PixelFormat_depthAttachmentPixelFormat((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::reset() +_MTL_INLINE void MTL::RenderPipelineDescriptor::setDepthAttachmentPixelFormat(MTL::PixelFormat depthAttachmentPixelFormat) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL_msg_v_setDepthAttachmentPixelFormat__MTL__PixelFormat((const void*)this, nullptr, depthAttachmentPixelFormat); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::sampleCount() const +_MTL_INLINE MTL::PixelFormat MTL::RenderPipelineDescriptor::stencilAttachmentPixelFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleCount)); + return _MTL_msg_MTL__PixelFormat_stencilAttachmentPixelFormat((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setAlphaToCoverageEnabled(bool alphaToCoverageEnabled) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setStencilAttachmentPixelFormat(MTL::PixelFormat stencilAttachmentPixelFormat) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAlphaToCoverageEnabled_), alphaToCoverageEnabled); + _MTL_msg_v_setStencilAttachmentPixelFormat__MTL__PixelFormat((const void*)this, nullptr, stencilAttachmentPixelFormat); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setAlphaToOneEnabled(bool alphaToOneEnabled) +_MTL_INLINE MTL::PrimitiveTopologyClass MTL::RenderPipelineDescriptor::inputPrimitiveTopology() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAlphaToOneEnabled_), alphaToOneEnabled); + return _MTL_msg_MTL__PrimitiveTopologyClass_inputPrimitiveTopology((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setBinaryArchives(const NS::Array* binaryArchives) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setInputPrimitiveTopology(MTL::PrimitiveTopologyClass inputPrimitiveTopology) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBinaryArchives_), binaryArchives); + _MTL_msg_v_setInputPrimitiveTopology__MTL__PrimitiveTopologyClass((const void*)this, nullptr, inputPrimitiveTopology); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setDepthAttachmentPixelFormat(MTL::PixelFormat depthAttachmentPixelFormat) +_MTL_INLINE MTL::TessellationPartitionMode MTL::RenderPipelineDescriptor::tessellationPartitionMode() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthAttachmentPixelFormat_), depthAttachmentPixelFormat); + return _MTL_msg_MTL__TessellationPartitionMode_tessellationPartitionMode((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setFragmentFunction(const MTL::Function* fragmentFunction) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationPartitionMode(MTL::TessellationPartitionMode tessellationPartitionMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentFunction_), fragmentFunction); + _MTL_msg_v_setTessellationPartitionMode__MTL__TessellationPartitionMode((const void*)this, nullptr, tessellationPartitionMode); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setFragmentLinkedFunctions(const MTL::LinkedFunctions* fragmentLinkedFunctions) +_MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::maxTessellationFactor() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentLinkedFunctions_), fragmentLinkedFunctions); + return _MTL_msg_NS__UInteger_maxTessellationFactor((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setFragmentPreloadedLibraries(const NS::Array* fragmentPreloadedLibraries) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setMaxTessellationFactor(NS::UInteger maxTessellationFactor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentPreloadedLibraries_), fragmentPreloadedLibraries); + _MTL_msg_v_setMaxTessellationFactor__NS__UInteger((const void*)this, nullptr, maxTessellationFactor); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setInputPrimitiveTopology(MTL::PrimitiveTopologyClass inputPrimitiveTopology) +_MTL_INLINE bool MTL::RenderPipelineDescriptor::tessellationFactorScaleEnabled() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInputPrimitiveTopology_), inputPrimitiveTopology); + return _MTL_msg_bool_tessellationFactorScaleEnabled((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setLabel(const NS::String* label) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationFactorScaleEnabled(bool tessellationFactorScaleEnabled) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setTessellationFactorScaleEnabled__bool((const void*)this, nullptr, tessellationFactorScaleEnabled); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setMaxFragmentCallStackDepth(NS::UInteger maxFragmentCallStackDepth) +_MTL_INLINE MTL::TessellationFactorFormat MTL::RenderPipelineDescriptor::tessellationFactorFormat() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxFragmentCallStackDepth_), maxFragmentCallStackDepth); + return _MTL_msg_MTL__TessellationFactorFormat_tessellationFactorFormat((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setMaxTessellationFactor(NS::UInteger maxTessellationFactor) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationFactorFormat(MTL::TessellationFactorFormat tessellationFactorFormat) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTessellationFactor_), maxTessellationFactor); + _MTL_msg_v_setTessellationFactorFormat__MTL__TessellationFactorFormat((const void*)this, nullptr, tessellationFactorFormat); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount) +_MTL_INLINE MTL::TessellationControlPointIndexType MTL::RenderPipelineDescriptor::tessellationControlPointIndexType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxVertexAmplificationCount_), maxVertexAmplificationCount); + return _MTL_msg_MTL__TessellationControlPointIndexType_tessellationControlPointIndexType((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setMaxVertexCallStackDepth(NS::UInteger maxVertexCallStackDepth) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationControlPointIndexType(MTL::TessellationControlPointIndexType tessellationControlPointIndexType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxVertexCallStackDepth_), maxVertexCallStackDepth); + _MTL_msg_v_setTessellationControlPointIndexType__MTL__TessellationControlPointIndexType((const void*)this, nullptr, tessellationControlPointIndexType); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) +_MTL_INLINE MTL::TessellationFactorStepFunction MTL::RenderPipelineDescriptor::tessellationFactorStepFunction() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterSampleCount_), rasterSampleCount); + return _MTL_msg_MTL__TessellationFactorStepFunction_tessellationFactorStepFunction((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setRasterizationEnabled(bool rasterizationEnabled) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationFactorStepFunction(MTL::TessellationFactorStepFunction tessellationFactorStepFunction) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterizationEnabled_), rasterizationEnabled); + _MTL_msg_v_setTessellationFactorStepFunction__MTL__TessellationFactorStepFunction((const void*)this, nullptr, tessellationFactorStepFunction); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setSampleCount(NS::UInteger sampleCount) +_MTL_INLINE MTL::Winding MTL::RenderPipelineDescriptor::tessellationOutputWindingOrder() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSampleCount_), sampleCount); + return _MTL_msg_MTL__Winding_tessellationOutputWindingOrder((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setShaderValidation(MTL::ShaderValidation shaderValidation) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationOutputWindingOrder(MTL::Winding tessellationOutputWindingOrder) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setShaderValidation_), shaderValidation); + _MTL_msg_v_setTessellationOutputWindingOrder__MTL__Winding((const void*)this, nullptr, tessellationOutputWindingOrder); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setStencilAttachmentPixelFormat(MTL::PixelFormat stencilAttachmentPixelFormat) +_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::RenderPipelineDescriptor::vertexBuffers() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilAttachmentPixelFormat_), stencilAttachmentPixelFormat); + return _MTL_msg_MTL__PipelineBufferDescriptorArrayp_vertexBuffers((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setSupportAddingFragmentBinaryFunctions(bool supportAddingFragmentBinaryFunctions) +_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::RenderPipelineDescriptor::fragmentBuffers() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportAddingFragmentBinaryFunctions_), supportAddingFragmentBinaryFunctions); + return _MTL_msg_MTL__PipelineBufferDescriptorArrayp_fragmentBuffers((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setSupportAddingVertexBinaryFunctions(bool supportAddingVertexBinaryFunctions) +_MTL_INLINE bool MTL::RenderPipelineDescriptor::supportIndirectCommandBuffers() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportAddingVertexBinaryFunctions_), supportAddingVertexBinaryFunctions); + return _MTL_msg_bool_supportIndirectCommandBuffers((const void*)this, nullptr); } _MTL_INLINE void MTL::RenderPipelineDescriptor::setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportIndirectCommandBuffers_), supportIndirectCommandBuffers); + _MTL_msg_v_setSupportIndirectCommandBuffers__bool((const void*)this, nullptr, supportIndirectCommandBuffers); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationControlPointIndexType(MTL::TessellationControlPointIndexType tessellationControlPointIndexType) +_MTL_INLINE NS::Array* MTL::RenderPipelineDescriptor::binaryArchives() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTessellationControlPointIndexType_), tessellationControlPointIndexType); + return _MTL_msg_NS__Arrayp_binaryArchives((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationFactorFormat(MTL::TessellationFactorFormat tessellationFactorFormat) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setBinaryArchives(NS::Array* binaryArchives) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTessellationFactorFormat_), tessellationFactorFormat); + _MTL_msg_v_setBinaryArchives__NS__Arrayp((const void*)this, nullptr, binaryArchives); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationFactorScaleEnabled(bool tessellationFactorScaleEnabled) +_MTL_INLINE NS::Array* MTL::RenderPipelineDescriptor::vertexPreloadedLibraries() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTessellationFactorScaleEnabled_), tessellationFactorScaleEnabled); + return _MTL_msg_NS__Arrayp_vertexPreloadedLibraries((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationFactorStepFunction(MTL::TessellationFactorStepFunction tessellationFactorStepFunction) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setVertexPreloadedLibraries(NS::Array* vertexPreloadedLibraries) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTessellationFactorStepFunction_), tessellationFactorStepFunction); + _MTL_msg_v_setVertexPreloadedLibraries__NS__Arrayp((const void*)this, nullptr, vertexPreloadedLibraries); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationOutputWindingOrder(MTL::Winding tessellationOutputWindingOrder) +_MTL_INLINE NS::Array* MTL::RenderPipelineDescriptor::fragmentPreloadedLibraries() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTessellationOutputWindingOrder_), tessellationOutputWindingOrder); + return _MTL_msg_NS__Arrayp_fragmentPreloadedLibraries((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setTessellationPartitionMode(MTL::TessellationPartitionMode tessellationPartitionMode) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setFragmentPreloadedLibraries(NS::Array* fragmentPreloadedLibraries) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTessellationPartitionMode_), tessellationPartitionMode); + _MTL_msg_v_setFragmentPreloadedLibraries__NS__Arrayp((const void*)this, nullptr, fragmentPreloadedLibraries); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setVertexDescriptor(const MTL::VertexDescriptor* vertexDescriptor) +_MTL_INLINE MTL::LinkedFunctions* MTL::RenderPipelineDescriptor::vertexLinkedFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexDescriptor_), vertexDescriptor); + return _MTL_msg_MTL__LinkedFunctionsp_vertexLinkedFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setVertexFunction(const MTL::Function* vertexFunction) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setVertexLinkedFunctions(MTL::LinkedFunctions* vertexLinkedFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexFunction_), vertexFunction); + _MTL_msg_v_setVertexLinkedFunctions__MTL__LinkedFunctionsp((const void*)this, nullptr, vertexLinkedFunctions); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setVertexLinkedFunctions(const MTL::LinkedFunctions* vertexLinkedFunctions) +_MTL_INLINE MTL::LinkedFunctions* MTL::RenderPipelineDescriptor::fragmentLinkedFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexLinkedFunctions_), vertexLinkedFunctions); + return _MTL_msg_MTL__LinkedFunctionsp_fragmentLinkedFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineDescriptor::setVertexPreloadedLibraries(const NS::Array* vertexPreloadedLibraries) +_MTL_INLINE void MTL::RenderPipelineDescriptor::setFragmentLinkedFunctions(MTL::LinkedFunctions* fragmentLinkedFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexPreloadedLibraries_), vertexPreloadedLibraries); + _MTL_msg_v_setFragmentLinkedFunctions__MTL__LinkedFunctionsp((const void*)this, nullptr, fragmentLinkedFunctions); } -_MTL_INLINE MTL::ShaderValidation MTL::RenderPipelineDescriptor::shaderValidation() const +_MTL_INLINE bool MTL::RenderPipelineDescriptor::supportAddingVertexBinaryFunctions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(shaderValidation)); + return _MTL_msg_bool_supportAddingVertexBinaryFunctions((const void*)this, nullptr); } -_MTL_INLINE MTL::PixelFormat MTL::RenderPipelineDescriptor::stencilAttachmentPixelFormat() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setSupportAddingVertexBinaryFunctions(bool supportAddingVertexBinaryFunctions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stencilAttachmentPixelFormat)); + _MTL_msg_v_setSupportAddingVertexBinaryFunctions__bool((const void*)this, nullptr, supportAddingVertexBinaryFunctions); } _MTL_INLINE bool MTL::RenderPipelineDescriptor::supportAddingFragmentBinaryFunctions() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportAddingFragmentBinaryFunctions)); -} - -_MTL_INLINE bool MTL::RenderPipelineDescriptor::supportAddingVertexBinaryFunctions() const -{ - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportAddingVertexBinaryFunctions)); + return _MTL_msg_bool_supportAddingFragmentBinaryFunctions((const void*)this, nullptr); } -_MTL_INLINE bool MTL::RenderPipelineDescriptor::supportIndirectCommandBuffers() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setSupportAddingFragmentBinaryFunctions(bool supportAddingFragmentBinaryFunctions) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers)); + _MTL_msg_v_setSupportAddingFragmentBinaryFunctions__bool((const void*)this, nullptr, supportAddingFragmentBinaryFunctions); } -_MTL_INLINE MTL::TessellationControlPointIndexType MTL::RenderPipelineDescriptor::tessellationControlPointIndexType() const +_MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::maxVertexCallStackDepth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tessellationControlPointIndexType)); + return _MTL_msg_NS__UInteger_maxVertexCallStackDepth((const void*)this, nullptr); } -_MTL_INLINE MTL::TessellationFactorFormat MTL::RenderPipelineDescriptor::tessellationFactorFormat() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setMaxVertexCallStackDepth(NS::UInteger maxVertexCallStackDepth) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tessellationFactorFormat)); + _MTL_msg_v_setMaxVertexCallStackDepth__NS__UInteger((const void*)this, nullptr, maxVertexCallStackDepth); } -_MTL_INLINE bool MTL::RenderPipelineDescriptor::tessellationFactorScaleEnabled() const +_MTL_INLINE NS::UInteger MTL::RenderPipelineDescriptor::maxFragmentCallStackDepth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isTessellationFactorScaleEnabled)); + return _MTL_msg_NS__UInteger_maxFragmentCallStackDepth((const void*)this, nullptr); } -_MTL_INLINE MTL::TessellationFactorStepFunction MTL::RenderPipelineDescriptor::tessellationFactorStepFunction() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setMaxFragmentCallStackDepth(NS::UInteger maxFragmentCallStackDepth) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tessellationFactorStepFunction)); + _MTL_msg_v_setMaxFragmentCallStackDepth__NS__UInteger((const void*)this, nullptr, maxFragmentCallStackDepth); } -_MTL_INLINE MTL::Winding MTL::RenderPipelineDescriptor::tessellationOutputWindingOrder() const +_MTL_INLINE MTL::ShaderValidation MTL::RenderPipelineDescriptor::shaderValidation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tessellationOutputWindingOrder)); + return _MTL_msg_MTL__ShaderValidation_shaderValidation((const void*)this, nullptr); } -_MTL_INLINE MTL::TessellationPartitionMode MTL::RenderPipelineDescriptor::tessellationPartitionMode() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::setShaderValidation(MTL::ShaderValidation shaderValidation) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tessellationPartitionMode)); + _MTL_msg_v_setShaderValidation__MTL__ShaderValidation((const void*)this, nullptr, shaderValidation); } -_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::RenderPipelineDescriptor::vertexBuffers() const +_MTL_INLINE void MTL::RenderPipelineDescriptor::reset() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexBuffers)); + _MTL_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE MTL::VertexDescriptor* MTL::RenderPipelineDescriptor::vertexDescriptor() const +_MTL_INLINE bool MTL::RenderPipelineDescriptor::isAlphaToCoverageEnabled() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexDescriptor)); + return _MTL_msg_bool_isAlphaToCoverageEnabled((const void*)this, nullptr); } -_MTL_INLINE MTL::Function* MTL::RenderPipelineDescriptor::vertexFunction() const +_MTL_INLINE bool MTL::RenderPipelineDescriptor::isAlphaToOneEnabled() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexFunction)); + return _MTL_msg_bool_isAlphaToOneEnabled((const void*)this, nullptr); } -_MTL_INLINE MTL::LinkedFunctions* MTL::RenderPipelineDescriptor::vertexLinkedFunctions() const +_MTL_INLINE bool MTL::RenderPipelineDescriptor::isRasterizationEnabled() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexLinkedFunctions)); + return _MTL_msg_bool_isRasterizationEnabled((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineDescriptor::vertexPreloadedLibraries() const +_MTL_INLINE bool MTL::RenderPipelineDescriptor::isTessellationFactorScaleEnabled() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexPreloadedLibraries)); + return _MTL_msg_bool_isTessellationFactorScaleEnabled((const void*)this, nullptr); } _MTL_INLINE MTL::RenderPipelineFunctionsDescriptor* MTL::RenderPipelineFunctionsDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPipelineFunctionsDescriptor)); + return _MTL_msg_MTL__RenderPipelineFunctionsDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPipelineFunctionsDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineFunctionsDescriptor::fragmentAdditionalBinaryFunctions() const +_MTL_INLINE MTL::RenderPipelineFunctionsDescriptor* MTL::RenderPipelineFunctionsDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentAdditionalBinaryFunctions)); + return _MTL_msg_MTL__RenderPipelineFunctionsDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPipelineFunctionsDescriptor* MTL::RenderPipelineFunctionsDescriptor::init() +_MTL_INLINE NS::Array* MTL::RenderPipelineFunctionsDescriptor::vertexAdditionalBinaryFunctions() const { - return NS::Object::init(); + return _MTL_msg_NS__Arrayp_vertexAdditionalBinaryFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineFunctionsDescriptor::setFragmentAdditionalBinaryFunctions(const NS::Array* fragmentAdditionalBinaryFunctions) +_MTL_INLINE void MTL::RenderPipelineFunctionsDescriptor::setVertexAdditionalBinaryFunctions(NS::Array* vertexAdditionalBinaryFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentAdditionalBinaryFunctions_), fragmentAdditionalBinaryFunctions); + _MTL_msg_v_setVertexAdditionalBinaryFunctions__NS__Arrayp((const void*)this, nullptr, vertexAdditionalBinaryFunctions); } -_MTL_INLINE void MTL::RenderPipelineFunctionsDescriptor::setTileAdditionalBinaryFunctions(const NS::Array* tileAdditionalBinaryFunctions) +_MTL_INLINE NS::Array* MTL::RenderPipelineFunctionsDescriptor::fragmentAdditionalBinaryFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileAdditionalBinaryFunctions_), tileAdditionalBinaryFunctions); + return _MTL_msg_NS__Arrayp_fragmentAdditionalBinaryFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL::RenderPipelineFunctionsDescriptor::setVertexAdditionalBinaryFunctions(const NS::Array* vertexAdditionalBinaryFunctions) +_MTL_INLINE void MTL::RenderPipelineFunctionsDescriptor::setFragmentAdditionalBinaryFunctions(NS::Array* fragmentAdditionalBinaryFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexAdditionalBinaryFunctions_), vertexAdditionalBinaryFunctions); + _MTL_msg_v_setFragmentAdditionalBinaryFunctions__NS__Arrayp((const void*)this, nullptr, fragmentAdditionalBinaryFunctions); } _MTL_INLINE NS::Array* MTL::RenderPipelineFunctionsDescriptor::tileAdditionalBinaryFunctions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileAdditionalBinaryFunctions)); + return _MTL_msg_NS__Arrayp_tileAdditionalBinaryFunctions((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::RenderPipelineFunctionsDescriptor::vertexAdditionalBinaryFunctions() const +_MTL_INLINE void MTL::RenderPipelineFunctionsDescriptor::setTileAdditionalBinaryFunctions(NS::Array* tileAdditionalBinaryFunctions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(vertexAdditionalBinaryFunctions)); + _MTL_msg_v_setTileAdditionalBinaryFunctions__NS__Arrayp((const void*)this, nullptr, tileAdditionalBinaryFunctions); } -_MTL_INLINE MTL::Device* MTL::RenderPipelineState::device() const +_MTL_INLINE NS::String* MTL::RenderPipelineState::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionHandle* MTL::RenderPipelineState::functionHandle(const NS::String* name, MTL::RenderStages stage) +_MTL_INLINE MTL::Device* MTL::RenderPipelineState::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionHandleWithName_stage_), name, stage); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionHandle* MTL::RenderPipelineState::functionHandle(const MTL4::BinaryFunction* function, MTL::RenderStages stage) +_MTL_INLINE MTL::RenderPipelineReflection* MTL::RenderPipelineState::reflection() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionHandleWithBinaryFunction_stage_), function, stage); + return _MTL_msg_MTL__RenderPipelineReflectionp_reflection((const void*)this, nullptr); } -_MTL_INLINE MTL::FunctionHandle* MTL::RenderPipelineState::functionHandle(const MTL::Function* function, MTL::RenderStages stage) +_MTL_INLINE NS::UInteger MTL::RenderPipelineState::maxTotalThreadsPerThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionHandleWithFunction_stage_), function, stage); + return _MTL_msg_NS__UInteger_maxTotalThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceID MTL::RenderPipelineState::gpuResourceID() const +_MTL_INLINE bool MTL::RenderPipelineState::threadgroupSizeMatchesTileSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_bool_threadgroupSizeMatchesTileSize((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineState::imageblockMemoryLength(MTL::Size imageblockDimensions) +_MTL_INLINE NS::UInteger MTL::RenderPipelineState::imageblockSampleLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(imageblockMemoryLengthForDimensions_), imageblockDimensions); + return _MTL_msg_NS__UInteger_imageblockSampleLength((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineState::imageblockSampleLength() const +_MTL_INLINE bool MTL::RenderPipelineState::supportIndirectCommandBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(imageblockSampleLength)); + return _MTL_msg_bool_supportIndirectCommandBuffers((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::RenderPipelineState::label() const +_MTL_INLINE NS::UInteger MTL::RenderPipelineState::maxTotalThreadsPerObjectThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__UInteger_maxTotalThreadsPerObjectThreadgroup((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineState::maxTotalThreadgroupsPerMeshGrid() const +_MTL_INLINE NS::UInteger MTL::RenderPipelineState::maxTotalThreadsPerMeshThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadgroupsPerMeshGrid)); + return _MTL_msg_NS__UInteger_maxTotalThreadsPerMeshThreadgroup((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineState::maxTotalThreadsPerMeshThreadgroup() const +_MTL_INLINE NS::UInteger MTL::RenderPipelineState::objectThreadExecutionWidth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerMeshThreadgroup)); + return _MTL_msg_NS__UInteger_objectThreadExecutionWidth((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineState::maxTotalThreadsPerObjectThreadgroup() const +_MTL_INLINE NS::UInteger MTL::RenderPipelineState::meshThreadExecutionWidth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerObjectThreadgroup)); + return _MTL_msg_NS__UInteger_meshThreadExecutionWidth((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineState::maxTotalThreadsPerThreadgroup() const +_MTL_INLINE NS::UInteger MTL::RenderPipelineState::maxTotalThreadgroupsPerMeshGrid() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerThreadgroup)); + return _MTL_msg_NS__UInteger_maxTotalThreadgroupsPerMeshGrid((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineState::meshThreadExecutionWidth() const +_MTL_INLINE MTL::ResourceID MTL::RenderPipelineState::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshThreadExecutionWidth)); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } -_MTL_INLINE MTL::IntersectionFunctionTable* MTL::RenderPipelineState::newIntersectionFunctionTable(const MTL::IntersectionFunctionTableDescriptor* descriptor, MTL::RenderStages stage) +_MTL_INLINE MTL::ShaderValidation MTL::RenderPipelineState::shaderValidation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIntersectionFunctionTableWithDescriptor_stage_), descriptor, stage); + return _MTL_msg_MTL__ShaderValidation_shaderValidation((const void*)this, nullptr); } -_MTL_INLINE MTL4::PipelineDescriptor* MTL::RenderPipelineState::newRenderPipelineDescriptor() +_MTL_INLINE MTL::Size MTL::RenderPipelineState::requiredThreadsPerTileThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineDescriptorForSpecialization)); + return _MTL_msg_MTL__Size_requiredThreadsPerTileThreadgroup((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPipelineState* MTL::RenderPipelineState::newRenderPipelineState(const MTL4::RenderPipelineBinaryFunctionsDescriptor* binaryFunctionsDescriptor, NS::Error** error) +_MTL_INLINE MTL::Size MTL::RenderPipelineState::requiredThreadsPerObjectThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithBinaryFunctions_error_), binaryFunctionsDescriptor, error); + return _MTL_msg_MTL__Size_requiredThreadsPerObjectThreadgroup((const void*)this, nullptr); } -_MTL_INLINE MTL::RenderPipelineState* MTL::RenderPipelineState::newRenderPipelineState(const MTL::RenderPipelineFunctionsDescriptor* additionalBinaryFunctions, NS::Error** error) +_MTL_INLINE MTL::Size MTL::RenderPipelineState::requiredThreadsPerMeshThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithAdditionalBinaryFunctions_error_), additionalBinaryFunctions, error); + return _MTL_msg_MTL__Size_requiredThreadsPerMeshThreadgroup((const void*)this, nullptr); } -_MTL_INLINE MTL::VisibleFunctionTable* MTL::RenderPipelineState::newVisibleFunctionTable(const MTL::VisibleFunctionTableDescriptor* descriptor, MTL::RenderStages stage) +_MTL_INLINE MTL::FunctionHandle* MTL::RenderPipelineState::functionHandle(NS::String* name, MTL::RenderStages stage) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newVisibleFunctionTableWithDescriptor_stage_), descriptor, stage); + return _MTL_msg_MTL__FunctionHandlep_functionHandleWithName_stage__NS__Stringp_MTL__RenderStages((const void*)this, nullptr, name, stage); } -_MTL_INLINE NS::UInteger MTL::RenderPipelineState::objectThreadExecutionWidth() const +_MTL_INLINE MTL::FunctionHandle* MTL::RenderPipelineState::functionHandle(MTL4::BinaryFunction* function, MTL::RenderStages stage) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectThreadExecutionWidth)); + return _MTL_msg_MTL__FunctionHandlep_functionHandleWithBinaryFunction_stage__MTL4__BinaryFunctionp_MTL__RenderStages((const void*)this, nullptr, function, stage); } -_MTL_INLINE MTL::RenderPipelineReflection* MTL::RenderPipelineState::reflection() const +_MTL_INLINE MTL::RenderPipelineState* MTL::RenderPipelineState::newRenderPipelineState(MTL4::RenderPipelineBinaryFunctionsDescriptor* binaryFunctionsDescriptor, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(reflection)); + return _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithBinaryFunctions_error__MTL4__RenderPipelineBinaryFunctionsDescriptorp_NS__Errorpp((const void*)this, nullptr, binaryFunctionsDescriptor, error); } -_MTL_INLINE MTL::Size MTL::RenderPipelineState::requiredThreadsPerMeshThreadgroup() const +_MTL_INLINE MTL4::PipelineDescriptor* MTL::RenderPipelineState::newRenderPipelineDescriptorForSpecialization() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerMeshThreadgroup)); + return _MTL_msg_MTL4__PipelineDescriptorp_newRenderPipelineDescriptorForSpecialization((const void*)this, nullptr); } -_MTL_INLINE MTL::Size MTL::RenderPipelineState::requiredThreadsPerObjectThreadgroup() const +_MTL_INLINE NS::UInteger MTL::RenderPipelineState::imageblockMemoryLength(MTL::Size imageblockDimensions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerObjectThreadgroup)); + return _MTL_msg_NS__UInteger_imageblockMemoryLengthForDimensions__MTL__Size((const void*)this, nullptr, imageblockDimensions); } -_MTL_INLINE MTL::Size MTL::RenderPipelineState::requiredThreadsPerTileThreadgroup() const +_MTL_INLINE MTL::FunctionHandle* MTL::RenderPipelineState::functionHandle(MTL::Function* function, MTL::RenderStages stage) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerTileThreadgroup)); + return _MTL_msg_MTL__FunctionHandlep_functionHandleWithFunction_stage__MTL__Functionp_MTL__RenderStages((const void*)this, nullptr, function, stage); } -_MTL_INLINE MTL::ShaderValidation MTL::RenderPipelineState::shaderValidation() const +_MTL_INLINE MTL::VisibleFunctionTable* MTL::RenderPipelineState::newVisibleFunctionTable(MTL::VisibleFunctionTableDescriptor* descriptor, MTL::RenderStages stage) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(shaderValidation)); + return _MTL_msg_MTL__VisibleFunctionTablep_newVisibleFunctionTableWithDescriptor_stage__MTL__VisibleFunctionTableDescriptorp_MTL__RenderStages((const void*)this, nullptr, descriptor, stage); } -_MTL_INLINE bool MTL::RenderPipelineState::supportIndirectCommandBuffers() const +_MTL_INLINE MTL::IntersectionFunctionTable* MTL::RenderPipelineState::newIntersectionFunctionTable(MTL::IntersectionFunctionTableDescriptor* descriptor, MTL::RenderStages stage) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers)); + return _MTL_msg_MTL__IntersectionFunctionTablep_newIntersectionFunctionTableWithDescriptor_stage__MTL__IntersectionFunctionTableDescriptorp_MTL__RenderStages((const void*)this, nullptr, descriptor, stage); } -_MTL_INLINE bool MTL::RenderPipelineState::threadgroupSizeMatchesTileSize() const +_MTL_INLINE MTL::RenderPipelineState* MTL::RenderPipelineState::newRenderPipelineState(MTL::RenderPipelineFunctionsDescriptor* additionalBinaryFunctions, NS::Error** error) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadgroupSizeMatchesTileSize)); + return _MTL_msg_MTL__RenderPipelineStatep_newRenderPipelineStateWithAdditionalBinaryFunctions_error__MTL__RenderPipelineFunctionsDescriptorp_NS__Errorpp((const void*)this, nullptr, additionalBinaryFunctions, error); } _MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptorArray* MTL::RenderPipelineColorAttachmentDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLRenderPipelineColorAttachmentDescriptorArray)); + return _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLRenderPipelineColorAttachmentDescriptorArray, nullptr); } -_MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptorArray* MTL::RenderPipelineColorAttachmentDescriptorArray::init() +_MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptorArray* MTL::RenderPipelineColorAttachmentDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptor* MTL::RenderPipelineColorAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex); + return _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, attachmentIndex); } -_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptorArray::setObject(const MTL::RenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) +_MTL_INLINE void MTL::RenderPipelineColorAttachmentDescriptorArray::setObject(MTL::RenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__RenderPipelineColorAttachmentDescriptorp_NS__UInteger((const void*)this, nullptr, attachment, attachmentIndex); } _MTL_INLINE MTL::TileRenderPipelineColorAttachmentDescriptor* MTL::TileRenderPipelineColorAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLTileRenderPipelineColorAttachmentDescriptor)); + return _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLTileRenderPipelineColorAttachmentDescriptor, nullptr); } -_MTL_INLINE MTL::TileRenderPipelineColorAttachmentDescriptor* MTL::TileRenderPipelineColorAttachmentDescriptor::init() +_MTL_INLINE MTL::TileRenderPipelineColorAttachmentDescriptor* MTL::TileRenderPipelineColorAttachmentDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorp_init((const void*)this, nullptr); } _MTL_INLINE MTL::PixelFormat MTL::TileRenderPipelineColorAttachmentDescriptor::pixelFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(pixelFormat)); + return _MTL_msg_MTL__PixelFormat_pixelFormat((const void*)this, nullptr); } _MTL_INLINE void MTL::TileRenderPipelineColorAttachmentDescriptor::setPixelFormat(MTL::PixelFormat pixelFormat) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPixelFormat_), pixelFormat); + _MTL_msg_v_setPixelFormat__MTL__PixelFormat((const void*)this, nullptr, pixelFormat); } _MTL_INLINE MTL::TileRenderPipelineColorAttachmentDescriptorArray* MTL::TileRenderPipelineColorAttachmentDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLTileRenderPipelineColorAttachmentDescriptorArray)); + return _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLTileRenderPipelineColorAttachmentDescriptorArray, nullptr); } -_MTL_INLINE MTL::TileRenderPipelineColorAttachmentDescriptorArray* MTL::TileRenderPipelineColorAttachmentDescriptorArray::init() +_MTL_INLINE MTL::TileRenderPipelineColorAttachmentDescriptorArray* MTL::TileRenderPipelineColorAttachmentDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::TileRenderPipelineColorAttachmentDescriptor* MTL::TileRenderPipelineColorAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex); + return _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, attachmentIndex); } -_MTL_INLINE void MTL::TileRenderPipelineColorAttachmentDescriptorArray::setObject(const MTL::TileRenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) +_MTL_INLINE void MTL::TileRenderPipelineColorAttachmentDescriptorArray::setObject(MTL::TileRenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__TileRenderPipelineColorAttachmentDescriptorp_NS__UInteger((const void*)this, nullptr, attachment, attachmentIndex); } _MTL_INLINE MTL::TileRenderPipelineDescriptor* MTL::TileRenderPipelineDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLTileRenderPipelineDescriptor)); + return _MTL_msg_MTL__TileRenderPipelineDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLTileRenderPipelineDescriptor, nullptr); } -_MTL_INLINE NS::Array* MTL::TileRenderPipelineDescriptor::binaryArchives() const +_MTL_INLINE MTL::TileRenderPipelineDescriptor* MTL::TileRenderPipelineDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(binaryArchives)); + return _MTL_msg_MTL__TileRenderPipelineDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::TileRenderPipelineColorAttachmentDescriptorArray* MTL::TileRenderPipelineDescriptor::colorAttachments() const +_MTL_INLINE NS::String* MTL::TileRenderPipelineDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(colorAttachments)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::TileRenderPipelineDescriptor* MTL::TileRenderPipelineDescriptor::init() +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setLabel(NS::String* label) { - return NS::Object::init(); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE NS::String* MTL::TileRenderPipelineDescriptor::label() const +_MTL_INLINE MTL::Function* MTL::TileRenderPipelineDescriptor::tileFunction() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__Functionp_tileFunction((const void*)this, nullptr); } -_MTL_INLINE MTL::LinkedFunctions* MTL::TileRenderPipelineDescriptor::linkedFunctions() const +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setTileFunction(MTL::Function* tileFunction) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(linkedFunctions)); + _MTL_msg_v_setTileFunction__MTL__Functionp((const void*)this, nullptr, tileFunction); } -_MTL_INLINE NS::UInteger MTL::TileRenderPipelineDescriptor::maxCallStackDepth() const +_MTL_INLINE NS::UInteger MTL::TileRenderPipelineDescriptor::rasterSampleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxCallStackDepth)); + return _MTL_msg_NS__UInteger_rasterSampleCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::TileRenderPipelineDescriptor::maxTotalThreadsPerThreadgroup() const +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerThreadgroup)); + _MTL_msg_v_setRasterSampleCount__NS__UInteger((const void*)this, nullptr, rasterSampleCount); } -_MTL_INLINE NS::Array* MTL::TileRenderPipelineDescriptor::preloadedLibraries() const +_MTL_INLINE MTL::TileRenderPipelineColorAttachmentDescriptorArray* MTL::TileRenderPipelineDescriptor::colorAttachments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(preloadedLibraries)); + return _MTL_msg_MTL__TileRenderPipelineColorAttachmentDescriptorArrayp_colorAttachments((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::TileRenderPipelineDescriptor::rasterSampleCount() const +_MTL_INLINE bool MTL::TileRenderPipelineDescriptor::threadgroupSizeMatchesTileSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rasterSampleCount)); + return _MTL_msg_bool_threadgroupSizeMatchesTileSize((const void*)this, nullptr); } -_MTL_INLINE MTL::Size MTL::TileRenderPipelineDescriptor::requiredThreadsPerThreadgroup() const +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setThreadgroupSizeMatchesTileSize(bool threadgroupSizeMatchesTileSize) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerThreadgroup)); + _MTL_msg_v_setThreadgroupSizeMatchesTileSize__bool((const void*)this, nullptr, threadgroupSizeMatchesTileSize); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::reset() +_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::TileRenderPipelineDescriptor::tileBuffers() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + return _MTL_msg_MTL__PipelineBufferDescriptorArrayp_tileBuffers((const void*)this, nullptr); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setBinaryArchives(const NS::Array* binaryArchives) +_MTL_INLINE NS::UInteger MTL::TileRenderPipelineDescriptor::maxTotalThreadsPerThreadgroup() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBinaryArchives_), binaryArchives); + return _MTL_msg_NS__UInteger_maxTotalThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setLabel(const NS::String* label) +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setMaxTotalThreadsPerThreadgroup__NS__UInteger((const void*)this, nullptr, maxTotalThreadsPerThreadgroup); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setLinkedFunctions(const MTL::LinkedFunctions* linkedFunctions) +_MTL_INLINE NS::Array* MTL::TileRenderPipelineDescriptor::binaryArchives() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLinkedFunctions_), linkedFunctions); + return _MTL_msg_NS__Arrayp_binaryArchives((const void*)this, nullptr); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setMaxCallStackDepth(NS::UInteger maxCallStackDepth) +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setBinaryArchives(NS::Array* binaryArchives) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxCallStackDepth_), maxCallStackDepth); + _MTL_msg_v_setBinaryArchives__NS__Arrayp((const void*)this, nullptr, binaryArchives); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup) +_MTL_INLINE NS::Array* MTL::TileRenderPipelineDescriptor::preloadedLibraries() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadsPerThreadgroup_), maxTotalThreadsPerThreadgroup); + return _MTL_msg_NS__Arrayp_preloadedLibraries((const void*)this, nullptr); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setPreloadedLibraries(const NS::Array* preloadedLibraries) +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setPreloadedLibraries(NS::Array* preloadedLibraries) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPreloadedLibraries_), preloadedLibraries); + _MTL_msg_v_setPreloadedLibraries__NS__Arrayp((const void*)this, nullptr, preloadedLibraries); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) +_MTL_INLINE MTL::LinkedFunctions* MTL::TileRenderPipelineDescriptor::linkedFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterSampleCount_), rasterSampleCount); + return _MTL_msg_MTL__LinkedFunctionsp_linkedFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup) +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setLinkedFunctions(MTL::LinkedFunctions* linkedFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRequiredThreadsPerThreadgroup_), requiredThreadsPerThreadgroup); + _MTL_msg_v_setLinkedFunctions__MTL__LinkedFunctionsp((const void*)this, nullptr, linkedFunctions); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setShaderValidation(MTL::ShaderValidation shaderValidation) +_MTL_INLINE bool MTL::TileRenderPipelineDescriptor::supportAddingBinaryFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setShaderValidation_), shaderValidation); + return _MTL_msg_bool_supportAddingBinaryFunctions((const void*)this, nullptr); } _MTL_INLINE void MTL::TileRenderPipelineDescriptor::setSupportAddingBinaryFunctions(bool supportAddingBinaryFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportAddingBinaryFunctions_), supportAddingBinaryFunctions); + _MTL_msg_v_setSupportAddingBinaryFunctions__bool((const void*)this, nullptr, supportAddingBinaryFunctions); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setThreadgroupSizeMatchesTileSize(bool threadgroupSizeMatchesTileSize) +_MTL_INLINE NS::UInteger MTL::TileRenderPipelineDescriptor::maxCallStackDepth() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setThreadgroupSizeMatchesTileSize_), threadgroupSizeMatchesTileSize); + return _MTL_msg_NS__UInteger_maxCallStackDepth((const void*)this, nullptr); } -_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setTileFunction(const MTL::Function* tileFunction) +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setMaxCallStackDepth(NS::UInteger maxCallStackDepth) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTileFunction_), tileFunction); + _MTL_msg_v_setMaxCallStackDepth__NS__UInteger((const void*)this, nullptr, maxCallStackDepth); } _MTL_INLINE MTL::ShaderValidation MTL::TileRenderPipelineDescriptor::shaderValidation() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(shaderValidation)); + return _MTL_msg_MTL__ShaderValidation_shaderValidation((const void*)this, nullptr); } -_MTL_INLINE bool MTL::TileRenderPipelineDescriptor::supportAddingBinaryFunctions() const +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setShaderValidation(MTL::ShaderValidation shaderValidation) { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportAddingBinaryFunctions)); + _MTL_msg_v_setShaderValidation__MTL__ShaderValidation((const void*)this, nullptr, shaderValidation); } -_MTL_INLINE bool MTL::TileRenderPipelineDescriptor::threadgroupSizeMatchesTileSize() const +_MTL_INLINE MTL::Size MTL::TileRenderPipelineDescriptor::requiredThreadsPerThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(threadgroupSizeMatchesTileSize)); + return _MTL_msg_MTL__Size_requiredThreadsPerThreadgroup((const void*)this, nullptr); } -_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::TileRenderPipelineDescriptor::tileBuffers() const +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileBuffers)); + _MTL_msg_v_setRequiredThreadsPerThreadgroup__MTL__Size((const void*)this, nullptr, requiredThreadsPerThreadgroup); } -_MTL_INLINE MTL::Function* MTL::TileRenderPipelineDescriptor::tileFunction() const +_MTL_INLINE void MTL::TileRenderPipelineDescriptor::reset() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tileFunction)); + _MTL_msg_v_reset((const void*)this, nullptr); } _MTL_INLINE MTL::MeshRenderPipelineDescriptor* MTL::MeshRenderPipelineDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLMeshRenderPipelineDescriptor)); + return _MTL_msg_MTL__MeshRenderPipelineDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLMeshRenderPipelineDescriptor, nullptr); } -_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::alphaToCoverageEnabled() const +_MTL_INLINE MTL::MeshRenderPipelineDescriptor* MTL::MeshRenderPipelineDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isAlphaToCoverageEnabled)); + return _MTL_msg_MTL__MeshRenderPipelineDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::alphaToOneEnabled() const +_MTL_INLINE NS::String* MTL::MeshRenderPipelineDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isAlphaToOneEnabled)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::MeshRenderPipelineDescriptor::binaryArchives() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(binaryArchives)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptorArray* MTL::MeshRenderPipelineDescriptor::colorAttachments() const +_MTL_INLINE MTL::Function* MTL::MeshRenderPipelineDescriptor::objectFunction() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(colorAttachments)); + return _MTL_msg_MTL__Functionp_objectFunction((const void*)this, nullptr); } -_MTL_INLINE MTL::PixelFormat MTL::MeshRenderPipelineDescriptor::depthAttachmentPixelFormat() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setObjectFunction(MTL::Function* objectFunction) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depthAttachmentPixelFormat)); + _MTL_msg_v_setObjectFunction__MTL__Functionp((const void*)this, nullptr, objectFunction); } -_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::MeshRenderPipelineDescriptor::fragmentBuffers() const +_MTL_INLINE MTL::Function* MTL::MeshRenderPipelineDescriptor::meshFunction() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentBuffers)); + return _MTL_msg_MTL__Functionp_meshFunction((const void*)this, nullptr); } -_MTL_INLINE MTL::Function* MTL::MeshRenderPipelineDescriptor::fragmentFunction() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMeshFunction(MTL::Function* meshFunction) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentFunction)); + _MTL_msg_v_setMeshFunction__MTL__Functionp((const void*)this, nullptr, meshFunction); } -_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::fragmentLinkedFunctions() const +_MTL_INLINE MTL::Function* MTL::MeshRenderPipelineDescriptor::fragmentFunction() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentLinkedFunctions)); + return _MTL_msg_MTL__Functionp_fragmentFunction((const void*)this, nullptr); } -_MTL_INLINE MTL::MeshRenderPipelineDescriptor* MTL::MeshRenderPipelineDescriptor::init() +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setFragmentFunction(MTL::Function* fragmentFunction) { - return NS::Object::init(); + _MTL_msg_v_setFragmentFunction__MTL__Functionp((const void*)this, nullptr, fragmentFunction); } -_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::isAlphaToCoverageEnabled() const +_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::maxTotalThreadsPerObjectThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isAlphaToCoverageEnabled)); + return _MTL_msg_NS__UInteger_maxTotalThreadsPerObjectThreadgroup((const void*)this, nullptr); } -_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::isAlphaToOneEnabled() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMaxTotalThreadsPerObjectThreadgroup(NS::UInteger maxTotalThreadsPerObjectThreadgroup) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isAlphaToOneEnabled)); + _MTL_msg_v_setMaxTotalThreadsPerObjectThreadgroup__NS__UInteger((const void*)this, nullptr, maxTotalThreadsPerObjectThreadgroup); } -_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::isRasterizationEnabled() const +_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::maxTotalThreadsPerMeshThreadgroup() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isRasterizationEnabled)); + return _MTL_msg_NS__UInteger_maxTotalThreadsPerMeshThreadgroup((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::MeshRenderPipelineDescriptor::label() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMaxTotalThreadsPerMeshThreadgroup(NS::UInteger maxTotalThreadsPerMeshThreadgroup) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL_msg_v_setMaxTotalThreadsPerMeshThreadgroup__NS__UInteger((const void*)this, nullptr, maxTotalThreadsPerMeshThreadgroup); } -_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::maxTotalThreadgroupsPerMeshGrid() const +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::objectThreadgroupSizeIsMultipleOfThreadExecutionWidth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadgroupsPerMeshGrid)); + return _MTL_msg_bool_objectThreadgroupSizeIsMultipleOfThreadExecutionWidth((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::maxTotalThreadsPerMeshThreadgroup() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerMeshThreadgroup)); + _MTL_msg_v_setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth__bool((const void*)this, nullptr, objectThreadgroupSizeIsMultipleOfThreadExecutionWidth); } -_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::maxTotalThreadsPerObjectThreadgroup() const +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::meshThreadgroupSizeIsMultipleOfThreadExecutionWidth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxTotalThreadsPerObjectThreadgroup)); + return _MTL_msg_bool_meshThreadgroupSizeIsMultipleOfThreadExecutionWidth((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::maxVertexAmplificationCount() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxVertexAmplificationCount)); + _MTL_msg_v_setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth__bool((const void*)this, nullptr, meshThreadgroupSizeIsMultipleOfThreadExecutionWidth); } -_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::MeshRenderPipelineDescriptor::meshBuffers() const +_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::payloadMemoryLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshBuffers)); + return _MTL_msg_NS__UInteger_payloadMemoryLength((const void*)this, nullptr); } -_MTL_INLINE MTL::Function* MTL::MeshRenderPipelineDescriptor::meshFunction() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setPayloadMemoryLength(NS::UInteger payloadMemoryLength) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshFunction)); + _MTL_msg_v_setPayloadMemoryLength__NS__UInteger((const void*)this, nullptr, payloadMemoryLength); } -_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::meshLinkedFunctions() const +_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::maxTotalThreadgroupsPerMeshGrid() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshLinkedFunctions)); + return _MTL_msg_NS__UInteger_maxTotalThreadgroupsPerMeshGrid((const void*)this, nullptr); } -_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::meshThreadgroupSizeIsMultipleOfThreadExecutionWidth() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMaxTotalThreadgroupsPerMeshGrid(NS::UInteger maxTotalThreadgroupsPerMeshGrid) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshThreadgroupSizeIsMultipleOfThreadExecutionWidth)); + _MTL_msg_v_setMaxTotalThreadgroupsPerMeshGrid__NS__UInteger((const void*)this, nullptr, maxTotalThreadgroupsPerMeshGrid); } _MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::MeshRenderPipelineDescriptor::objectBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectBuffers)); + return _MTL_msg_MTL__PipelineBufferDescriptorArrayp_objectBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL::Function* MTL::MeshRenderPipelineDescriptor::objectFunction() const +_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::MeshRenderPipelineDescriptor::meshBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectFunction)); + return _MTL_msg_MTL__PipelineBufferDescriptorArrayp_meshBuffers((const void*)this, nullptr); } -_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::objectLinkedFunctions() const +_MTL_INLINE MTL::PipelineBufferDescriptorArray* MTL::MeshRenderPipelineDescriptor::fragmentBuffers() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectLinkedFunctions)); + return _MTL_msg_MTL__PipelineBufferDescriptorArrayp_fragmentBuffers((const void*)this, nullptr); } -_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::objectThreadgroupSizeIsMultipleOfThreadExecutionWidth() const +_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::rasterSampleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectThreadgroupSizeIsMultipleOfThreadExecutionWidth)); + return _MTL_msg_NS__UInteger_rasterSampleCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::payloadMemoryLength() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(payloadMemoryLength)); + _MTL_msg_v_setRasterSampleCount__NS__UInteger((const void*)this, nullptr, rasterSampleCount); } -_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::rasterSampleCount() const +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::alphaToCoverageEnabled() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rasterSampleCount)); + return _MTL_msg_bool_alphaToCoverageEnabled((const void*)this, nullptr); } -_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::rasterizationEnabled() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setAlphaToCoverageEnabled(bool alphaToCoverageEnabled) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isRasterizationEnabled)); + _MTL_msg_v_setAlphaToCoverageEnabled__bool((const void*)this, nullptr, alphaToCoverageEnabled); } -_MTL_INLINE MTL::Size MTL::MeshRenderPipelineDescriptor::requiredThreadsPerMeshThreadgroup() const +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::alphaToOneEnabled() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerMeshThreadgroup)); + return _MTL_msg_bool_alphaToOneEnabled((const void*)this, nullptr); } -_MTL_INLINE MTL::Size MTL::MeshRenderPipelineDescriptor::requiredThreadsPerObjectThreadgroup() const +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setAlphaToOneEnabled(bool alphaToOneEnabled) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(requiredThreadsPerObjectThreadgroup)); + _MTL_msg_v_setAlphaToOneEnabled__bool((const void*)this, nullptr, alphaToOneEnabled); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::reset() +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::rasterizationEnabled() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + return _MTL_msg_bool_rasterizationEnabled((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setAlphaToCoverageEnabled(bool alphaToCoverageEnabled) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setRasterizationEnabled(bool rasterizationEnabled) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAlphaToCoverageEnabled_), alphaToCoverageEnabled); + _MTL_msg_v_setRasterizationEnabled__bool((const void*)this, nullptr, rasterizationEnabled); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setAlphaToOneEnabled(bool alphaToOneEnabled) +_MTL_INLINE NS::UInteger MTL::MeshRenderPipelineDescriptor::maxVertexAmplificationCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAlphaToOneEnabled_), alphaToOneEnabled); + return _MTL_msg_NS__UInteger_maxVertexAmplificationCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setBinaryArchives(const NS::Array* binaryArchives) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBinaryArchives_), binaryArchives); + _MTL_msg_v_setMaxVertexAmplificationCount__NS__UInteger((const void*)this, nullptr, maxVertexAmplificationCount); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setDepthAttachmentPixelFormat(MTL::PixelFormat depthAttachmentPixelFormat) +_MTL_INLINE MTL::RenderPipelineColorAttachmentDescriptorArray* MTL::MeshRenderPipelineDescriptor::colorAttachments() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepthAttachmentPixelFormat_), depthAttachmentPixelFormat); + return _MTL_msg_MTL__RenderPipelineColorAttachmentDescriptorArrayp_colorAttachments((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setFragmentFunction(const MTL::Function* fragmentFunction) +_MTL_INLINE MTL::PixelFormat MTL::MeshRenderPipelineDescriptor::depthAttachmentPixelFormat() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentFunction_), fragmentFunction); + return _MTL_msg_MTL__PixelFormat_depthAttachmentPixelFormat((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setFragmentLinkedFunctions(const MTL::LinkedFunctions* fragmentLinkedFunctions) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setDepthAttachmentPixelFormat(MTL::PixelFormat depthAttachmentPixelFormat) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentLinkedFunctions_), fragmentLinkedFunctions); + _MTL_msg_v_setDepthAttachmentPixelFormat__MTL__PixelFormat((const void*)this, nullptr, depthAttachmentPixelFormat); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setLabel(const NS::String* label) +_MTL_INLINE MTL::PixelFormat MTL::MeshRenderPipelineDescriptor::stencilAttachmentPixelFormat() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_MTL__PixelFormat_stencilAttachmentPixelFormat((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMaxTotalThreadgroupsPerMeshGrid(NS::UInteger maxTotalThreadgroupsPerMeshGrid) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setStencilAttachmentPixelFormat(MTL::PixelFormat stencilAttachmentPixelFormat) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadgroupsPerMeshGrid_), maxTotalThreadgroupsPerMeshGrid); + _MTL_msg_v_setStencilAttachmentPixelFormat__MTL__PixelFormat((const void*)this, nullptr, stencilAttachmentPixelFormat); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMaxTotalThreadsPerMeshThreadgroup(NS::UInteger maxTotalThreadsPerMeshThreadgroup) +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::supportIndirectCommandBuffers() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadsPerMeshThreadgroup_), maxTotalThreadsPerMeshThreadgroup); + return _MTL_msg_bool_supportIndirectCommandBuffers((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMaxTotalThreadsPerObjectThreadgroup(NS::UInteger maxTotalThreadsPerObjectThreadgroup) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxTotalThreadsPerObjectThreadgroup_), maxTotalThreadsPerObjectThreadgroup); + _MTL_msg_v_setSupportIndirectCommandBuffers__bool((const void*)this, nullptr, supportIndirectCommandBuffers); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount) +_MTL_INLINE NS::Array* MTL::MeshRenderPipelineDescriptor::binaryArchives() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxVertexAmplificationCount_), maxVertexAmplificationCount); + return _MTL_msg_NS__Arrayp_binaryArchives((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMeshFunction(const MTL::Function* meshFunction) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setBinaryArchives(NS::Array* binaryArchives) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshFunction_), meshFunction); + _MTL_msg_v_setBinaryArchives__NS__Arrayp((const void*)this, nullptr, binaryArchives); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMeshLinkedFunctions(const MTL::LinkedFunctions* meshLinkedFunctions) +_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::objectLinkedFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshLinkedFunctions_), meshLinkedFunctions); + return _MTL_msg_MTL__LinkedFunctionsp_objectLinkedFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool meshThreadgroupSizeIsMultipleOfThreadExecutionWidth) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setObjectLinkedFunctions(MTL::LinkedFunctions* objectLinkedFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth_), meshThreadgroupSizeIsMultipleOfThreadExecutionWidth); + _MTL_msg_v_setObjectLinkedFunctions__MTL__LinkedFunctionsp((const void*)this, nullptr, objectLinkedFunctions); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setObjectFunction(const MTL::Function* objectFunction) +_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::meshLinkedFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectFunction_), objectFunction); + return _MTL_msg_MTL__LinkedFunctionsp_meshLinkedFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setObjectLinkedFunctions(const MTL::LinkedFunctions* objectLinkedFunctions) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMeshLinkedFunctions(MTL::LinkedFunctions* meshLinkedFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectLinkedFunctions_), objectLinkedFunctions); + _MTL_msg_v_setMeshLinkedFunctions__MTL__LinkedFunctionsp((const void*)this, nullptr, meshLinkedFunctions); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth(bool objectThreadgroupSizeIsMultipleOfThreadExecutionWidth) +_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::fragmentLinkedFunctions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth_), objectThreadgroupSizeIsMultipleOfThreadExecutionWidth); + return _MTL_msg_MTL__LinkedFunctionsp_fragmentLinkedFunctions((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setPayloadMemoryLength(NS::UInteger payloadMemoryLength) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setFragmentLinkedFunctions(MTL::LinkedFunctions* fragmentLinkedFunctions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPayloadMemoryLength_), payloadMemoryLength); + _MTL_msg_v_setFragmentLinkedFunctions__MTL__LinkedFunctionsp((const void*)this, nullptr, fragmentLinkedFunctions); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount) +_MTL_INLINE MTL::ShaderValidation MTL::MeshRenderPipelineDescriptor::shaderValidation() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterSampleCount_), rasterSampleCount); + return _MTL_msg_MTL__ShaderValidation_shaderValidation((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setRasterizationEnabled(bool rasterizationEnabled) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setShaderValidation(MTL::ShaderValidation shaderValidation) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRasterizationEnabled_), rasterizationEnabled); + _MTL_msg_v_setShaderValidation__MTL__ShaderValidation((const void*)this, nullptr, shaderValidation); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setRequiredThreadsPerMeshThreadgroup(MTL::Size requiredThreadsPerMeshThreadgroup) +_MTL_INLINE MTL::Size MTL::MeshRenderPipelineDescriptor::requiredThreadsPerObjectThreadgroup() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRequiredThreadsPerMeshThreadgroup_), requiredThreadsPerMeshThreadgroup); + return _MTL_msg_MTL__Size_requiredThreadsPerObjectThreadgroup((const void*)this, nullptr); } _MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setRequiredThreadsPerObjectThreadgroup(MTL::Size requiredThreadsPerObjectThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRequiredThreadsPerObjectThreadgroup_), requiredThreadsPerObjectThreadgroup); + _MTL_msg_v_setRequiredThreadsPerObjectThreadgroup__MTL__Size((const void*)this, nullptr, requiredThreadsPerObjectThreadgroup); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setShaderValidation(MTL::ShaderValidation shaderValidation) +_MTL_INLINE MTL::Size MTL::MeshRenderPipelineDescriptor::requiredThreadsPerMeshThreadgroup() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setShaderValidation_), shaderValidation); + return _MTL_msg_MTL__Size_requiredThreadsPerMeshThreadgroup((const void*)this, nullptr); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setStencilAttachmentPixelFormat(MTL::PixelFormat stencilAttachmentPixelFormat) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setRequiredThreadsPerMeshThreadgroup(MTL::Size requiredThreadsPerMeshThreadgroup) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilAttachmentPixelFormat_), stencilAttachmentPixelFormat); + _MTL_msg_v_setRequiredThreadsPerMeshThreadgroup__MTL__Size((const void*)this, nullptr, requiredThreadsPerMeshThreadgroup); } -_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers) +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::reset() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportIndirectCommandBuffers_), supportIndirectCommandBuffers); + _MTL_msg_v_reset((const void*)this, nullptr); } -_MTL_INLINE MTL::ShaderValidation MTL::MeshRenderPipelineDescriptor::shaderValidation() const +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::isAlphaToCoverageEnabled() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(shaderValidation)); + return _MTL_msg_bool_isAlphaToCoverageEnabled((const void*)this, nullptr); } -_MTL_INLINE MTL::PixelFormat MTL::MeshRenderPipelineDescriptor::stencilAttachmentPixelFormat() const +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::isAlphaToOneEnabled() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stencilAttachmentPixelFormat)); + return _MTL_msg_bool_isAlphaToOneEnabled((const void*)this, nullptr); } -_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::supportIndirectCommandBuffers() const +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::isRasterizationEnabled() { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers)); + return _MTL_msg_bool_isRasterizationEnabled((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLResidencySet.hpp b/thirdparty/metal-cpp/Metal/MTLResidencySet.hpp index d073972d9902..0f16edc8e56f 100644 --- a/thirdparty/metal-cpp/Metal/MTLResidencySet.hpp +++ b/thirdparty/metal-cpp/Metal/MTLResidencySet.hpp @@ -1,178 +1,164 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLResidencySet.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Allocation; + class Device; +} +namespace NS { + class Array; + class String; +} namespace MTL { -class Allocation; -class Device; + class ResidencySetDescriptor; +class ResidencySet; class ResidencySetDescriptor : public NS::Copying { public: static ResidencySetDescriptor* alloc(); + ResidencySetDescriptor* init() const; - ResidencySetDescriptor* init(); - NS::UInteger initialCapacity() const; - - NS::String* label() const; - - void setInitialCapacity(NS::UInteger initialCapacity); + NS::UInteger initialCapacity() const; + NS::String* label() const; + void setInitialCapacity(NS::UInteger initialCapacity); + void setLabel(NS::String* label); - void setLabel(const NS::String* label); }; + class ResidencySet : public NS::Referencing { public: - void addAllocation(const MTL::Allocation* allocation); - void addAllocations(const MTL::Allocation* const allocations[], NS::UInteger count); - + void addAllocation(MTL::Allocation* allocation); + void addAllocations(const MTL::Allocation* const * allocations, NS::UInteger count); NS::Array* allAllocations() const; - uint64_t allocatedSize() const; - NS::UInteger allocationCount() const; - void commit(); - - bool containsAllocation(const MTL::Allocation* anAllocation); - - Device* device() const; - + bool containsAllocation(MTL::Allocation* anAllocation); + MTL::Device* device() const; void endResidency(); - NS::String* label() const; - void removeAllAllocations(); - - void removeAllocation(const MTL::Allocation* allocation); - void removeAllocations(const MTL::Allocation* const allocations[], NS::UInteger count); - + void removeAllocation(MTL::Allocation* allocation); + void removeAllocations(const MTL::Allocation* const * allocations, NS::UInteger count); void requestResidency(); + }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLResidencySetDescriptor; +extern "C" void *OBJC_CLASS_$_MTLResidencySet; + _MTL_INLINE MTL::ResidencySetDescriptor* MTL::ResidencySetDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLResidencySetDescriptor)); + return _MTL_msg_MTL__ResidencySetDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLResidencySetDescriptor, nullptr); } -_MTL_INLINE MTL::ResidencySetDescriptor* MTL::ResidencySetDescriptor::init() +_MTL_INLINE MTL::ResidencySetDescriptor* MTL::ResidencySetDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__ResidencySetDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::ResidencySetDescriptor::initialCapacity() const +_MTL_INLINE NS::String* MTL::ResidencySetDescriptor::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(initialCapacity)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::ResidencySetDescriptor::label() const +_MTL_INLINE void MTL::ResidencySetDescriptor::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE void MTL::ResidencySetDescriptor::setInitialCapacity(NS::UInteger initialCapacity) +_MTL_INLINE NS::UInteger MTL::ResidencySetDescriptor::initialCapacity() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setInitialCapacity_), initialCapacity); + return _MTL_msg_NS__UInteger_initialCapacity((const void*)this, nullptr); } -_MTL_INLINE void MTL::ResidencySetDescriptor::setLabel(const NS::String* label) +_MTL_INLINE void MTL::ResidencySetDescriptor::setInitialCapacity(NS::UInteger initialCapacity) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setInitialCapacity__NS__UInteger((const void*)this, nullptr, initialCapacity); } -_MTL_INLINE void MTL::ResidencySet::addAllocation(const MTL::Allocation* allocation) +_MTL_INLINE MTL::Device* MTL::ResidencySet::device() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addAllocation_), allocation); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE void MTL::ResidencySet::addAllocations(const MTL::Allocation* const allocations[], NS::UInteger count) +_MTL_INLINE NS::String* MTL::ResidencySet::label() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(addAllocations_count_), allocations, count); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::Array* MTL::ResidencySet::allAllocations() const +_MTL_INLINE uint64_t MTL::ResidencySet::allocatedSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allAllocations)); + return _MTL_msg_uint64_t_allocatedSize((const void*)this, nullptr); } -_MTL_INLINE uint64_t MTL::ResidencySet::allocatedSize() const +_MTL_INLINE NS::Array* MTL::ResidencySet::allAllocations() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allocatedSize)); + return _MTL_msg_NS__Arrayp_allAllocations((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::ResidencySet::allocationCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allocationCount)); + return _MTL_msg_NS__UInteger_allocationCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::ResidencySet::commit() +_MTL_INLINE void MTL::ResidencySet::requestResidency() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(commit)); + _MTL_msg_v_requestResidency((const void*)this, nullptr); } -_MTL_INLINE bool MTL::ResidencySet::containsAllocation(const MTL::Allocation* anAllocation) +_MTL_INLINE void MTL::ResidencySet::endResidency() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(containsAllocation_), anAllocation); + _MTL_msg_v_endResidency((const void*)this, nullptr); } -_MTL_INLINE MTL::Device* MTL::ResidencySet::device() const +_MTL_INLINE void MTL::ResidencySet::addAllocation(MTL::Allocation* allocation) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + _MTL_msg_v_addAllocation__MTL__Allocationp((const void*)this, nullptr, allocation); } -_MTL_INLINE void MTL::ResidencySet::endResidency() +_MTL_INLINE void MTL::ResidencySet::addAllocations(const MTL::Allocation* const * allocations, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(endResidency)); + _MTL_msg_v_addAllocations_count__constMTL__Allocationpconstp_NS__UInteger((const void*)this, nullptr, allocations, count); } -_MTL_INLINE NS::String* MTL::ResidencySet::label() const +_MTL_INLINE void MTL::ResidencySet::removeAllocation(MTL::Allocation* allocation) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + _MTL_msg_v_removeAllocation__MTL__Allocationp((const void*)this, nullptr, allocation); } -_MTL_INLINE void MTL::ResidencySet::removeAllAllocations() +_MTL_INLINE void MTL::ResidencySet::removeAllocations(const MTL::Allocation* const * allocations, NS::UInteger count) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(removeAllAllocations)); + _MTL_msg_v_removeAllocations_count__constMTL__Allocationpconstp_NS__UInteger((const void*)this, nullptr, allocations, count); } -_MTL_INLINE void MTL::ResidencySet::removeAllocation(const MTL::Allocation* allocation) +_MTL_INLINE void MTL::ResidencySet::removeAllAllocations() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(removeAllocation_), allocation); + _MTL_msg_v_removeAllAllocations((const void*)this, nullptr); } -_MTL_INLINE void MTL::ResidencySet::removeAllocations(const MTL::Allocation* const allocations[], NS::UInteger count) +_MTL_INLINE bool MTL::ResidencySet::containsAllocation(MTL::Allocation* anAllocation) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(removeAllocations_count_), allocations, count); + return _MTL_msg_bool_containsAllocation__MTL__Allocationp((const void*)this, nullptr, anAllocation); } -_MTL_INLINE void MTL::ResidencySet::requestResidency() +_MTL_INLINE void MTL::ResidencySet::commit() { - Object::sendMessage(this, _MTL_PRIVATE_SEL(requestResidency)); + _MTL_msg_v_commit((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLResource.hpp b/thirdparty/metal-cpp/Metal/MTLResource.hpp index 21e49bb935a6..fed5f8c09b3a 100644 --- a/thirdparty/metal-cpp/Metal/MTLResource.hpp +++ b/thirdparty/metal-cpp/Metal/MTLResource.hpp @@ -1,36 +1,25 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLResource.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLAllocation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLAllocation.hpp" + +namespace MTL { + class Device; + class Heap; +} +namespace NS { + class String; +} namespace MTL { -class Device; -class Heap; + _MTL_ENUM(NS::UInteger, PurgeableState) { PurgeableStateKeepCurrent = 1, PurgeableStateNonVolatile = 2, @@ -56,6 +45,20 @@ _MTL_ENUM(NS::UInteger, HazardTrackingMode) { HazardTrackingModeTracked = 2, }; +_MTL_OPTIONS(NS::UInteger, ResourceOptions) { + ResourceCPUCacheModeDefaultCache = 0, + ResourceCPUCacheModeWriteCombined = 1, + ResourceStorageModeShared = 0, + ResourceStorageModeManaged = 16, + ResourceStorageModePrivate = 32, + ResourceStorageModeMemoryless = 48, + ResourceHazardTrackingModeDefault = 0, + ResourceHazardTrackingModeUntracked = 256, + ResourceHazardTrackingModeTracked = 512, + ResourceOptionCPUCacheModeDefault = ResourceCPUCacheModeDefaultCache, + ResourceOptionCPUCacheModeWriteCombined = ResourceCPUCacheModeWriteCombined, +}; + _MTL_ENUM(NS::Integer, SparsePageSize) { SparsePageSize16 = 101, SparsePageSize64 = 102, @@ -73,118 +76,99 @@ _MTL_ENUM(NS::Integer, TextureSparseTier) { TextureSparseTier2 = 2, }; -_MTL_OPTIONS(NS::UInteger, ResourceOptions) { - ResourceCPUCacheModeDefaultCache = 0, - ResourceCPUCacheModeWriteCombined = 1, - ResourceStorageModeShared = 0, - ResourceStorageModeManaged = 1 << 4, - ResourceStorageModePrivate = 1 << 5, - ResourceStorageModeMemoryless = 1 << 5, - ResourceHazardTrackingModeDefault = 0, - ResourceHazardTrackingModeUntracked = 1 << 8, - ResourceHazardTrackingModeTracked = 1 << 9, - ResourceOptionCPUCacheModeDefault = 0, - ResourceOptionCPUCacheModeWriteCombined = 1, -}; -class Resource : public NS::Referencing +class Resource : public NS::Referencing { public: - NS::UInteger allocatedSize() const; - - CPUCacheMode cpuCacheMode() const; - - Device* device() const; - - HazardTrackingMode hazardTrackingMode() const; - - Heap* heap() const; - NS::UInteger heapOffset() const; - - bool isAliasable(); - - NS::String* label() const; - - void makeAliasable(); + NS::UInteger allocatedSize() const; + MTL::CPUCacheMode cpuCacheMode() const; + MTL::Device* device() const; + MTL::HazardTrackingMode hazardTrackingMode() const; + MTL::Heap* heap() const; + NS::UInteger heapOffset() const; + bool isAliasable(); + NS::String* label() const; + void makeAliasable(); + MTL::ResourceOptions resourceOptions() const; + void setLabel(NS::String* label); + void* setOwner(void* task_id_token); + MTL::PurgeableState setPurgeableState(MTL::PurgeableState state); + MTL::StorageMode storageMode() const; - ResourceOptions resourceOptions() const; - - void setLabel(const NS::String* label); +}; - kern_return_t setOwner(task_id_token_t task_id_token); +} // namespace MTL - PurgeableState setPurgeableState(MTL::PurgeableState state); +// --- Class symbols + inline implementations --- - StorageMode storageMode() const; -}; +extern "C" void *OBJC_CLASS_$_MTLResource; -} -_MTL_INLINE NS::UInteger MTL::Resource::allocatedSize() const +_MTL_INLINE NS::String* MTL::Resource::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allocatedSize)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::CPUCacheMode MTL::Resource::cpuCacheMode() const +_MTL_INLINE void MTL::Resource::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(cpuCacheMode)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } _MTL_INLINE MTL::Device* MTL::Resource::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE MTL::HazardTrackingMode MTL::Resource::hazardTrackingMode() const +_MTL_INLINE MTL::CPUCacheMode MTL::Resource::cpuCacheMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(hazardTrackingMode)); + return _MTL_msg_MTL__CPUCacheMode_cpuCacheMode((const void*)this, nullptr); } -_MTL_INLINE MTL::Heap* MTL::Resource::heap() const +_MTL_INLINE MTL::StorageMode MTL::Resource::storageMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(heap)); + return _MTL_msg_MTL__StorageMode_storageMode((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Resource::heapOffset() const +_MTL_INLINE MTL::HazardTrackingMode MTL::Resource::hazardTrackingMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(heapOffset)); + return _MTL_msg_MTL__HazardTrackingMode_hazardTrackingMode((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Resource::isAliasable() +_MTL_INLINE MTL::ResourceOptions MTL::Resource::resourceOptions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isAliasable)); + return _MTL_msg_MTL__ResourceOptions_resourceOptions((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::Resource::label() const +_MTL_INLINE MTL::Heap* MTL::Resource::heap() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__Heapp_heap((const void*)this, nullptr); } -_MTL_INLINE void MTL::Resource::makeAliasable() +_MTL_INLINE NS::UInteger MTL::Resource::heapOffset() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(makeAliasable)); + return _MTL_msg_NS__UInteger_heapOffset((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceOptions MTL::Resource::resourceOptions() const +_MTL_INLINE NS::UInteger MTL::Resource::allocatedSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resourceOptions)); + return _MTL_msg_NS__UInteger_allocatedSize((const void*)this, nullptr); } -_MTL_INLINE void MTL::Resource::setLabel(const NS::String* label) +_MTL_INLINE MTL::PurgeableState MTL::Resource::setPurgeableState(MTL::PurgeableState state) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_MTL__PurgeableState_setPurgeableState__MTL__PurgeableState((const void*)this, nullptr, state); } -_MTL_INLINE kern_return_t MTL::Resource::setOwner(task_id_token_t task_id_token) +_MTL_INLINE void MTL::Resource::makeAliasable() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(setOwnerWithIdentity_), task_id_token); + _MTL_msg_v_makeAliasable((const void*)this, nullptr); } -_MTL_INLINE MTL::PurgeableState MTL::Resource::setPurgeableState(MTL::PurgeableState state) +_MTL_INLINE bool MTL::Resource::isAliasable() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(setPurgeableState_), state); + return _MTL_msg_bool_isAliasable((const void*)this, nullptr); } -_MTL_INLINE MTL::StorageMode MTL::Resource::storageMode() const +_MTL_INLINE void* MTL::Resource::setOwner(void* task_id_token) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(storageMode)); + return _MTL_msg_voidp_setOwnerWithIdentity__voidp((const void*)this, nullptr, task_id_token); } diff --git a/thirdparty/metal-cpp/Metal/MTLResourceStateCommandEncoder.hpp b/thirdparty/metal-cpp/Metal/MTLResourceStateCommandEncoder.hpp index 3f565c30faaa..af73eacd1e92 100644 --- a/thirdparty/metal-cpp/Metal/MTLResourceStateCommandEncoder.hpp +++ b/thirdparty/metal-cpp/Metal/MTLResourceStateCommandEncoder.hpp @@ -1,98 +1,73 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLResourceStateCommandEncoder.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLCommandEncoder.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" -#include +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "MTLCommandEncoder.hpp" + +namespace MTL { + class Buffer; + class Fence; + class Texture; +} namespace MTL { -class Buffer; -class Fence; -struct Region; -class Texture; + _MTL_ENUM(NS::UInteger, SparseTextureMappingMode) { SparseTextureMappingModeMap = 0, SparseTextureMappingModeUnmap = 1, }; -struct MapIndirectArguments -{ - uint32_t regionOriginX; - uint32_t regionOriginY; - uint32_t regionOriginZ; - uint32_t regionSizeWidth; - uint32_t regionSizeHeight; - uint32_t regionSizeDepth; - uint32_t mipMapLevel; - uint32_t sliceId; -} _MTL_PACKED; - -class ResourceStateCommandEncoder : public NS::Referencing + +class ResourceStateCommandEncoder : public NS::Referencing { public: - void moveTextureMappingsFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin); + void moveTextureMappingsFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin); + void updateFence(MTL::Fence* fence); + void updateTextureMapping(MTL::Texture* texture, MTL::SparseTextureMappingMode const mode, MTL::Region const region, NS::UInteger const mipLevel, NS::UInteger const slice); + void updateTextureMapping(MTL::Texture* texture, MTL::SparseTextureMappingMode const mode, MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); + void updateTextureMappings(MTL::Texture* texture, MTL::SparseTextureMappingMode const mode, const MTL::Region * regions, const NS::UInteger * mipLevels, const NS::UInteger * slices, NS::UInteger numRegions); + void wait(MTL::Fence* fence); - void updateFence(const MTL::Fence* fence); +}; - void updateTextureMapping(const MTL::Texture* texture, const MTL::SparseTextureMappingMode mode, const MTL::Region region, const NS::UInteger mipLevel, const NS::UInteger slice); - void updateTextureMapping(const MTL::Texture* texture, const MTL::SparseTextureMappingMode mode, const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset); - void updateTextureMappings(const MTL::Texture* texture, const MTL::SparseTextureMappingMode mode, const MTL::Region* regions, const NS::UInteger* mipLevels, const NS::UInteger* slices, NS::UInteger numRegions); +} // namespace MTL - void waitForFence(const MTL::Fence* fence); -}; +// --- Class symbols + inline implementations --- -} +extern "C" void *OBJC_CLASS_$_MTLResourceStateCommandEncoder; -_MTL_INLINE void MTL::ResourceStateCommandEncoder::moveTextureMappingsFromTexture(const MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, const MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin) +_MTL_INLINE void MTL::ResourceStateCommandEncoder::updateTextureMappings(MTL::Texture* texture, MTL::SparseTextureMappingMode const mode, const MTL::Region * regions, const NS::UInteger * mipLevels, const NS::UInteger * slices, NS::UInteger numRegions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(moveTextureMappingsFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_), sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin); + _MTL_msg_v_updateTextureMappings_mode_regions_mipLevels_slices_numRegions__MTL__Texturep_MTL__SparseTextureMappingModeconst_constMTL__Regionp_constNS__UIntegerp_constNS__UIntegerp_NS__UInteger((const void*)this, nullptr, texture, mode, regions, mipLevels, slices, numRegions); } -_MTL_INLINE void MTL::ResourceStateCommandEncoder::updateFence(const MTL::Fence* fence) +_MTL_INLINE void MTL::ResourceStateCommandEncoder::updateTextureMapping(MTL::Texture* texture, MTL::SparseTextureMappingMode const mode, MTL::Region const region, NS::UInteger const mipLevel, NS::UInteger const slice) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateFence_), fence); + _MTL_msg_v_updateTextureMapping_mode_region_mipLevel_slice__MTL__Texturep_MTL__SparseTextureMappingModeconst_MTL__Regionconst_NS__UIntegerconst_NS__UIntegerconst((const void*)this, nullptr, texture, mode, region, mipLevel, slice); } -_MTL_INLINE void MTL::ResourceStateCommandEncoder::updateTextureMapping(const MTL::Texture* texture, const MTL::SparseTextureMappingMode mode, const MTL::Region region, const NS::UInteger mipLevel, const NS::UInteger slice) +_MTL_INLINE void MTL::ResourceStateCommandEncoder::updateTextureMapping(MTL::Texture* texture, MTL::SparseTextureMappingMode const mode, MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateTextureMapping_mode_region_mipLevel_slice_), texture, mode, region, mipLevel, slice); + _MTL_msg_v_updateTextureMapping_mode_indirectBuffer_indirectBufferOffset__MTL__Texturep_MTL__SparseTextureMappingModeconst_MTL__Bufferp_NS__UInteger((const void*)this, nullptr, texture, mode, indirectBuffer, indirectBufferOffset); } -_MTL_INLINE void MTL::ResourceStateCommandEncoder::updateTextureMapping(const MTL::Texture* texture, const MTL::SparseTextureMappingMode mode, const MTL::Buffer* indirectBuffer, NS::UInteger indirectBufferOffset) +_MTL_INLINE void MTL::ResourceStateCommandEncoder::updateFence(MTL::Fence* fence) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateTextureMapping_mode_indirectBuffer_indirectBufferOffset_), texture, mode, indirectBuffer, indirectBufferOffset); + _MTL_msg_v_updateFence__MTL__Fencep((const void*)this, nullptr, fence); } -_MTL_INLINE void MTL::ResourceStateCommandEncoder::updateTextureMappings(const MTL::Texture* texture, const MTL::SparseTextureMappingMode mode, const MTL::Region* regions, const NS::UInteger* mipLevels, const NS::UInteger* slices, NS::UInteger numRegions) +_MTL_INLINE void MTL::ResourceStateCommandEncoder::wait(MTL::Fence* fence) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(updateTextureMappings_mode_regions_mipLevels_slices_numRegions_), texture, mode, regions, mipLevels, slices, numRegions); + _MTL_msg_v_waitForFence__MTL__Fencep((const void*)this, nullptr, fence); } -_MTL_INLINE void MTL::ResourceStateCommandEncoder::waitForFence(const MTL::Fence* fence) +_MTL_INLINE void MTL::ResourceStateCommandEncoder::moveTextureMappingsFromTexture(MTL::Texture* sourceTexture, NS::UInteger sourceSlice, NS::UInteger sourceLevel, MTL::Origin sourceOrigin, MTL::Size sourceSize, MTL::Texture* destinationTexture, NS::UInteger destinationSlice, NS::UInteger destinationLevel, MTL::Origin destinationOrigin) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(waitForFence_), fence); + _MTL_msg_v_moveTextureMappingsFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin__MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin_MTL__Size_MTL__Texturep_NS__UInteger_NS__UInteger_MTL__Origin((const void*)this, nullptr, sourceTexture, sourceSlice, sourceLevel, sourceOrigin, sourceSize, destinationTexture, destinationSlice, destinationLevel, destinationOrigin); } diff --git a/thirdparty/metal-cpp/Metal/MTLResourceStatePass.hpp b/thirdparty/metal-cpp/Metal/MTLResourceStatePass.hpp index f3689012ebf1..e8ccd2cfcaea 100644 --- a/thirdparty/metal-cpp/Metal/MTLResourceStatePass.hpp +++ b/thirdparty/metal-cpp/Metal/MTLResourceStatePass.hpp @@ -1,154 +1,146 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLResourceStatePass.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class CounterSampleBuffer; +} namespace MTL { -class CounterSampleBuffer; -class ResourceStatePassDescriptor; + class ResourceStatePassSampleBufferAttachmentDescriptor; class ResourceStatePassSampleBufferAttachmentDescriptorArray; +class ResourceStatePassDescriptor; class ResourceStatePassSampleBufferAttachmentDescriptor : public NS::Copying { public: static ResourceStatePassSampleBufferAttachmentDescriptor* alloc(); + ResourceStatePassSampleBufferAttachmentDescriptor* init() const; - NS::UInteger endOfEncoderSampleIndex() const; - - ResourceStatePassSampleBufferAttachmentDescriptor* init(); + NS::UInteger endOfEncoderSampleIndex() const; + MTL::CounterSampleBuffer* sampleBuffer() const; + void setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex); + void setSampleBuffer(MTL::CounterSampleBuffer* sampleBuffer); + void setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex); + NS::UInteger startOfEncoderSampleIndex() const; - CounterSampleBuffer* sampleBuffer() const; - - void setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex); - - void setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer); - - void setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex); - NS::UInteger startOfEncoderSampleIndex() const; }; + class ResourceStatePassSampleBufferAttachmentDescriptorArray : public NS::Referencing { public: static ResourceStatePassSampleBufferAttachmentDescriptorArray* alloc(); + ResourceStatePassSampleBufferAttachmentDescriptorArray* init() const; - ResourceStatePassSampleBufferAttachmentDescriptorArray* init(); + MTL::ResourceStatePassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); + void setObject(MTL::ResourceStatePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); - ResourceStatePassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); - void setObject(const MTL::ResourceStatePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); }; + class ResourceStatePassDescriptor : public NS::Copying { public: - static ResourceStatePassDescriptor* alloc(); + static ResourceStatePassDescriptor* alloc(); + ResourceStatePassDescriptor* init() const; - ResourceStatePassDescriptor* init(); + static MTL::ResourceStatePassDescriptor* resourceStatePassDescriptor(); - static ResourceStatePassDescriptor* resourceStatePassDescriptor(); + MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; - ResourceStatePassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLResourceStatePassSampleBufferAttachmentDescriptor; +extern "C" void *OBJC_CLASS_$_MTLResourceStatePassSampleBufferAttachmentDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLResourceStatePassDescriptor; + _MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptor* MTL::ResourceStatePassSampleBufferAttachmentDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLResourceStatePassSampleBufferAttachmentDescriptor)); + return _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLResourceStatePassSampleBufferAttachmentDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::ResourceStatePassSampleBufferAttachmentDescriptor::endOfEncoderSampleIndex() const +_MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptor* MTL::ResourceStatePassSampleBufferAttachmentDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(endOfEncoderSampleIndex)); + return _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptor* MTL::ResourceStatePassSampleBufferAttachmentDescriptor::init() +_MTL_INLINE MTL::CounterSampleBuffer* MTL::ResourceStatePassSampleBufferAttachmentDescriptor::sampleBuffer() const { - return NS::Object::init(); + return _MTL_msg_MTL__CounterSampleBufferp_sampleBuffer((const void*)this, nullptr); } -_MTL_INLINE MTL::CounterSampleBuffer* MTL::ResourceStatePassSampleBufferAttachmentDescriptor::sampleBuffer() const +_MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptor::setSampleBuffer(MTL::CounterSampleBuffer* sampleBuffer) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleBuffer)); + _MTL_msg_v_setSampleBuffer__MTL__CounterSampleBufferp((const void*)this, nullptr, sampleBuffer); } -_MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptor::setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex) +_MTL_INLINE NS::UInteger MTL::ResourceStatePassSampleBufferAttachmentDescriptor::startOfEncoderSampleIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setEndOfEncoderSampleIndex_), endOfEncoderSampleIndex); + return _MTL_msg_NS__UInteger_startOfEncoderSampleIndex((const void*)this, nullptr); } -_MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptor::setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer) +_MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptor::setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSampleBuffer_), sampleBuffer); + _MTL_msg_v_setStartOfEncoderSampleIndex__NS__UInteger((const void*)this, nullptr, startOfEncoderSampleIndex); } -_MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptor::setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex) +_MTL_INLINE NS::UInteger MTL::ResourceStatePassSampleBufferAttachmentDescriptor::endOfEncoderSampleIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStartOfEncoderSampleIndex_), startOfEncoderSampleIndex); + return _MTL_msg_NS__UInteger_endOfEncoderSampleIndex((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::ResourceStatePassSampleBufferAttachmentDescriptor::startOfEncoderSampleIndex() const +_MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptor::setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(startOfEncoderSampleIndex)); + _MTL_msg_v_setEndOfEncoderSampleIndex__NS__UInteger((const void*)this, nullptr, endOfEncoderSampleIndex); } _MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLResourceStatePassSampleBufferAttachmentDescriptorArray)); + return _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLResourceStatePassSampleBufferAttachmentDescriptorArray, nullptr); } -_MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray::init() +_MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptor* MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex); + return _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, attachmentIndex); } -_MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray::setObject(const MTL::ResourceStatePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) +_MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray::setObject(MTL::ResourceStatePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__ResourceStatePassSampleBufferAttachmentDescriptorp_NS__UInteger((const void*)this, nullptr, attachment, attachmentIndex); } _MTL_INLINE MTL::ResourceStatePassDescriptor* MTL::ResourceStatePassDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLResourceStatePassDescriptor)); + return _MTL_msg_MTL__ResourceStatePassDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLResourceStatePassDescriptor, nullptr); } -_MTL_INLINE MTL::ResourceStatePassDescriptor* MTL::ResourceStatePassDescriptor::init() +_MTL_INLINE MTL::ResourceStatePassDescriptor* MTL::ResourceStatePassDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__ResourceStatePassDescriptorp_init((const void*)this, nullptr); } _MTL_INLINE MTL::ResourceStatePassDescriptor* MTL::ResourceStatePassDescriptor::resourceStatePassDescriptor() { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLResourceStatePassDescriptor), _MTL_PRIVATE_SEL(resourceStatePassDescriptor)); + return _MTL_msg_MTL__ResourceStatePassDescriptorp_resourceStatePassDescriptor((const void*)&OBJC_CLASS_$_MTLResourceStatePassDescriptor, nullptr); } _MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* MTL::ResourceStatePassDescriptor::sampleBufferAttachments() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleBufferAttachments)); + return _MTL_msg_MTL__ResourceStatePassSampleBufferAttachmentDescriptorArrayp_sampleBufferAttachments((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLResourceViewPool.hpp b/thirdparty/metal-cpp/Metal/MTLResourceViewPool.hpp index aa8bfda35399..dcf053a3a814 100644 --- a/thirdparty/metal-cpp/Metal/MTLResourceViewPool.hpp +++ b/thirdparty/metal-cpp/Metal/MTLResourceViewPool.hpp @@ -1,118 +1,108 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLResourceViewPool.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Device; +} +namespace NS { + class String; +} namespace MTL { -class Device; -class ResourceViewPool; + class ResourceViewPoolDescriptor; +class ResourceViewPool; class ResourceViewPoolDescriptor : public NS::Copying { public: static ResourceViewPoolDescriptor* alloc(); + ResourceViewPoolDescriptor* init() const; - ResourceViewPoolDescriptor* init(); - - NS::String* label() const; - - NS::UInteger resourceViewCount() const; - - void setLabel(const NS::String* label); + NS::String* label() const; + NS::UInteger resourceViewCount() const; + void setLabel(NS::String* label); + void setResourceViewCount(NS::UInteger resourceViewCount); - void setResourceViewCount(NS::UInteger resourceViewCount); }; + class ResourceViewPool : public NS::Referencing { public: - ResourceID baseResourceID() const; + MTL::ResourceID baseResourceID() const; + MTL::ResourceID copyResourceViewsFromPool(MTL::ResourceViewPool* sourcePool, NS::Range sourceRange, NS::UInteger destinationIndex); + MTL::Device* device() const; + NS::String* label() const; + NS::UInteger resourceViewCount() const; - ResourceID copyResourceViewsFromPool(const MTL::ResourceViewPool* sourcePool, NS::Range sourceRange, NS::UInteger destinationIndex); +}; - Device* device() const; +} // namespace MTL - NS::String* label() const; +// --- Class symbols + inline implementations --- - NS::UInteger resourceViewCount() const; -}; +extern "C" void *OBJC_CLASS_$_MTLResourceViewPoolDescriptor; +extern "C" void *OBJC_CLASS_$_MTLResourceViewPool; -} _MTL_INLINE MTL::ResourceViewPoolDescriptor* MTL::ResourceViewPoolDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLResourceViewPoolDescriptor)); + return _MTL_msg_MTL__ResourceViewPoolDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLResourceViewPoolDescriptor, nullptr); } -_MTL_INLINE MTL::ResourceViewPoolDescriptor* MTL::ResourceViewPoolDescriptor::init() +_MTL_INLINE MTL::ResourceViewPoolDescriptor* MTL::ResourceViewPoolDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__ResourceViewPoolDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::ResourceViewPoolDescriptor::label() const +_MTL_INLINE NS::UInteger MTL::ResourceViewPoolDescriptor::resourceViewCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__UInteger_resourceViewCount((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::ResourceViewPoolDescriptor::resourceViewCount() const +_MTL_INLINE void MTL::ResourceViewPoolDescriptor::setResourceViewCount(NS::UInteger resourceViewCount) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resourceViewCount)); + _MTL_msg_v_setResourceViewCount__NS__UInteger((const void*)this, nullptr, resourceViewCount); } -_MTL_INLINE void MTL::ResourceViewPoolDescriptor::setLabel(const NS::String* label) +_MTL_INLINE NS::String* MTL::ResourceViewPoolDescriptor::label() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE void MTL::ResourceViewPoolDescriptor::setResourceViewCount(NS::UInteger resourceViewCount) +_MTL_INLINE void MTL::ResourceViewPoolDescriptor::setLabel(NS::String* label) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setResourceViewCount_), resourceViewCount); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } _MTL_INLINE MTL::ResourceID MTL::ResourceViewPool::baseResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(baseResourceID)); + return _MTL_msg_MTL__ResourceID_baseResourceID((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceID MTL::ResourceViewPool::copyResourceViewsFromPool(const MTL::ResourceViewPool* sourcePool, NS::Range sourceRange, NS::UInteger destinationIndex) +_MTL_INLINE NS::UInteger MTL::ResourceViewPool::resourceViewCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(copyResourceViewsFromPool_sourceRange_destinationIndex_), sourcePool, sourceRange, destinationIndex); + return _MTL_msg_NS__UInteger_resourceViewCount((const void*)this, nullptr); } _MTL_INLINE MTL::Device* MTL::ResourceViewPool::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } _MTL_INLINE NS::String* MTL::ResourceViewPool::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::ResourceViewPool::resourceViewCount() const +_MTL_INLINE MTL::ResourceID MTL::ResourceViewPool::copyResourceViewsFromPool(MTL::ResourceViewPool* sourcePool, NS::Range sourceRange, NS::UInteger destinationIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resourceViewCount)); + return _MTL_msg_MTL__ResourceID_copyResourceViewsFromPool_sourceRange_destinationIndex__MTL__ResourceViewPoolp_NS__Range_NS__UInteger((const void*)this, nullptr, sourcePool, sourceRange, destinationIndex); } diff --git a/thirdparty/metal-cpp/Metal/MTLSampler.hpp b/thirdparty/metal-cpp/Metal/MTLSampler.hpp index f2286656f20a..ef11c321560f 100644 --- a/thirdparty/metal-cpp/Metal/MTLSampler.hpp +++ b/thirdparty/metal-cpp/Metal/MTLSampler.hpp @@ -1,36 +1,24 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLSampler.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLDepthStencil.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" -#include "MTLTypes.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class Device; + enum CompareFunction : NS::UInteger; +} +namespace NS { + class String; +} namespace MTL { -class Device; -class SamplerDescriptor; + _MTL_ENUM(NS::UInteger, SamplerMinMagFilter) { SamplerMinMagFilterNearest = 0, SamplerMinMagFilterLinear = 1, @@ -63,283 +51,260 @@ _MTL_ENUM(NS::UInteger, SamplerReductionMode) { SamplerReductionModeMaximum = 2, }; + +class SamplerDescriptor; +class SamplerState; + class SamplerDescriptor : public NS::Copying { public: static SamplerDescriptor* alloc(); + SamplerDescriptor* init() const; - SamplerBorderColor borderColor() const; - - CompareFunction compareFunction() const; - - SamplerDescriptor* init(); - + MTL::SamplerBorderColor borderColor() const; + MTL::CompareFunction compareFunction() const; NS::String* label() const; - bool lodAverage() const; - float lodBias() const; - float lodMaxClamp() const; - float lodMinClamp() const; - - SamplerMinMagFilter magFilter() const; - + MTL::SamplerMinMagFilter magFilter() const; NS::UInteger maxAnisotropy() const; - - SamplerMinMagFilter minFilter() const; - - SamplerMipFilter mipFilter() const; - + MTL::SamplerMinMagFilter minFilter() const; + MTL::SamplerMipFilter mipFilter() const; bool normalizedCoordinates() const; - - SamplerAddressMode rAddressMode() const; - - SamplerReductionMode reductionMode() const; - - SamplerAddressMode sAddressMode() const; - + MTL::SamplerAddressMode rAddressMode() const; + MTL::SamplerReductionMode reductionMode() const; + MTL::SamplerAddressMode sAddressMode() const; void setBorderColor(MTL::SamplerBorderColor borderColor); - void setCompareFunction(MTL::CompareFunction compareFunction); - - void setLabel(const NS::String* label); - + void setLabel(NS::String* label); void setLodAverage(bool lodAverage); - void setLodBias(float lodBias); - void setLodMaxClamp(float lodMaxClamp); - void setLodMinClamp(float lodMinClamp); - void setMagFilter(MTL::SamplerMinMagFilter magFilter); - void setMaxAnisotropy(NS::UInteger maxAnisotropy); - void setMinFilter(MTL::SamplerMinMagFilter minFilter); - void setMipFilter(MTL::SamplerMipFilter mipFilter); - void setNormalizedCoordinates(bool normalizedCoordinates); - void setRAddressMode(MTL::SamplerAddressMode rAddressMode); - void setReductionMode(MTL::SamplerReductionMode reductionMode); - void setSAddressMode(MTL::SamplerAddressMode sAddressMode); - void setSupportArgumentBuffers(bool supportArgumentBuffers); - void setTAddressMode(MTL::SamplerAddressMode tAddressMode); - bool supportArgumentBuffers() const; + MTL::SamplerAddressMode tAddressMode() const; - SamplerAddressMode tAddressMode() const; }; + class SamplerState : public NS::Referencing { public: - Device* device() const; + MTL::Device* device() const; + MTL::ResourceID gpuResourceID() const; + NS::String* label() const; - ResourceID gpuResourceID() const; - - NS::String* label() const; }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLSamplerDescriptor; +extern "C" void *OBJC_CLASS_$_MTLSamplerState; + _MTL_INLINE MTL::SamplerDescriptor* MTL::SamplerDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLSamplerDescriptor)); + return _MTL_msg_MTL__SamplerDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLSamplerDescriptor, nullptr); } -_MTL_INLINE MTL::SamplerBorderColor MTL::SamplerDescriptor::borderColor() const +_MTL_INLINE MTL::SamplerDescriptor* MTL::SamplerDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(borderColor)); + return _MTL_msg_MTL__SamplerDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::CompareFunction MTL::SamplerDescriptor::compareFunction() const +_MTL_INLINE MTL::SamplerMinMagFilter MTL::SamplerDescriptor::minFilter() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(compareFunction)); + return _MTL_msg_MTL__SamplerMinMagFilter_minFilter((const void*)this, nullptr); } -_MTL_INLINE MTL::SamplerDescriptor* MTL::SamplerDescriptor::init() +_MTL_INLINE void MTL::SamplerDescriptor::setMinFilter(MTL::SamplerMinMagFilter minFilter) { - return NS::Object::init(); + _MTL_msg_v_setMinFilter__MTL__SamplerMinMagFilter((const void*)this, nullptr, minFilter); } -_MTL_INLINE NS::String* MTL::SamplerDescriptor::label() const +_MTL_INLINE MTL::SamplerMinMagFilter MTL::SamplerDescriptor::magFilter() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__SamplerMinMagFilter_magFilter((const void*)this, nullptr); } -_MTL_INLINE bool MTL::SamplerDescriptor::lodAverage() const +_MTL_INLINE void MTL::SamplerDescriptor::setMagFilter(MTL::SamplerMinMagFilter magFilter) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(lodAverage)); + _MTL_msg_v_setMagFilter__MTL__SamplerMinMagFilter((const void*)this, nullptr, magFilter); } -_MTL_INLINE float MTL::SamplerDescriptor::lodBias() const +_MTL_INLINE MTL::SamplerMipFilter MTL::SamplerDescriptor::mipFilter() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(lodBias)); + return _MTL_msg_MTL__SamplerMipFilter_mipFilter((const void*)this, nullptr); } -_MTL_INLINE float MTL::SamplerDescriptor::lodMaxClamp() const +_MTL_INLINE void MTL::SamplerDescriptor::setMipFilter(MTL::SamplerMipFilter mipFilter) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(lodMaxClamp)); + _MTL_msg_v_setMipFilter__MTL__SamplerMipFilter((const void*)this, nullptr, mipFilter); } -_MTL_INLINE float MTL::SamplerDescriptor::lodMinClamp() const +_MTL_INLINE NS::UInteger MTL::SamplerDescriptor::maxAnisotropy() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(lodMinClamp)); + return _MTL_msg_NS__UInteger_maxAnisotropy((const void*)this, nullptr); } -_MTL_INLINE MTL::SamplerMinMagFilter MTL::SamplerDescriptor::magFilter() const +_MTL_INLINE void MTL::SamplerDescriptor::setMaxAnisotropy(NS::UInteger maxAnisotropy) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(magFilter)); + _MTL_msg_v_setMaxAnisotropy__NS__UInteger((const void*)this, nullptr, maxAnisotropy); } -_MTL_INLINE NS::UInteger MTL::SamplerDescriptor::maxAnisotropy() const +_MTL_INLINE MTL::SamplerAddressMode MTL::SamplerDescriptor::sAddressMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxAnisotropy)); + return _MTL_msg_MTL__SamplerAddressMode_sAddressMode((const void*)this, nullptr); } -_MTL_INLINE MTL::SamplerMinMagFilter MTL::SamplerDescriptor::minFilter() const +_MTL_INLINE void MTL::SamplerDescriptor::setSAddressMode(MTL::SamplerAddressMode sAddressMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(minFilter)); + _MTL_msg_v_setSAddressMode__MTL__SamplerAddressMode((const void*)this, nullptr, sAddressMode); } -_MTL_INLINE MTL::SamplerMipFilter MTL::SamplerDescriptor::mipFilter() const +_MTL_INLINE MTL::SamplerAddressMode MTL::SamplerDescriptor::tAddressMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(mipFilter)); + return _MTL_msg_MTL__SamplerAddressMode_tAddressMode((const void*)this, nullptr); } -_MTL_INLINE bool MTL::SamplerDescriptor::normalizedCoordinates() const +_MTL_INLINE void MTL::SamplerDescriptor::setTAddressMode(MTL::SamplerAddressMode tAddressMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(normalizedCoordinates)); + _MTL_msg_v_setTAddressMode__MTL__SamplerAddressMode((const void*)this, nullptr, tAddressMode); } _MTL_INLINE MTL::SamplerAddressMode MTL::SamplerDescriptor::rAddressMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rAddressMode)); + return _MTL_msg_MTL__SamplerAddressMode_rAddressMode((const void*)this, nullptr); } -_MTL_INLINE MTL::SamplerReductionMode MTL::SamplerDescriptor::reductionMode() const +_MTL_INLINE void MTL::SamplerDescriptor::setRAddressMode(MTL::SamplerAddressMode rAddressMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(reductionMode)); + _MTL_msg_v_setRAddressMode__MTL__SamplerAddressMode((const void*)this, nullptr, rAddressMode); } -_MTL_INLINE MTL::SamplerAddressMode MTL::SamplerDescriptor::sAddressMode() const +_MTL_INLINE MTL::SamplerBorderColor MTL::SamplerDescriptor::borderColor() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sAddressMode)); + return _MTL_msg_MTL__SamplerBorderColor_borderColor((const void*)this, nullptr); } _MTL_INLINE void MTL::SamplerDescriptor::setBorderColor(MTL::SamplerBorderColor borderColor) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBorderColor_), borderColor); + _MTL_msg_v_setBorderColor__MTL__SamplerBorderColor((const void*)this, nullptr, borderColor); } -_MTL_INLINE void MTL::SamplerDescriptor::setCompareFunction(MTL::CompareFunction compareFunction) +_MTL_INLINE MTL::SamplerReductionMode MTL::SamplerDescriptor::reductionMode() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCompareFunction_), compareFunction); + return _MTL_msg_MTL__SamplerReductionMode_reductionMode((const void*)this, nullptr); } -_MTL_INLINE void MTL::SamplerDescriptor::setLabel(const NS::String* label) +_MTL_INLINE void MTL::SamplerDescriptor::setReductionMode(MTL::SamplerReductionMode reductionMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLabel_), label); + _MTL_msg_v_setReductionMode__MTL__SamplerReductionMode((const void*)this, nullptr, reductionMode); } -_MTL_INLINE void MTL::SamplerDescriptor::setLodAverage(bool lodAverage) +_MTL_INLINE bool MTL::SamplerDescriptor::normalizedCoordinates() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLodAverage_), lodAverage); + return _MTL_msg_bool_normalizedCoordinates((const void*)this, nullptr); } -_MTL_INLINE void MTL::SamplerDescriptor::setLodBias(float lodBias) +_MTL_INLINE void MTL::SamplerDescriptor::setNormalizedCoordinates(bool normalizedCoordinates) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLodBias_), lodBias); + _MTL_msg_v_setNormalizedCoordinates__bool((const void*)this, nullptr, normalizedCoordinates); } -_MTL_INLINE void MTL::SamplerDescriptor::setLodMaxClamp(float lodMaxClamp) +_MTL_INLINE float MTL::SamplerDescriptor::lodMinClamp() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLodMaxClamp_), lodMaxClamp); + return _MTL_msg_float_lodMinClamp((const void*)this, nullptr); } _MTL_INLINE void MTL::SamplerDescriptor::setLodMinClamp(float lodMinClamp) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLodMinClamp_), lodMinClamp); + _MTL_msg_v_setLodMinClamp__float((const void*)this, nullptr, lodMinClamp); } -_MTL_INLINE void MTL::SamplerDescriptor::setMagFilter(MTL::SamplerMinMagFilter magFilter) +_MTL_INLINE float MTL::SamplerDescriptor::lodMaxClamp() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMagFilter_), magFilter); + return _MTL_msg_float_lodMaxClamp((const void*)this, nullptr); } -_MTL_INLINE void MTL::SamplerDescriptor::setMaxAnisotropy(NS::UInteger maxAnisotropy) +_MTL_INLINE void MTL::SamplerDescriptor::setLodMaxClamp(float lodMaxClamp) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxAnisotropy_), maxAnisotropy); + _MTL_msg_v_setLodMaxClamp__float((const void*)this, nullptr, lodMaxClamp); } -_MTL_INLINE void MTL::SamplerDescriptor::setMinFilter(MTL::SamplerMinMagFilter minFilter) +_MTL_INLINE bool MTL::SamplerDescriptor::lodAverage() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMinFilter_), minFilter); + return _MTL_msg_bool_lodAverage((const void*)this, nullptr); } -_MTL_INLINE void MTL::SamplerDescriptor::setMipFilter(MTL::SamplerMipFilter mipFilter) +_MTL_INLINE void MTL::SamplerDescriptor::setLodAverage(bool lodAverage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMipFilter_), mipFilter); + _MTL_msg_v_setLodAverage__bool((const void*)this, nullptr, lodAverage); } -_MTL_INLINE void MTL::SamplerDescriptor::setNormalizedCoordinates(bool normalizedCoordinates) +_MTL_INLINE float MTL::SamplerDescriptor::lodBias() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setNormalizedCoordinates_), normalizedCoordinates); + return _MTL_msg_float_lodBias((const void*)this, nullptr); } -_MTL_INLINE void MTL::SamplerDescriptor::setRAddressMode(MTL::SamplerAddressMode rAddressMode) +_MTL_INLINE void MTL::SamplerDescriptor::setLodBias(float lodBias) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setRAddressMode_), rAddressMode); + _MTL_msg_v_setLodBias__float((const void*)this, nullptr, lodBias); } -_MTL_INLINE void MTL::SamplerDescriptor::setReductionMode(MTL::SamplerReductionMode reductionMode) +_MTL_INLINE MTL::CompareFunction MTL::SamplerDescriptor::compareFunction() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setReductionMode_), reductionMode); + return _MTL_msg_MTL__CompareFunction_compareFunction((const void*)this, nullptr); } -_MTL_INLINE void MTL::SamplerDescriptor::setSAddressMode(MTL::SamplerAddressMode sAddressMode) +_MTL_INLINE void MTL::SamplerDescriptor::setCompareFunction(MTL::CompareFunction compareFunction) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSAddressMode_), sAddressMode); + _MTL_msg_v_setCompareFunction__MTL__CompareFunction((const void*)this, nullptr, compareFunction); } -_MTL_INLINE void MTL::SamplerDescriptor::setSupportArgumentBuffers(bool supportArgumentBuffers) +_MTL_INLINE bool MTL::SamplerDescriptor::supportArgumentBuffers() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportArgumentBuffers_), supportArgumentBuffers); + return _MTL_msg_bool_supportArgumentBuffers((const void*)this, nullptr); } -_MTL_INLINE void MTL::SamplerDescriptor::setTAddressMode(MTL::SamplerAddressMode tAddressMode) +_MTL_INLINE void MTL::SamplerDescriptor::setSupportArgumentBuffers(bool supportArgumentBuffers) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTAddressMode_), tAddressMode); + _MTL_msg_v_setSupportArgumentBuffers__bool((const void*)this, nullptr, supportArgumentBuffers); } -_MTL_INLINE bool MTL::SamplerDescriptor::supportArgumentBuffers() const +_MTL_INLINE NS::String* MTL::SamplerDescriptor::label() const { - return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportArgumentBuffers)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::SamplerAddressMode MTL::SamplerDescriptor::tAddressMode() const +_MTL_INLINE void MTL::SamplerDescriptor::setLabel(NS::String* label) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tAddressMode)); + _MTL_msg_v_setLabel__NS__Stringp((const void*)this, nullptr, label); } -_MTL_INLINE MTL::Device* MTL::SamplerState::device() const +_MTL_INLINE NS::String* MTL::SamplerState::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceID MTL::SamplerState::gpuResourceID() const +_MTL_INLINE MTL::Device* MTL::SamplerState::device() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } -_MTL_INLINE NS::String* MTL::SamplerState::label() const +_MTL_INLINE MTL::ResourceID MTL::SamplerState::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLStageInputOutputDescriptor.hpp b/thirdparty/metal-cpp/Metal/MTLStageInputOutputDescriptor.hpp index b9a7a48392b8..5408106200b4 100644 --- a/thirdparty/metal-cpp/Metal/MTLStageInputOutputDescriptor.hpp +++ b/thirdparty/metal-cpp/Metal/MTLStageInputOutputDescriptor.hpp @@ -1,38 +1,20 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLStageInputOutputDescriptor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" -#include "MTLArgument.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + enum IndexType : NS::UInteger; +} namespace MTL { -class AttributeDescriptor; -class AttributeDescriptorArray; -class BufferLayoutDescriptor; -class BufferLayoutDescriptorArray; -class StageInputOutputDescriptor; + _MTL_ENUM(NS::UInteger, AttributeFormat) { AttributeFormatInvalid = 0, AttributeFormatUChar2 = 1, @@ -102,255 +84,259 @@ _MTL_ENUM(NS::UInteger, StepFunction) { StepFunctionThreadPositionInGridYIndexed = 8, }; + +class BufferLayoutDescriptor; +class BufferLayoutDescriptorArray; +class AttributeDescriptor; +class AttributeDescriptorArray; +class StageInputOutputDescriptor; + class BufferLayoutDescriptor : public NS::Copying { public: static BufferLayoutDescriptor* alloc(); + BufferLayoutDescriptor* init() const; - BufferLayoutDescriptor* init(); - - void setStepFunction(MTL::StepFunction stepFunction); - - void setStepRate(NS::UInteger stepRate); + void setStepFunction(MTL::StepFunction stepFunction); + void setStepRate(NS::UInteger stepRate); + void setStride(NS::UInteger stride); + MTL::StepFunction stepFunction() const; + NS::UInteger stepRate() const; + NS::UInteger stride() const; - void setStride(NS::UInteger stride); - - StepFunction stepFunction() const; - - NS::UInteger stepRate() const; - - NS::UInteger stride() const; }; + class BufferLayoutDescriptorArray : public NS::Referencing { public: static BufferLayoutDescriptorArray* alloc(); + BufferLayoutDescriptorArray* init() const; - BufferLayoutDescriptorArray* init(); + MTL::BufferLayoutDescriptor* object(NS::UInteger index); + void setObject(MTL::BufferLayoutDescriptor* bufferDesc, NS::UInteger index); - BufferLayoutDescriptor* object(NS::UInteger index); - void setObject(const MTL::BufferLayoutDescriptor* bufferDesc, NS::UInteger index); }; + class AttributeDescriptor : public NS::Copying { public: static AttributeDescriptor* alloc(); + AttributeDescriptor* init() const; - NS::UInteger bufferIndex() const; - - AttributeFormat format() const; - - AttributeDescriptor* init(); - - NS::UInteger offset() const; - - void setBufferIndex(NS::UInteger bufferIndex); + NS::UInteger bufferIndex() const; + MTL::AttributeFormat format() const; + NS::UInteger offset() const; + void setBufferIndex(NS::UInteger bufferIndex); + void setFormat(MTL::AttributeFormat format); + void setOffset(NS::UInteger offset); - void setFormat(MTL::AttributeFormat format); - - void setOffset(NS::UInteger offset); }; + class AttributeDescriptorArray : public NS::Referencing { public: static AttributeDescriptorArray* alloc(); + AttributeDescriptorArray* init() const; - AttributeDescriptorArray* init(); + MTL::AttributeDescriptor* object(NS::UInteger index); + void setObject(MTL::AttributeDescriptor* attributeDesc, NS::UInteger index); - AttributeDescriptor* object(NS::UInteger index); - void setObject(const MTL::AttributeDescriptor* attributeDesc, NS::UInteger index); }; + class StageInputOutputDescriptor : public NS::Copying { public: static StageInputOutputDescriptor* alloc(); + StageInputOutputDescriptor* init() const; - AttributeDescriptorArray* attributes() const; - - NS::UInteger indexBufferIndex() const; + static MTL::StageInputOutputDescriptor* stageInputOutputDescriptor(); - IndexType indexType() const; + MTL::AttributeDescriptorArray* attributes() const; + NS::UInteger indexBufferIndex() const; + MTL::IndexType indexType() const; + MTL::BufferLayoutDescriptorArray* layouts() const; + void reset(); + void setIndexBufferIndex(NS::UInteger indexBufferIndex); + void setIndexType(MTL::IndexType indexType); - StageInputOutputDescriptor* init(); - - BufferLayoutDescriptorArray* layouts() const; - - void reset(); +}; - void setIndexBufferIndex(NS::UInteger indexBufferIndex); +} // namespace MTL - void setIndexType(MTL::IndexType indexType); +// --- Class symbols + inline implementations --- - static StageInputOutputDescriptor* stageInputOutputDescriptor(); -}; +extern "C" void *OBJC_CLASS_$_MTLBufferLayoutDescriptor; +extern "C" void *OBJC_CLASS_$_MTLBufferLayoutDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLAttributeDescriptor; +extern "C" void *OBJC_CLASS_$_MTLAttributeDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLStageInputOutputDescriptor; -} _MTL_INLINE MTL::BufferLayoutDescriptor* MTL::BufferLayoutDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLBufferLayoutDescriptor)); + return _MTL_msg_MTL__BufferLayoutDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLBufferLayoutDescriptor, nullptr); } -_MTL_INLINE MTL::BufferLayoutDescriptor* MTL::BufferLayoutDescriptor::init() +_MTL_INLINE MTL::BufferLayoutDescriptor* MTL::BufferLayoutDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__BufferLayoutDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE void MTL::BufferLayoutDescriptor::setStepFunction(MTL::StepFunction stepFunction) +_MTL_INLINE NS::UInteger MTL::BufferLayoutDescriptor::stride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStepFunction_), stepFunction); + return _MTL_msg_NS__UInteger_stride((const void*)this, nullptr); } -_MTL_INLINE void MTL::BufferLayoutDescriptor::setStepRate(NS::UInteger stepRate) +_MTL_INLINE void MTL::BufferLayoutDescriptor::setStride(NS::UInteger stride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStepRate_), stepRate); + _MTL_msg_v_setStride__NS__UInteger((const void*)this, nullptr, stride); } -_MTL_INLINE void MTL::BufferLayoutDescriptor::setStride(NS::UInteger stride) +_MTL_INLINE MTL::StepFunction MTL::BufferLayoutDescriptor::stepFunction() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStride_), stride); + return _MTL_msg_MTL__StepFunction_stepFunction((const void*)this, nullptr); } -_MTL_INLINE MTL::StepFunction MTL::BufferLayoutDescriptor::stepFunction() const +_MTL_INLINE void MTL::BufferLayoutDescriptor::setStepFunction(MTL::StepFunction stepFunction) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stepFunction)); + _MTL_msg_v_setStepFunction__MTL__StepFunction((const void*)this, nullptr, stepFunction); } _MTL_INLINE NS::UInteger MTL::BufferLayoutDescriptor::stepRate() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stepRate)); + return _MTL_msg_NS__UInteger_stepRate((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::BufferLayoutDescriptor::stride() const +_MTL_INLINE void MTL::BufferLayoutDescriptor::setStepRate(NS::UInteger stepRate) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stride)); + _MTL_msg_v_setStepRate__NS__UInteger((const void*)this, nullptr, stepRate); } _MTL_INLINE MTL::BufferLayoutDescriptorArray* MTL::BufferLayoutDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLBufferLayoutDescriptorArray)); + return _MTL_msg_MTL__BufferLayoutDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLBufferLayoutDescriptorArray, nullptr); } -_MTL_INLINE MTL::BufferLayoutDescriptorArray* MTL::BufferLayoutDescriptorArray::init() +_MTL_INLINE MTL::BufferLayoutDescriptorArray* MTL::BufferLayoutDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__BufferLayoutDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::BufferLayoutDescriptor* MTL::BufferLayoutDescriptorArray::object(NS::UInteger index) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), index); + return _MTL_msg_MTL__BufferLayoutDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, index); } -_MTL_INLINE void MTL::BufferLayoutDescriptorArray::setObject(const MTL::BufferLayoutDescriptor* bufferDesc, NS::UInteger index) +_MTL_INLINE void MTL::BufferLayoutDescriptorArray::setObject(MTL::BufferLayoutDescriptor* bufferDesc, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), bufferDesc, index); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__BufferLayoutDescriptorp_NS__UInteger((const void*)this, nullptr, bufferDesc, index); } _MTL_INLINE MTL::AttributeDescriptor* MTL::AttributeDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAttributeDescriptor)); + return _MTL_msg_MTL__AttributeDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLAttributeDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::AttributeDescriptor::bufferIndex() const +_MTL_INLINE MTL::AttributeDescriptor* MTL::AttributeDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferIndex)); + return _MTL_msg_MTL__AttributeDescriptorp_init((const void*)this, nullptr); } _MTL_INLINE MTL::AttributeFormat MTL::AttributeDescriptor::format() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(format)); + return _MTL_msg_MTL__AttributeFormat_format((const void*)this, nullptr); } -_MTL_INLINE MTL::AttributeDescriptor* MTL::AttributeDescriptor::init() +_MTL_INLINE void MTL::AttributeDescriptor::setFormat(MTL::AttributeFormat format) { - return NS::Object::init(); + _MTL_msg_v_setFormat__MTL__AttributeFormat((const void*)this, nullptr, format); } _MTL_INLINE NS::UInteger MTL::AttributeDescriptor::offset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(offset)); + return _MTL_msg_NS__UInteger_offset((const void*)this, nullptr); } -_MTL_INLINE void MTL::AttributeDescriptor::setBufferIndex(NS::UInteger bufferIndex) +_MTL_INLINE void MTL::AttributeDescriptor::setOffset(NS::UInteger offset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBufferIndex_), bufferIndex); + _MTL_msg_v_setOffset__NS__UInteger((const void*)this, nullptr, offset); } -_MTL_INLINE void MTL::AttributeDescriptor::setFormat(MTL::AttributeFormat format) +_MTL_INLINE NS::UInteger MTL::AttributeDescriptor::bufferIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFormat_), format); + return _MTL_msg_NS__UInteger_bufferIndex((const void*)this, nullptr); } -_MTL_INLINE void MTL::AttributeDescriptor::setOffset(NS::UInteger offset) +_MTL_INLINE void MTL::AttributeDescriptor::setBufferIndex(NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOffset_), offset); + _MTL_msg_v_setBufferIndex__NS__UInteger((const void*)this, nullptr, bufferIndex); } _MTL_INLINE MTL::AttributeDescriptorArray* MTL::AttributeDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAttributeDescriptorArray)); + return _MTL_msg_MTL__AttributeDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLAttributeDescriptorArray, nullptr); } -_MTL_INLINE MTL::AttributeDescriptorArray* MTL::AttributeDescriptorArray::init() +_MTL_INLINE MTL::AttributeDescriptorArray* MTL::AttributeDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__AttributeDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::AttributeDescriptor* MTL::AttributeDescriptorArray::object(NS::UInteger index) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), index); + return _MTL_msg_MTL__AttributeDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, index); } -_MTL_INLINE void MTL::AttributeDescriptorArray::setObject(const MTL::AttributeDescriptor* attributeDesc, NS::UInteger index) +_MTL_INLINE void MTL::AttributeDescriptorArray::setObject(MTL::AttributeDescriptor* attributeDesc, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attributeDesc, index); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__AttributeDescriptorp_NS__UInteger((const void*)this, nullptr, attributeDesc, index); } _MTL_INLINE MTL::StageInputOutputDescriptor* MTL::StageInputOutputDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLStageInputOutputDescriptor)); + return _MTL_msg_MTL__StageInputOutputDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLStageInputOutputDescriptor, nullptr); } -_MTL_INLINE MTL::AttributeDescriptorArray* MTL::StageInputOutputDescriptor::attributes() const +_MTL_INLINE MTL::StageInputOutputDescriptor* MTL::StageInputOutputDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(attributes)); + return _MTL_msg_MTL__StageInputOutputDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::StageInputOutputDescriptor::indexBufferIndex() const +_MTL_INLINE MTL::StageInputOutputDescriptor* MTL::StageInputOutputDescriptor::stageInputOutputDescriptor() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBufferIndex)); + return _MTL_msg_MTL__StageInputOutputDescriptorp_stageInputOutputDescriptor((const void*)&OBJC_CLASS_$_MTLStageInputOutputDescriptor, nullptr); } -_MTL_INLINE MTL::IndexType MTL::StageInputOutputDescriptor::indexType() const +_MTL_INLINE MTL::BufferLayoutDescriptorArray* MTL::StageInputOutputDescriptor::layouts() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); + return _MTL_msg_MTL__BufferLayoutDescriptorArrayp_layouts((const void*)this, nullptr); } -_MTL_INLINE MTL::StageInputOutputDescriptor* MTL::StageInputOutputDescriptor::init() +_MTL_INLINE MTL::AttributeDescriptorArray* MTL::StageInputOutputDescriptor::attributes() const { - return NS::Object::init(); + return _MTL_msg_MTL__AttributeDescriptorArrayp_attributes((const void*)this, nullptr); } -_MTL_INLINE MTL::BufferLayoutDescriptorArray* MTL::StageInputOutputDescriptor::layouts() const +_MTL_INLINE MTL::IndexType MTL::StageInputOutputDescriptor::indexType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(layouts)); + return _MTL_msg_MTL__IndexType_indexType((const void*)this, nullptr); } -_MTL_INLINE void MTL::StageInputOutputDescriptor::reset() +_MTL_INLINE void MTL::StageInputOutputDescriptor::setIndexType(MTL::IndexType indexType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + _MTL_msg_v_setIndexType__MTL__IndexType((const void*)this, nullptr, indexType); } -_MTL_INLINE void MTL::StageInputOutputDescriptor::setIndexBufferIndex(NS::UInteger indexBufferIndex) +_MTL_INLINE NS::UInteger MTL::StageInputOutputDescriptor::indexBufferIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBufferIndex_), indexBufferIndex); + return _MTL_msg_NS__UInteger_indexBufferIndex((const void*)this, nullptr); } -_MTL_INLINE void MTL::StageInputOutputDescriptor::setIndexType(MTL::IndexType indexType) +_MTL_INLINE void MTL::StageInputOutputDescriptor::setIndexBufferIndex(NS::UInteger indexBufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); + _MTL_msg_v_setIndexBufferIndex__NS__UInteger((const void*)this, nullptr, indexBufferIndex); } -_MTL_INLINE MTL::StageInputOutputDescriptor* MTL::StageInputOutputDescriptor::stageInputOutputDescriptor() +_MTL_INLINE void MTL::StageInputOutputDescriptor::reset() { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLStageInputOutputDescriptor), _MTL_PRIVATE_SEL(stageInputOutputDescriptor)); + _MTL_msg_v_reset((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLStructs.hpp b/thirdparty/metal-cpp/Metal/MTLStructs.hpp new file mode 100644 index 000000000000..fab9a05f90a4 --- /dev/null +++ b/thirdparty/metal-cpp/Metal/MTLStructs.hpp @@ -0,0 +1,282 @@ +#pragma once + +#include "MTLDefines.hpp" +#include "../Foundation/NSTypes.hpp" + +namespace MTL { + +using AccelerationStructureInstanceOptions = uint32_t; +enum MotionBorderMode : uint32_t; +enum TextureSwizzle : uint8_t; + +struct Origin { +Origin() = default; +Origin(NS::UInteger x_, NS::UInteger y_, NS::UInteger z_) : x(x_), y(y_), z(z_) {} +static Origin Make(NS::UInteger x_, NS::UInteger y_, NS::UInteger z_) { return Origin(x_, y_, z_); } + NS::UInteger x; + NS::UInteger y; + NS::UInteger z; +} _MTL_PACKED; + +struct Size { +Size() = default; +Size(NS::UInteger w, NS::UInteger h, NS::UInteger d) : width(w), height(h), depth(d) {} +static Size Make(NS::UInteger w, NS::UInteger h, NS::UInteger d) { return Size(w, h, d); } + NS::UInteger width; + NS::UInteger height; + NS::UInteger depth; +} _MTL_PACKED; + +struct Region { +Region() = default; +Region(NS::UInteger x, NS::UInteger width) : origin(x, 0, 0), size(width, 1, 1) {} +Region(NS::UInteger x, NS::UInteger y, NS::UInteger width, NS::UInteger height) : origin(x, y, 0), size(width, height, 1) {} +Region(NS::UInteger x, NS::UInteger y, NS::UInteger z, NS::UInteger width, NS::UInteger height, NS::UInteger depth) + : origin(x, y, z), size(width, height, depth) {} +static Region Make1D(NS::UInteger x, NS::UInteger width) { return Region(x, width); } +static Region Make2D(NS::UInteger x, NS::UInteger y, NS::UInteger width, NS::UInteger height) { return Region(x, y, width, height); } +static Region Make3D(NS::UInteger x, NS::UInteger y, NS::UInteger z, NS::UInteger width, NS::UInteger height, NS::UInteger depth) { + return Region(x, y, z, width, height, depth); +} + MTL::Origin origin; + MTL::Size size; +} _MTL_PACKED; + +struct SamplePosition { +SamplePosition() = default; +SamplePosition(float x_, float y_) : x(x_), y(y_) {} +static SamplePosition Make(float x_, float y_) { return SamplePosition(x_, y_); } + float x; + float y; +} _MTL_PACKED; + +struct ResourceID { + uint64_t _impl; +} _MTL_PACKED; + +struct ClearColor { +ClearColor() = default; +ClearColor(double r, double g, double b, double a) : red(r), green(g), blue(b), alpha(a) {} +static ClearColor Make(double r, double g, double b, double a) { return ClearColor(r, g, b, a); } + double red; + double green; + double blue; + double alpha; +} _MTL_PACKED; + +struct AccelerationStructureMotionInstanceDescriptor { + MTL::AccelerationStructureInstanceOptions options; + uint32_t mask; + uint32_t intersectionFunctionTableOffset; + uint32_t accelerationStructureIndex; + uint32_t userID; + uint32_t motionTransformsStartIndex; + uint32_t motionTransformsCount; + MTL::MotionBorderMode motionStartBorderMode; + MTL::MotionBorderMode motionEndBorderMode; + float motionStartTime; + float motionEndTime; +} _MTL_PACKED; + +struct IndirectAccelerationStructureMotionInstanceDescriptor { + MTL::AccelerationStructureInstanceOptions options; + uint32_t mask; + uint32_t intersectionFunctionTableOffset; + uint32_t userID; + MTL::ResourceID accelerationStructureID; + uint32_t motionTransformsStartIndex; + uint32_t motionTransformsCount; + MTL::MotionBorderMode motionStartBorderMode; + MTL::MotionBorderMode motionEndBorderMode; + float motionStartTime; + float motionEndTime; +} _MTL_PACKED; + +struct DispatchThreadgroupsIndirectArguments { + uint32_t threadgroupsPerGrid[3]; +} _MTL_PACKED; + +struct DispatchThreadsIndirectArguments { + uint32_t threadsPerGrid[3]; + uint32_t threadsPerThreadgroup[3]; +} _MTL_PACKED; + +struct StageInRegionIndirectArguments { + uint32_t stageInOrigin[3]; + uint32_t stageInSize[3]; +} _MTL_PACKED; + +struct CounterResultTimestamp { + uint64_t timestamp; +} _MTL_PACKED; + +struct CounterResultStageUtilization { + uint64_t totalCycles; + uint64_t vertexCycles; + uint64_t tessellationCycles; + uint64_t postTessellationVertexCycles; + uint64_t fragmentCycles; + uint64_t renderTargetCycles; +} _MTL_PACKED; + +struct CounterResultStatistic { + uint64_t tessellationInputPatches; + uint64_t vertexInvocations; + uint64_t postTessellationVertexInvocations; + uint64_t clipperInvocations; + uint64_t clipperPrimitivesOut; + uint64_t fragmentInvocations; + uint64_t fragmentsPassed; + uint64_t computeKernelInvocations; +} _MTL_PACKED; + +struct AccelerationStructureSizes { + NS::UInteger accelerationStructureSize; + NS::UInteger buildScratchBufferSize; + NS::UInteger refitScratchBufferSize; +} _MTL_PACKED; + +struct SizeAndAlign { + NS::UInteger size; + NS::UInteger align; +} _MTL_PACKED; + +struct IndirectCommandBufferExecutionRange { + uint32_t location; + uint32_t length; +} _MTL_PACKED; + +struct IntersectionFunctionBufferArguments { + uint64_t intersectionFunctionBuffer; + uint64_t intersectionFunctionBufferSize; + uint64_t intersectionFunctionStride; +} _MTL_PACKED; + +struct ScissorRect { + NS::UInteger x; + NS::UInteger y; + NS::UInteger width; + NS::UInteger height; +} _MTL_PACKED; + +struct Viewport { + double originX; + double originY; + double width; + double height; + double znear; + double zfar; +} _MTL_PACKED; + +struct DrawPrimitivesIndirectArguments { + uint32_t vertexCount; + uint32_t instanceCount; + uint32_t vertexStart; + uint32_t baseInstance; +} _MTL_PACKED; + +struct DrawIndexedPrimitivesIndirectArguments { + uint32_t indexCount; + uint32_t instanceCount; + uint32_t indexStart; + int32_t baseVertex; + uint32_t baseInstance; +} _MTL_PACKED; + +struct VertexAmplificationViewMapping { + uint32_t viewportArrayIndexOffset; + uint32_t renderTargetArrayIndexOffset; +} _MTL_PACKED; + +struct DrawPatchIndirectArguments { + uint32_t patchCount; + uint32_t instanceCount; + uint32_t patchStart; + uint32_t baseInstance; +} _MTL_PACKED; + +struct QuadTessellationFactorsHalf { + uint16_t edgeTessellationFactor[4]; + uint16_t insideTessellationFactor[2]; +} _MTL_PACKED; + +struct TriangleTessellationFactorsHalf { + uint16_t edgeTessellationFactor[3]; + uint16_t insideTessellationFactor; +} _MTL_PACKED; + +struct MapIndirectArguments { + uint32_t regionOriginX; + uint32_t regionOriginY; + uint32_t regionOriginZ; + uint32_t regionSizeWidth; + uint32_t regionSizeHeight; + uint32_t regionSizeDepth; + uint32_t mipMapLevel; + uint32_t sliceId; +} _MTL_PACKED; + +struct TextureSwizzleChannels { +TextureSwizzleChannels() = default; +TextureSwizzleChannels(MTL::TextureSwizzle r, MTL::TextureSwizzle g, MTL::TextureSwizzle b, MTL::TextureSwizzle a) + : red(r), green(g), blue(b), alpha(a) {} +static TextureSwizzleChannels Default() { return TextureSwizzleChannels(); } +static TextureSwizzleChannels Make(MTL::TextureSwizzle r, MTL::TextureSwizzle g, MTL::TextureSwizzle b, MTL::TextureSwizzle a) { + return TextureSwizzleChannels(r, g, b, a); +} + MTL::TextureSwizzle red; + MTL::TextureSwizzle green; + MTL::TextureSwizzle blue; + MTL::TextureSwizzle alpha; +} _MTL_PACKED; + +using Coordinate2D = SamplePosition; + +} // MTL + +#include "MTLDefines.hpp" +#include "MTLGPUAddress.hpp" +#include "MTLAccelerationStructureTypes.hpp" +#include "MTLPrivate.hpp" + +namespace MTL { + +struct AccelerationStructureInstanceDescriptor { + MTL::PackedFloat4x3 transformationMatrix; + MTL::AccelerationStructureInstanceOptions options; + uint32_t mask; + uint32_t intersectionFunctionTableOffset; + uint32_t accelerationStructureIndex; +} _MTL_PACKED; + +struct AccelerationStructureUserIDInstanceDescriptor { + MTL::PackedFloat4x3 transformationMatrix; + MTL::AccelerationStructureInstanceOptions options; + uint32_t mask; + uint32_t intersectionFunctionTableOffset; + uint32_t accelerationStructureIndex; + uint32_t userID; +} _MTL_PACKED; + +struct IndirectAccelerationStructureInstanceDescriptor { + MTL::PackedFloat4x3 transformationMatrix; + MTL::AccelerationStructureInstanceOptions options; + uint32_t mask; + uint32_t intersectionFunctionTableOffset; + uint32_t userID; + MTL::ResourceID accelerationStructureID; +} _MTL_PACKED; + +using PackedFloat4x3 = PackedFloat4x3; +using AxisAlignedBoundingBox = AxisAlignedBoundingBox; +using CommonCounter = NS::String*; +using CommonCounterSet = NS::String*; +using DeviceNotificationName = NS::String*; +using Timestamp = uint64_t; +using NSDeviceCertification = NS::Integer; +using NSProcessPerformanceProfile = NS::Integer; +using AutoreleasedRenderPipelineReflection = RenderPipelineReflection*; +using AutoreleasedComputePipelineReflection = ComputePipelineReflection*; +using AutoreleasedArgument = Argument*; + +} // MTL diff --git a/thirdparty/metal-cpp/Metal/MTLTensor.hpp b/thirdparty/metal-cpp/Metal/MTLTensor.hpp index 221b8c9f152f..9948faec0c24 100644 --- a/thirdparty/metal-cpp/Metal/MTLTensor.hpp +++ b/thirdparty/metal-cpp/Metal/MTLTensor.hpp @@ -1,51 +1,39 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLTensor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLResource.hpp" -#include "MTLTypes.hpp" + +namespace MTL { + class Buffer; + enum CPUCacheMode : NS::UInteger; + enum HazardTrackingMode : NS::UInteger; + using ResourceOptions = NS::UInteger; + enum StorageMode : NS::UInteger; +} namespace MTL { -class Buffer; -class TensorDescriptor; -class TensorExtents; - -_MTL_CONST(NS::ErrorDomain, TensorDomain); +extern NS::ErrorDomain const TensorDomain __asm__("_MTLTensorDomain"); _MTL_ENUM(NS::Integer, TensorDataType) { - TensorDataTypeNone = 0, - TensorDataTypeFloat32 = 3, - TensorDataTypeFloat16 = 16, - TensorDataTypeBFloat16 = 121, - TensorDataTypeInt8 = 45, - TensorDataTypeUInt8 = 49, - TensorDataTypeInt16 = 37, - TensorDataTypeUInt16 = 41, - TensorDataTypeInt32 = 29, - TensorDataTypeUInt32 = 33, + TensorDataTypeNone = DataTypeNone, + TensorDataTypeFloat32 = DataTypeFloat, + TensorDataTypeFloat16 = DataTypeHalf, + TensorDataTypeBFloat16 = DataTypeBFloat, + TensorDataTypeInt8 = DataTypeChar, + TensorDataTypeUInt8 = DataTypeUChar, + TensorDataTypeInt16 = DataTypeShort, + TensorDataTypeUInt16 = DataTypeUShort, + TensorDataTypeInt32 = DataTypeInt, + TensorDataTypeUInt32 = DataTypeUInt, + TensorDataTypeInt4 = 143, + TensorDataTypeUInt4 = 144, }; _MTL_ENUM(NS::Integer, TensorError) { @@ -55,243 +43,232 @@ _MTL_ENUM(NS::Integer, TensorError) { }; _MTL_OPTIONS(NS::UInteger, TensorUsage) { - TensorUsageCompute = 1, + TensorUsageCompute = 1 << 0, TensorUsageRender = 1 << 1, TensorUsageMachineLearning = 1 << 2, }; + +class TensorExtents; +class TensorDescriptor; +class Tensor; + class TensorExtents : public NS::Referencing { public: static TensorExtents* alloc(); + TensorExtents* init() const; - NS::Integer extentAtDimensionIndex(NS::UInteger dimensionIndex); + NS::Integer extent(NS::UInteger dimensionIndex); + MTL::TensorExtents* init(NS::UInteger rank, const NS::Integer * values); + NS::UInteger rank() const; - TensorExtents* init(); - TensorExtents* init(NS::UInteger rank, const NS::Integer* values); - - NS::UInteger rank() const; }; + class TensorDescriptor : public NS::Copying { public: static TensorDescriptor* alloc(); + TensorDescriptor* init() const; + + MTL::CPUCacheMode cpuCacheMode() const; + MTL::TensorDataType dataType() const; + MTL::TensorExtents* dimensions() const; + MTL::HazardTrackingMode hazardTrackingMode() const; + MTL::ResourceOptions resourceOptions() const; + void setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode); + void setDataType(MTL::TensorDataType dataType); + void setDimensions(MTL::TensorExtents* dimensions); + void setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode); + void setResourceOptions(MTL::ResourceOptions resourceOptions); + void setStorageMode(MTL::StorageMode storageMode); + void setStrides(MTL::TensorExtents* strides); + void setUsage(MTL::TensorUsage usage); + MTL::StorageMode storageMode() const; + MTL::TensorExtents* strides() const; + MTL::TensorUsage usage() const; - CPUCacheMode cpuCacheMode() const; - - TensorDataType dataType() const; - - TensorExtents* dimensions() const; - - HazardTrackingMode hazardTrackingMode() const; - - TensorDescriptor* init(); - - ResourceOptions resourceOptions() const; - - void setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode); - - void setDataType(MTL::TensorDataType dataType); - - void setDimensions(const MTL::TensorExtents* dimensions); - - void setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode); - - void setResourceOptions(MTL::ResourceOptions resourceOptions); - - void setStorageMode(MTL::StorageMode storageMode); - - void setStrides(const MTL::TensorExtents* strides); - - void setUsage(MTL::TensorUsage usage); - - StorageMode storageMode() const; - - TensorExtents* strides() const; - - TensorUsage usage() const; }; -class Tensor : public NS::Referencing + +class Tensor : public NS::Referencing { public: - Buffer* buffer() const; - NS::UInteger bufferOffset() const; - - TensorDataType dataType() const; + MTL::Buffer* buffer() const; + NS::UInteger bufferOffset() const; + MTL::TensorDataType dataType() const; + MTL::TensorExtents* dimensions() const; + void getBytes(void * bytes, MTL::TensorExtents* strides, MTL::TensorExtents* sliceOrigin, MTL::TensorExtents* sliceDimensions); + MTL::ResourceID gpuResourceID() const; + void replace(MTL::TensorExtents* sliceOrigin, MTL::TensorExtents* sliceDimensions, const void * bytes, MTL::TensorExtents* strides); + MTL::TensorExtents* strides() const; + MTL::TensorUsage usage() const; - TensorExtents* dimensions() const; - - void getBytes(void* bytes, const MTL::TensorExtents* strides, const MTL::TensorExtents* sliceOrigin, const MTL::TensorExtents* sliceDimensions); - - ResourceID gpuResourceID() const; - - void replaceSliceOrigin(const MTL::TensorExtents* sliceOrigin, const MTL::TensorExtents* sliceDimensions, const void* bytes, const MTL::TensorExtents* strides); - - TensorExtents* strides() const; - - TensorUsage usage() const; }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- -_MTL_PRIVATE_DEF_CONST(NS::ErrorDomain, TensorDomain); +extern "C" void *OBJC_CLASS_$_MTLTensorExtents; +extern "C" void *OBJC_CLASS_$_MTLTensorDescriptor; +extern "C" void *OBJC_CLASS_$_MTLTensor; _MTL_INLINE MTL::TensorExtents* MTL::TensorExtents::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLTensorExtents)); + return _MTL_msg_MTL__TensorExtentsp_alloc((const void*)&OBJC_CLASS_$_MTLTensorExtents, nullptr); } -_MTL_INLINE NS::Integer MTL::TensorExtents::extentAtDimensionIndex(NS::UInteger dimensionIndex) +_MTL_INLINE MTL::TensorExtents* MTL::TensorExtents::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(extentAtDimensionIndex_), dimensionIndex); + return _MTL_msg_MTL__TensorExtentsp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorExtents* MTL::TensorExtents::init() +_MTL_INLINE NS::UInteger MTL::TensorExtents::rank() const { - return NS::Object::init(); + return _MTL_msg_NS__UInteger_rank((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorExtents* MTL::TensorExtents::init(NS::UInteger rank, const NS::Integer* values) +_MTL_INLINE MTL::TensorExtents* MTL::TensorExtents::init(NS::UInteger rank, const NS::Integer * values) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(initWithRank_values_), rank, values); + return _MTL_msg_MTL__TensorExtentsp_initWithRank_values__NS__UInteger_constNS__Integerp((const void*)this, nullptr, rank, values); } -_MTL_INLINE NS::UInteger MTL::TensorExtents::rank() const +_MTL_INLINE NS::Integer MTL::TensorExtents::extent(NS::UInteger dimensionIndex) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rank)); + return _MTL_msg_NS__Integer_extentAtDimensionIndex__NS__UInteger((const void*)this, nullptr, dimensionIndex); } _MTL_INLINE MTL::TensorDescriptor* MTL::TensorDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLTensorDescriptor)); + return _MTL_msg_MTL__TensorDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLTensorDescriptor, nullptr); } -_MTL_INLINE MTL::CPUCacheMode MTL::TensorDescriptor::cpuCacheMode() const +_MTL_INLINE MTL::TensorDescriptor* MTL::TensorDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(cpuCacheMode)); + return _MTL_msg_MTL__TensorDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorDataType MTL::TensorDescriptor::dataType() const +_MTL_INLINE MTL::TensorExtents* MTL::TensorDescriptor::dimensions() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dataType)); + return _MTL_msg_MTL__TensorExtentsp_dimensions((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorExtents* MTL::TensorDescriptor::dimensions() const +_MTL_INLINE void MTL::TensorDescriptor::setDimensions(MTL::TensorExtents* dimensions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dimensions)); + _MTL_msg_v_setDimensions__MTL__TensorExtentsp((const void*)this, nullptr, dimensions); } -_MTL_INLINE MTL::HazardTrackingMode MTL::TensorDescriptor::hazardTrackingMode() const +_MTL_INLINE MTL::TensorExtents* MTL::TensorDescriptor::strides() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(hazardTrackingMode)); + return _MTL_msg_MTL__TensorExtentsp_strides((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorDescriptor* MTL::TensorDescriptor::init() +_MTL_INLINE void MTL::TensorDescriptor::setStrides(MTL::TensorExtents* strides) { - return NS::Object::init(); + _MTL_msg_v_setStrides__MTL__TensorExtentsp((const void*)this, nullptr, strides); } -_MTL_INLINE MTL::ResourceOptions MTL::TensorDescriptor::resourceOptions() const +_MTL_INLINE MTL::TensorDataType MTL::TensorDescriptor::dataType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resourceOptions)); + return _MTL_msg_MTL__TensorDataType_dataType((const void*)this, nullptr); } -_MTL_INLINE void MTL::TensorDescriptor::setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode) +_MTL_INLINE void MTL::TensorDescriptor::setDataType(MTL::TensorDataType dataType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCpuCacheMode_), cpuCacheMode); + _MTL_msg_v_setDataType__MTL__TensorDataType((const void*)this, nullptr, dataType); } -_MTL_INLINE void MTL::TensorDescriptor::setDataType(MTL::TensorDataType dataType) +_MTL_INLINE MTL::TensorUsage MTL::TensorDescriptor::usage() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDataType_), dataType); + return _MTL_msg_MTL__TensorUsage_usage((const void*)this, nullptr); } -_MTL_INLINE void MTL::TensorDescriptor::setDimensions(const MTL::TensorExtents* dimensions) +_MTL_INLINE void MTL::TensorDescriptor::setUsage(MTL::TensorUsage usage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDimensions_), dimensions); + _MTL_msg_v_setUsage__MTL__TensorUsage((const void*)this, nullptr, usage); } -_MTL_INLINE void MTL::TensorDescriptor::setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode) +_MTL_INLINE MTL::ResourceOptions MTL::TensorDescriptor::resourceOptions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setHazardTrackingMode_), hazardTrackingMode); + return _MTL_msg_MTL__ResourceOptions_resourceOptions((const void*)this, nullptr); } _MTL_INLINE void MTL::TensorDescriptor::setResourceOptions(MTL::ResourceOptions resourceOptions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setResourceOptions_), resourceOptions); + _MTL_msg_v_setResourceOptions__MTL__ResourceOptions((const void*)this, nullptr, resourceOptions); } -_MTL_INLINE void MTL::TensorDescriptor::setStorageMode(MTL::StorageMode storageMode) +_MTL_INLINE MTL::CPUCacheMode MTL::TensorDescriptor::cpuCacheMode() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStorageMode_), storageMode); + return _MTL_msg_MTL__CPUCacheMode_cpuCacheMode((const void*)this, nullptr); } -_MTL_INLINE void MTL::TensorDescriptor::setStrides(const MTL::TensorExtents* strides) +_MTL_INLINE void MTL::TensorDescriptor::setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStrides_), strides); + _MTL_msg_v_setCpuCacheMode__MTL__CPUCacheMode((const void*)this, nullptr, cpuCacheMode); } -_MTL_INLINE void MTL::TensorDescriptor::setUsage(MTL::TensorUsage usage) +_MTL_INLINE MTL::StorageMode MTL::TensorDescriptor::storageMode() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setUsage_), usage); + return _MTL_msg_MTL__StorageMode_storageMode((const void*)this, nullptr); } -_MTL_INLINE MTL::StorageMode MTL::TensorDescriptor::storageMode() const +_MTL_INLINE void MTL::TensorDescriptor::setStorageMode(MTL::StorageMode storageMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(storageMode)); + _MTL_msg_v_setStorageMode__MTL__StorageMode((const void*)this, nullptr, storageMode); } -_MTL_INLINE MTL::TensorExtents* MTL::TensorDescriptor::strides() const +_MTL_INLINE MTL::HazardTrackingMode MTL::TensorDescriptor::hazardTrackingMode() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(strides)); + return _MTL_msg_MTL__HazardTrackingMode_hazardTrackingMode((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorUsage MTL::TensorDescriptor::usage() const +_MTL_INLINE void MTL::TensorDescriptor::setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(usage)); + _MTL_msg_v_setHazardTrackingMode__MTL__HazardTrackingMode((const void*)this, nullptr, hazardTrackingMode); } -_MTL_INLINE MTL::Buffer* MTL::Tensor::buffer() const +_MTL_INLINE MTL::ResourceID MTL::Tensor::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(buffer)); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Tensor::bufferOffset() const +_MTL_INLINE MTL::Buffer* MTL::Tensor::buffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferOffset)); + return _MTL_msg_MTL__Bufferp_buffer((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorDataType MTL::Tensor::dataType() const +_MTL_INLINE NS::UInteger MTL::Tensor::bufferOffset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dataType)); + return _MTL_msg_NS__UInteger_bufferOffset((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorExtents* MTL::Tensor::dimensions() const +_MTL_INLINE MTL::TensorExtents* MTL::Tensor::strides() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(dimensions)); + return _MTL_msg_MTL__TensorExtentsp_strides((const void*)this, nullptr); } -_MTL_INLINE void MTL::Tensor::getBytes(void* bytes, const MTL::TensorExtents* strides, const MTL::TensorExtents* sliceOrigin, const MTL::TensorExtents* sliceDimensions) +_MTL_INLINE MTL::TensorExtents* MTL::Tensor::dimensions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(getBytes_strides_fromSliceOrigin_sliceDimensions_), bytes, strides, sliceOrigin, sliceDimensions); + return _MTL_msg_MTL__TensorExtentsp_dimensions((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceID MTL::Tensor::gpuResourceID() const +_MTL_INLINE MTL::TensorDataType MTL::Tensor::dataType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_MTL__TensorDataType_dataType((const void*)this, nullptr); } -_MTL_INLINE void MTL::Tensor::replaceSliceOrigin(const MTL::TensorExtents* sliceOrigin, const MTL::TensorExtents* sliceDimensions, const void* bytes, const MTL::TensorExtents* strides) +_MTL_INLINE MTL::TensorUsage MTL::Tensor::usage() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(replaceSliceOrigin_sliceDimensions_withBytes_strides_), sliceOrigin, sliceDimensions, bytes, strides); + return _MTL_msg_MTL__TensorUsage_usage((const void*)this, nullptr); } -_MTL_INLINE MTL::TensorExtents* MTL::Tensor::strides() const +_MTL_INLINE void MTL::Tensor::replace(MTL::TensorExtents* sliceOrigin, MTL::TensorExtents* sliceDimensions, const void * bytes, MTL::TensorExtents* strides) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(strides)); + _MTL_msg_v_replaceSliceOrigin_sliceDimensions_withBytes_strides__MTL__TensorExtentsp_MTL__TensorExtentsp_constvoidp_MTL__TensorExtentsp((const void*)this, nullptr, sliceOrigin, sliceDimensions, bytes, strides); } -_MTL_INLINE MTL::TensorUsage MTL::Tensor::usage() const +_MTL_INLINE void MTL::Tensor::getBytes(void * bytes, MTL::TensorExtents* strides, MTL::TensorExtents* sliceOrigin, MTL::TensorExtents* sliceDimensions) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(usage)); + _MTL_msg_v_getBytes_strides_fromSliceOrigin_sliceDimensions__voidp_MTL__TensorExtentsp_MTL__TensorExtentsp_MTL__TensorExtentsp((const void*)this, nullptr, bytes, strides, sliceOrigin, sliceDimensions); } diff --git a/thirdparty/metal-cpp/Metal/MTLTexture.hpp b/thirdparty/metal-cpp/Metal/MTLTexture.hpp index 631d9202fcd6..cf30623f6834 100644 --- a/thirdparty/metal-cpp/Metal/MTLTexture.hpp +++ b/thirdparty/metal-cpp/Metal/MTLTexture.hpp @@ -1,47 +1,34 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLTexture.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPixelFormat.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLResource.hpp" -#include "MTLTypes.hpp" #include -namespace MTL -{ -class Buffer; -class Device; -class Resource; -class SharedTextureHandle; -class Texture; -class TextureDescriptor; -class TextureViewDescriptor; +namespace MTL { + class Buffer; + class Device; + class Resource; + enum CPUCacheMode : NS::UInteger; + enum HazardTrackingMode : NS::UInteger; + enum PixelFormat : NS::UInteger; + using ResourceOptions = NS::UInteger; + enum SparsePageSize : NS::Integer; + enum StorageMode : NS::UInteger; + enum TextureSparseTier : NS::Integer; +} +namespace NS { + class String; } namespace MTL { + _MTL_ENUM(NS::UInteger, TextureType) { TextureType1D = 0, TextureType1DArray = 1, @@ -64,740 +51,635 @@ _MTL_ENUM(uint8_t, TextureSwizzle) { TextureSwizzleAlpha = 5, }; +_MTL_OPTIONS(NS::UInteger, TextureUsage) { + TextureUsageUnknown = 0x0000, + TextureUsageShaderRead = 0x0001, + TextureUsageShaderWrite = 0x0002, + TextureUsageRenderTarget = 0x0004, + TextureUsagePixelFormatView = 0x0010, + TextureUsageShaderAtomic = 0x0020, +}; + _MTL_ENUM(NS::Integer, TextureCompressionType) { TextureCompressionTypeLossless = 0, TextureCompressionTypeLossy = 1, }; -_MTL_OPTIONS(NS::UInteger, TextureUsage) { - TextureUsageUnknown = 0, - TextureUsageShaderRead = 1, - TextureUsageShaderWrite = 1 << 1, - TextureUsageRenderTarget = 1 << 2, - TextureUsagePixelFormatView = 1 << 4, - TextureUsageShaderAtomic = 1 << 5, -}; - -struct TextureSwizzleChannels -{ - - TextureSwizzleChannels(MTL::TextureSwizzle r, MTL::TextureSwizzle g, MTL::TextureSwizzle b, MTL::TextureSwizzle a); - - TextureSwizzleChannels(); - static TextureSwizzleChannels Default(); - - static TextureSwizzleChannels Make(MTL::TextureSwizzle r, MTL::TextureSwizzle g, MTL::TextureSwizzle b, MTL::TextureSwizzle a); - - MTL::TextureSwizzle red; - MTL::TextureSwizzle green; - MTL::TextureSwizzle blue; - MTL::TextureSwizzle alpha; -} _MTL_PACKED; +class SharedTextureHandle; +class TextureDescriptor; +class TextureViewDescriptor; +class Texture; class SharedTextureHandle : public NS::SecureCoding { public: static SharedTextureHandle* alloc(); + SharedTextureHandle* init() const; - Device* device() const; - - SharedTextureHandle* init(); + MTL::Device* device() const; + NS::String* label() const; - NS::String* label() const; }; + class TextureDescriptor : public NS::Copying { public: static TextureDescriptor* alloc(); + TextureDescriptor* init() const; + + static MTL::TextureDescriptor* texture2DDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger width, NS::UInteger height, bool mipmapped); + static MTL::TextureDescriptor* textureBufferDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger width, MTL::ResourceOptions resourceOptions, MTL::TextureUsage usage); + static MTL::TextureDescriptor* textureCubeDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger size, bool mipmapped); + + bool allowGPUOptimizedContents() const; + NS::UInteger arrayLength() const; + MTL::TextureCompressionType compressionType() const; + MTL::CPUCacheMode cpuCacheMode() const; + NS::UInteger depth() const; + MTL::HazardTrackingMode hazardTrackingMode() const; + NS::UInteger height() const; + NS::UInteger mipmapLevelCount() const; + MTL::PixelFormat pixelFormat() const; + MTL::SparsePageSize placementSparsePageSize() const; + MTL::ResourceOptions resourceOptions() const; + NS::UInteger sampleCount() const; + void setAllowGPUOptimizedContents(bool allowGPUOptimizedContents); + void setArrayLength(NS::UInteger arrayLength); + void setCompressionType(MTL::TextureCompressionType compressionType); + void setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode); + void setDepth(NS::UInteger depth); + void setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode); + void setHeight(NS::UInteger height); + void setMipmapLevelCount(NS::UInteger mipmapLevelCount); + void setPixelFormat(MTL::PixelFormat pixelFormat); + void setPlacementSparsePageSize(MTL::SparsePageSize placementSparsePageSize); + void setResourceOptions(MTL::ResourceOptions resourceOptions); + void setSampleCount(NS::UInteger sampleCount); + void setStorageMode(MTL::StorageMode storageMode); + void setSwizzle(MTL::TextureSwizzleChannels swizzle); + void setTextureType(MTL::TextureType textureType); + void setUsage(MTL::TextureUsage usage); + void setWidth(NS::UInteger width); + MTL::StorageMode storageMode() const; + MTL::TextureSwizzleChannels swizzle() const; + MTL::TextureType textureType() const; + MTL::TextureUsage usage() const; + NS::UInteger width() const; - bool allowGPUOptimizedContents() const; - - NS::UInteger arrayLength() const; - - TextureCompressionType compressionType() const; - - CPUCacheMode cpuCacheMode() const; - - NS::UInteger depth() const; - - HazardTrackingMode hazardTrackingMode() const; - - NS::UInteger height() const; - - TextureDescriptor* init(); - - NS::UInteger mipmapLevelCount() const; - - PixelFormat pixelFormat() const; - - SparsePageSize placementSparsePageSize() const; - - ResourceOptions resourceOptions() const; - - NS::UInteger sampleCount() const; - - void setAllowGPUOptimizedContents(bool allowGPUOptimizedContents); - - void setArrayLength(NS::UInteger arrayLength); - - void setCompressionType(MTL::TextureCompressionType compressionType); - - void setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode); - - void setDepth(NS::UInteger depth); - - void setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode); - - void setHeight(NS::UInteger height); - - void setMipmapLevelCount(NS::UInteger mipmapLevelCount); - - void setPixelFormat(MTL::PixelFormat pixelFormat); - - void setPlacementSparsePageSize(MTL::SparsePageSize placementSparsePageSize); - - void setResourceOptions(MTL::ResourceOptions resourceOptions); - - void setSampleCount(NS::UInteger sampleCount); - - void setStorageMode(MTL::StorageMode storageMode); - - void setSwizzle(MTL::TextureSwizzleChannels swizzle); - - void setTextureType(MTL::TextureType textureType); - - void setUsage(MTL::TextureUsage usage); - - void setWidth(NS::UInteger width); - - StorageMode storageMode() const; - - TextureSwizzleChannels swizzle() const; - - static TextureDescriptor* texture2DDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger width, NS::UInteger height, bool mipmapped); - - static TextureDescriptor* textureBufferDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger width, MTL::ResourceOptions resourceOptions, MTL::TextureUsage usage); - - static TextureDescriptor* textureCubeDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger size, bool mipmapped); - - TextureType textureType() const; - - TextureUsage usage() const; - - NS::UInteger width() const; }; + class TextureViewDescriptor : public NS::Copying { public: static TextureViewDescriptor* alloc(); + TextureViewDescriptor* init() const; + + NS::Range levelRange() const; + MTL::PixelFormat pixelFormat() const; + void setLevelRange(NS::Range levelRange); + void setPixelFormat(MTL::PixelFormat pixelFormat); + void setSliceRange(NS::Range sliceRange); + void setSwizzle(MTL::TextureSwizzleChannels swizzle); + void setTextureType(MTL::TextureType textureType); + NS::Range sliceRange() const; + MTL::TextureSwizzleChannels swizzle() const; + MTL::TextureType textureType() const; - TextureViewDescriptor* init(); - - NS::Range levelRange() const; - - PixelFormat pixelFormat() const; - - void setLevelRange(NS::Range levelRange); - - void setPixelFormat(MTL::PixelFormat pixelFormat); - - void setSliceRange(NS::Range sliceRange); - - void setSwizzle(MTL::TextureSwizzleChannels swizzle); - - void setTextureType(MTL::TextureType textureType); - - NS::Range sliceRange() const; - - TextureSwizzleChannels swizzle() const; - - TextureType textureType() const; }; -class Texture : public NS::Referencing + +class Texture : public NS::Referencing { public: - bool allowGPUOptimizedContents() const; - - NS::UInteger arrayLength() const; - - Buffer* buffer() const; - NS::UInteger bufferBytesPerRow() const; - - NS::UInteger bufferOffset() const; - - TextureCompressionType compressionType() const; - - NS::UInteger depth() const; - - NS::UInteger firstMipmapInTail() const; - - [[deprecated("please use isFramebufferOnly instead")]] - bool framebufferOnly() const; - - void getBytes(void* pixelBytes, NS::UInteger bytesPerRow, NS::UInteger bytesPerImage, MTL::Region region, NS::UInteger level, NS::UInteger slice); - void getBytes(void* pixelBytes, NS::UInteger bytesPerRow, MTL::Region region, NS::UInteger level); - - ResourceID gpuResourceID() const; - - NS::UInteger height() const; - - IOSurfaceRef iosurface() const; - NS::UInteger iosurfacePlane() const; - - bool isFramebufferOnly() const; - - bool isShareable() const; - - bool isSparse() const; - - NS::UInteger mipmapLevelCount() const; - - Texture* newRemoteTextureViewForDevice(const MTL::Device* device); - - SharedTextureHandle* newSharedTextureHandle(); - - Texture* newTextureView(MTL::PixelFormat pixelFormat); - Texture* newTextureView(MTL::PixelFormat pixelFormat, MTL::TextureType textureType, NS::Range levelRange, NS::Range sliceRange); - Texture* newTextureView(const MTL::TextureViewDescriptor* descriptor); - Texture* newTextureView(MTL::PixelFormat pixelFormat, MTL::TextureType textureType, NS::Range levelRange, NS::Range sliceRange, MTL::TextureSwizzleChannels swizzle); - - NS::UInteger parentRelativeLevel() const; - - NS::UInteger parentRelativeSlice() const; - - Texture* parentTexture() const; - - PixelFormat pixelFormat() const; - - Texture* remoteStorageTexture() const; - - void replaceRegion(MTL::Region region, NS::UInteger level, NS::UInteger slice, const void* pixelBytes, NS::UInteger bytesPerRow, NS::UInteger bytesPerImage); - void replaceRegion(MTL::Region region, NS::UInteger level, const void* pixelBytes, NS::UInteger bytesPerRow); - - Resource* rootResource() const; - - NS::UInteger sampleCount() const; - - [[deprecated("please use isShareable instead")]] - bool shareable() const; - - TextureSparseTier sparseTextureTier() const; + bool allowGPUOptimizedContents() const; + NS::UInteger arrayLength() const; + MTL::Buffer* buffer() const; + NS::UInteger bufferBytesPerRow() const; + NS::UInteger bufferOffset() const; + MTL::TextureCompressionType compressionType() const; + NS::UInteger depth() const; + NS::UInteger firstMipmapInTail() const; + bool framebufferOnly() const; + void getBytes(void * pixelBytes, NS::UInteger bytesPerRow, NS::UInteger bytesPerImage, MTL::Region region, NS::UInteger level, NS::UInteger slice); + void getBytes(void * pixelBytes, NS::UInteger bytesPerRow, MTL::Region region, NS::UInteger level); + MTL::ResourceID gpuResourceID() const; + NS::UInteger height() const; + IOSurfaceRef iosurface() const; + NS::UInteger iosurfacePlane() const; + bool isFramebufferOnly(); + bool isShareable(); + bool isSparse() const; + NS::UInteger mipmapLevelCount() const; + MTL::Texture* newRemoteTextureView(MTL::Device* device); + MTL::SharedTextureHandle* newSharedTextureHandle(); + MTL::Texture* newTextureView(MTL::PixelFormat pixelFormat); + MTL::Texture* newTextureView(MTL::PixelFormat pixelFormat, MTL::TextureType textureType, NS::Range levelRange, NS::Range sliceRange); + MTL::Texture* newTextureView(MTL::TextureViewDescriptor* descriptor); + MTL::Texture* newTextureView(MTL::PixelFormat pixelFormat, MTL::TextureType textureType, NS::Range levelRange, NS::Range sliceRange, MTL::TextureSwizzleChannels swizzle); + NS::UInteger parentRelativeLevel() const; + NS::UInteger parentRelativeSlice() const; + MTL::Texture* parentTexture() const; + MTL::PixelFormat pixelFormat() const; + MTL::Texture* remoteStorageTexture() const; + void replace(MTL::Region region, NS::UInteger level, NS::UInteger slice, const void * pixelBytes, NS::UInteger bytesPerRow, NS::UInteger bytesPerImage); + void replace(MTL::Region region, NS::UInteger level, const void * pixelBytes, NS::UInteger bytesPerRow); + MTL::Resource* rootResource() const; + NS::UInteger sampleCount() const; + bool shareable() const; + MTL::TextureSparseTier sparseTextureTier() const; + MTL::TextureSwizzleChannels swizzle() const; + NS::UInteger tailSizeInBytes() const; + MTL::TextureType textureType() const; + MTL::TextureUsage usage() const; + NS::UInteger width() const; - TextureSwizzleChannels swizzle() const; - - NS::UInteger tailSizeInBytes() const; - - TextureType textureType() const; - - TextureUsage usage() const; - - NS::UInteger width() const; }; -} -_MTL_INLINE MTL::TextureSwizzleChannels::TextureSwizzleChannels(MTL::TextureSwizzle r, MTL::TextureSwizzle g, MTL::TextureSwizzle b, MTL::TextureSwizzle a) - : red(r) - , green(g) - , blue(b) - , alpha(a) -{ -} +} // namespace MTL -_MTL_INLINE MTL::TextureSwizzleChannels::TextureSwizzleChannels() - : red(MTL::TextureSwizzleRed) - , green(MTL::TextureSwizzleGreen) - , blue(MTL::TextureSwizzleBlue) - , alpha(MTL::TextureSwizzleAlpha) -{ -} +// --- Class symbols + inline implementations --- -_MTL_INLINE MTL::TextureSwizzleChannels MTL::TextureSwizzleChannels::Default() -{ - return MTL::TextureSwizzleChannels(); -} - -_MTL_INLINE MTL::TextureSwizzleChannels MTL::TextureSwizzleChannels::Make(MTL::TextureSwizzle r, MTL::TextureSwizzle g, MTL::TextureSwizzle b, MTL::TextureSwizzle a) -{ - return TextureSwizzleChannels(r, g, b, a); -} +extern "C" void *OBJC_CLASS_$_MTLSharedTextureHandle; +extern "C" void *OBJC_CLASS_$_MTLTextureDescriptor; +extern "C" void *OBJC_CLASS_$_MTLTextureViewDescriptor; +extern "C" void *OBJC_CLASS_$_MTLTexture; _MTL_INLINE MTL::SharedTextureHandle* MTL::SharedTextureHandle::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLSharedTextureHandle)); + return _MTL_msg_MTL__SharedTextureHandlep_alloc((const void*)&OBJC_CLASS_$_MTLSharedTextureHandle, nullptr); } -_MTL_INLINE MTL::Device* MTL::SharedTextureHandle::device() const +_MTL_INLINE MTL::SharedTextureHandle* MTL::SharedTextureHandle::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(device)); + return _MTL_msg_MTL__SharedTextureHandlep_init((const void*)this, nullptr); } -_MTL_INLINE MTL::SharedTextureHandle* MTL::SharedTextureHandle::init() +_MTL_INLINE MTL::Device* MTL::SharedTextureHandle::device() const { - return NS::Object::init(); + return _MTL_msg_MTL__Devicep_device((const void*)this, nullptr); } _MTL_INLINE NS::String* MTL::SharedTextureHandle::label() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(label)); + return _MTL_msg_NS__Stringp_label((const void*)this, nullptr); } _MTL_INLINE MTL::TextureDescriptor* MTL::TextureDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLTextureDescriptor)); + return _MTL_msg_MTL__TextureDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLTextureDescriptor, nullptr); } -_MTL_INLINE bool MTL::TextureDescriptor::allowGPUOptimizedContents() const +_MTL_INLINE MTL::TextureDescriptor* MTL::TextureDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allowGPUOptimizedContents)); + return _MTL_msg_MTL__TextureDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::TextureDescriptor::arrayLength() const +_MTL_INLINE MTL::TextureDescriptor* MTL::TextureDescriptor::texture2DDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger width, NS::UInteger height, bool mipmapped) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(arrayLength)); + return _MTL_msg_MTL__TextureDescriptorp_texture2DDescriptorWithPixelFormat_width_height_mipmapped__MTL__PixelFormat_NS__UInteger_NS__UInteger_bool((const void*)&OBJC_CLASS_$_MTLTextureDescriptor, nullptr, pixelFormat, width, height, mipmapped); } -_MTL_INLINE MTL::TextureCompressionType MTL::TextureDescriptor::compressionType() const +_MTL_INLINE MTL::TextureDescriptor* MTL::TextureDescriptor::textureCubeDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger size, bool mipmapped) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(compressionType)); + return _MTL_msg_MTL__TextureDescriptorp_textureCubeDescriptorWithPixelFormat_size_mipmapped__MTL__PixelFormat_NS__UInteger_bool((const void*)&OBJC_CLASS_$_MTLTextureDescriptor, nullptr, pixelFormat, size, mipmapped); } -_MTL_INLINE MTL::CPUCacheMode MTL::TextureDescriptor::cpuCacheMode() const +_MTL_INLINE MTL::TextureDescriptor* MTL::TextureDescriptor::textureBufferDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger width, MTL::ResourceOptions resourceOptions, MTL::TextureUsage usage) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(cpuCacheMode)); + return _MTL_msg_MTL__TextureDescriptorp_textureBufferDescriptorWithPixelFormat_width_resourceOptions_usage__MTL__PixelFormat_NS__UInteger_MTL__ResourceOptions_MTL__TextureUsage((const void*)&OBJC_CLASS_$_MTLTextureDescriptor, nullptr, pixelFormat, width, resourceOptions, usage); } -_MTL_INLINE NS::UInteger MTL::TextureDescriptor::depth() const +_MTL_INLINE MTL::TextureType MTL::TextureDescriptor::textureType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depth)); + return _MTL_msg_MTL__TextureType_textureType((const void*)this, nullptr); } -_MTL_INLINE MTL::HazardTrackingMode MTL::TextureDescriptor::hazardTrackingMode() const +_MTL_INLINE void MTL::TextureDescriptor::setTextureType(MTL::TextureType textureType) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(hazardTrackingMode)); + _MTL_msg_v_setTextureType__MTL__TextureType((const void*)this, nullptr, textureType); } -_MTL_INLINE NS::UInteger MTL::TextureDescriptor::height() const +_MTL_INLINE MTL::PixelFormat MTL::TextureDescriptor::pixelFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(height)); + return _MTL_msg_MTL__PixelFormat_pixelFormat((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureDescriptor* MTL::TextureDescriptor::init() +_MTL_INLINE void MTL::TextureDescriptor::setPixelFormat(MTL::PixelFormat pixelFormat) { - return NS::Object::init(); + _MTL_msg_v_setPixelFormat__MTL__PixelFormat((const void*)this, nullptr, pixelFormat); } -_MTL_INLINE NS::UInteger MTL::TextureDescriptor::mipmapLevelCount() const +_MTL_INLINE NS::UInteger MTL::TextureDescriptor::width() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(mipmapLevelCount)); + return _MTL_msg_NS__UInteger_width((const void*)this, nullptr); } -_MTL_INLINE MTL::PixelFormat MTL::TextureDescriptor::pixelFormat() const +_MTL_INLINE void MTL::TextureDescriptor::setWidth(NS::UInteger width) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(pixelFormat)); + _MTL_msg_v_setWidth__NS__UInteger((const void*)this, nullptr, width); } -_MTL_INLINE MTL::SparsePageSize MTL::TextureDescriptor::placementSparsePageSize() const +_MTL_INLINE NS::UInteger MTL::TextureDescriptor::height() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(placementSparsePageSize)); + return _MTL_msg_NS__UInteger_height((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceOptions MTL::TextureDescriptor::resourceOptions() const +_MTL_INLINE void MTL::TextureDescriptor::setHeight(NS::UInteger height) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(resourceOptions)); + _MTL_msg_v_setHeight__NS__UInteger((const void*)this, nullptr, height); } -_MTL_INLINE NS::UInteger MTL::TextureDescriptor::sampleCount() const +_MTL_INLINE NS::UInteger MTL::TextureDescriptor::depth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleCount)); + return _MTL_msg_NS__UInteger_depth((const void*)this, nullptr); } -_MTL_INLINE void MTL::TextureDescriptor::setAllowGPUOptimizedContents(bool allowGPUOptimizedContents) +_MTL_INLINE void MTL::TextureDescriptor::setDepth(NS::UInteger depth) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setAllowGPUOptimizedContents_), allowGPUOptimizedContents); + _MTL_msg_v_setDepth__NS__UInteger((const void*)this, nullptr, depth); } -_MTL_INLINE void MTL::TextureDescriptor::setArrayLength(NS::UInteger arrayLength) +_MTL_INLINE NS::UInteger MTL::TextureDescriptor::mipmapLevelCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setArrayLength_), arrayLength); + return _MTL_msg_NS__UInteger_mipmapLevelCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::TextureDescriptor::setCompressionType(MTL::TextureCompressionType compressionType) +_MTL_INLINE void MTL::TextureDescriptor::setMipmapLevelCount(NS::UInteger mipmapLevelCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCompressionType_), compressionType); + _MTL_msg_v_setMipmapLevelCount__NS__UInteger((const void*)this, nullptr, mipmapLevelCount); } -_MTL_INLINE void MTL::TextureDescriptor::setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode) +_MTL_INLINE NS::UInteger MTL::TextureDescriptor::sampleCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setCpuCacheMode_), cpuCacheMode); + return _MTL_msg_NS__UInteger_sampleCount((const void*)this, nullptr); } -_MTL_INLINE void MTL::TextureDescriptor::setDepth(NS::UInteger depth) +_MTL_INLINE void MTL::TextureDescriptor::setSampleCount(NS::UInteger sampleCount) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setDepth_), depth); + _MTL_msg_v_setSampleCount__NS__UInteger((const void*)this, nullptr, sampleCount); } -_MTL_INLINE void MTL::TextureDescriptor::setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode) +_MTL_INLINE NS::UInteger MTL::TextureDescriptor::arrayLength() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setHazardTrackingMode_), hazardTrackingMode); + return _MTL_msg_NS__UInteger_arrayLength((const void*)this, nullptr); } -_MTL_INLINE void MTL::TextureDescriptor::setHeight(NS::UInteger height) +_MTL_INLINE void MTL::TextureDescriptor::setArrayLength(NS::UInteger arrayLength) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setHeight_), height); + _MTL_msg_v_setArrayLength__NS__UInteger((const void*)this, nullptr, arrayLength); } -_MTL_INLINE void MTL::TextureDescriptor::setMipmapLevelCount(NS::UInteger mipmapLevelCount) +_MTL_INLINE MTL::ResourceOptions MTL::TextureDescriptor::resourceOptions() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setMipmapLevelCount_), mipmapLevelCount); + return _MTL_msg_MTL__ResourceOptions_resourceOptions((const void*)this, nullptr); } -_MTL_INLINE void MTL::TextureDescriptor::setPixelFormat(MTL::PixelFormat pixelFormat) +_MTL_INLINE void MTL::TextureDescriptor::setResourceOptions(MTL::ResourceOptions resourceOptions) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPixelFormat_), pixelFormat); + _MTL_msg_v_setResourceOptions__MTL__ResourceOptions((const void*)this, nullptr, resourceOptions); } -_MTL_INLINE void MTL::TextureDescriptor::setPlacementSparsePageSize(MTL::SparsePageSize placementSparsePageSize) +_MTL_INLINE MTL::CPUCacheMode MTL::TextureDescriptor::cpuCacheMode() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPlacementSparsePageSize_), placementSparsePageSize); + return _MTL_msg_MTL__CPUCacheMode_cpuCacheMode((const void*)this, nullptr); } -_MTL_INLINE void MTL::TextureDescriptor::setResourceOptions(MTL::ResourceOptions resourceOptions) +_MTL_INLINE void MTL::TextureDescriptor::setCpuCacheMode(MTL::CPUCacheMode cpuCacheMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setResourceOptions_), resourceOptions); + _MTL_msg_v_setCpuCacheMode__MTL__CPUCacheMode((const void*)this, nullptr, cpuCacheMode); } -_MTL_INLINE void MTL::TextureDescriptor::setSampleCount(NS::UInteger sampleCount) +_MTL_INLINE MTL::StorageMode MTL::TextureDescriptor::storageMode() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSampleCount_), sampleCount); + return _MTL_msg_MTL__StorageMode_storageMode((const void*)this, nullptr); } _MTL_INLINE void MTL::TextureDescriptor::setStorageMode(MTL::StorageMode storageMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStorageMode_), storageMode); + _MTL_msg_v_setStorageMode__MTL__StorageMode((const void*)this, nullptr, storageMode); } -_MTL_INLINE void MTL::TextureDescriptor::setSwizzle(MTL::TextureSwizzleChannels swizzle) +_MTL_INLINE MTL::HazardTrackingMode MTL::TextureDescriptor::hazardTrackingMode() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSwizzle_), swizzle); + return _MTL_msg_MTL__HazardTrackingMode_hazardTrackingMode((const void*)this, nullptr); } -_MTL_INLINE void MTL::TextureDescriptor::setTextureType(MTL::TextureType textureType) +_MTL_INLINE void MTL::TextureDescriptor::setHazardTrackingMode(MTL::HazardTrackingMode hazardTrackingMode) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTextureType_), textureType); + _MTL_msg_v_setHazardTrackingMode__MTL__HazardTrackingMode((const void*)this, nullptr, hazardTrackingMode); } -_MTL_INLINE void MTL::TextureDescriptor::setUsage(MTL::TextureUsage usage) +_MTL_INLINE MTL::TextureUsage MTL::TextureDescriptor::usage() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setUsage_), usage); + return _MTL_msg_MTL__TextureUsage_usage((const void*)this, nullptr); } -_MTL_INLINE void MTL::TextureDescriptor::setWidth(NS::UInteger width) +_MTL_INLINE void MTL::TextureDescriptor::setUsage(MTL::TextureUsage usage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setWidth_), width); + _MTL_msg_v_setUsage__MTL__TextureUsage((const void*)this, nullptr, usage); } -_MTL_INLINE MTL::StorageMode MTL::TextureDescriptor::storageMode() const +_MTL_INLINE bool MTL::TextureDescriptor::allowGPUOptimizedContents() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(storageMode)); + return _MTL_msg_bool_allowGPUOptimizedContents((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureSwizzleChannels MTL::TextureDescriptor::swizzle() const +_MTL_INLINE void MTL::TextureDescriptor::setAllowGPUOptimizedContents(bool allowGPUOptimizedContents) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(swizzle)); + _MTL_msg_v_setAllowGPUOptimizedContents__bool((const void*)this, nullptr, allowGPUOptimizedContents); } -_MTL_INLINE MTL::TextureDescriptor* MTL::TextureDescriptor::texture2DDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger width, NS::UInteger height, bool mipmapped) +_MTL_INLINE MTL::TextureCompressionType MTL::TextureDescriptor::compressionType() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLTextureDescriptor), _MTL_PRIVATE_SEL(texture2DDescriptorWithPixelFormat_width_height_mipmapped_), pixelFormat, width, height, mipmapped); + return _MTL_msg_MTL__TextureCompressionType_compressionType((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureDescriptor* MTL::TextureDescriptor::textureBufferDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger width, MTL::ResourceOptions resourceOptions, MTL::TextureUsage usage) +_MTL_INLINE void MTL::TextureDescriptor::setCompressionType(MTL::TextureCompressionType compressionType) { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLTextureDescriptor), _MTL_PRIVATE_SEL(textureBufferDescriptorWithPixelFormat_width_resourceOptions_usage_), pixelFormat, width, resourceOptions, usage); + _MTL_msg_v_setCompressionType__MTL__TextureCompressionType((const void*)this, nullptr, compressionType); } -_MTL_INLINE MTL::TextureDescriptor* MTL::TextureDescriptor::textureCubeDescriptor(MTL::PixelFormat pixelFormat, NS::UInteger size, bool mipmapped) +_MTL_INLINE MTL::TextureSwizzleChannels MTL::TextureDescriptor::swizzle() const { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLTextureDescriptor), _MTL_PRIVATE_SEL(textureCubeDescriptorWithPixelFormat_size_mipmapped_), pixelFormat, size, mipmapped); + return _MTL_msg_MTL__TextureSwizzleChannels_swizzle((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureType MTL::TextureDescriptor::textureType() const +_MTL_INLINE void MTL::TextureDescriptor::setSwizzle(MTL::TextureSwizzleChannels swizzle) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureType)); + _MTL_msg_v_setSwizzle__MTL__TextureSwizzleChannels((const void*)this, nullptr, swizzle); } -_MTL_INLINE MTL::TextureUsage MTL::TextureDescriptor::usage() const +_MTL_INLINE MTL::SparsePageSize MTL::TextureDescriptor::placementSparsePageSize() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(usage)); + return _MTL_msg_MTL__SparsePageSize_placementSparsePageSize((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::TextureDescriptor::width() const +_MTL_INLINE void MTL::TextureDescriptor::setPlacementSparsePageSize(MTL::SparsePageSize placementSparsePageSize) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(width)); + _MTL_msg_v_setPlacementSparsePageSize__MTL__SparsePageSize((const void*)this, nullptr, placementSparsePageSize); } _MTL_INLINE MTL::TextureViewDescriptor* MTL::TextureViewDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLTextureViewDescriptor)); + return _MTL_msg_MTL__TextureViewDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLTextureViewDescriptor, nullptr); } -_MTL_INLINE MTL::TextureViewDescriptor* MTL::TextureViewDescriptor::init() +_MTL_INLINE MTL::TextureViewDescriptor* MTL::TextureViewDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__TextureViewDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE NS::Range MTL::TextureViewDescriptor::levelRange() const +_MTL_INLINE MTL::PixelFormat MTL::TextureViewDescriptor::pixelFormat() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(levelRange)); + return _MTL_msg_MTL__PixelFormat_pixelFormat((const void*)this, nullptr); } -_MTL_INLINE MTL::PixelFormat MTL::TextureViewDescriptor::pixelFormat() const +_MTL_INLINE void MTL::TextureViewDescriptor::setPixelFormat(MTL::PixelFormat pixelFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(pixelFormat)); + _MTL_msg_v_setPixelFormat__MTL__PixelFormat((const void*)this, nullptr, pixelFormat); } -_MTL_INLINE void MTL::TextureViewDescriptor::setLevelRange(NS::Range levelRange) +_MTL_INLINE MTL::TextureType MTL::TextureViewDescriptor::textureType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setLevelRange_), levelRange); + return _MTL_msg_MTL__TextureType_textureType((const void*)this, nullptr); } -_MTL_INLINE void MTL::TextureViewDescriptor::setPixelFormat(MTL::PixelFormat pixelFormat) +_MTL_INLINE void MTL::TextureViewDescriptor::setTextureType(MTL::TextureType textureType) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setPixelFormat_), pixelFormat); + _MTL_msg_v_setTextureType__MTL__TextureType((const void*)this, nullptr, textureType); } -_MTL_INLINE void MTL::TextureViewDescriptor::setSliceRange(NS::Range sliceRange) +_MTL_INLINE NS::Range MTL::TextureViewDescriptor::levelRange() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSliceRange_), sliceRange); + return _MTL_msg_NS__Range_levelRange((const void*)this, nullptr); } -_MTL_INLINE void MTL::TextureViewDescriptor::setSwizzle(MTL::TextureSwizzleChannels swizzle) +_MTL_INLINE void MTL::TextureViewDescriptor::setLevelRange(NS::Range levelRange) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setSwizzle_), swizzle); + _MTL_msg_v_setLevelRange__NS__Range((const void*)this, nullptr, levelRange); } -_MTL_INLINE void MTL::TextureViewDescriptor::setTextureType(MTL::TextureType textureType) +_MTL_INLINE NS::Range MTL::TextureViewDescriptor::sliceRange() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setTextureType_), textureType); + return _MTL_msg_NS__Range_sliceRange((const void*)this, nullptr); } -_MTL_INLINE NS::Range MTL::TextureViewDescriptor::sliceRange() const +_MTL_INLINE void MTL::TextureViewDescriptor::setSliceRange(NS::Range sliceRange) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sliceRange)); + _MTL_msg_v_setSliceRange__NS__Range((const void*)this, nullptr, sliceRange); } _MTL_INLINE MTL::TextureSwizzleChannels MTL::TextureViewDescriptor::swizzle() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(swizzle)); + return _MTL_msg_MTL__TextureSwizzleChannels_swizzle((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureType MTL::TextureViewDescriptor::textureType() const +_MTL_INLINE void MTL::TextureViewDescriptor::setSwizzle(MTL::TextureSwizzleChannels swizzle) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureType)); + _MTL_msg_v_setSwizzle__MTL__TextureSwizzleChannels((const void*)this, nullptr, swizzle); } -_MTL_INLINE bool MTL::Texture::allowGPUOptimizedContents() const +_MTL_INLINE MTL::Resource* MTL::Texture::rootResource() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(allowGPUOptimizedContents)); + return _MTL_msg_MTL__Resourcep_rootResource((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Texture::arrayLength() const +_MTL_INLINE MTL::Texture* MTL::Texture::parentTexture() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(arrayLength)); + return _MTL_msg_MTL__Texturep_parentTexture((const void*)this, nullptr); } -_MTL_INLINE MTL::Buffer* MTL::Texture::buffer() const +_MTL_INLINE NS::UInteger MTL::Texture::parentRelativeLevel() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(buffer)); + return _MTL_msg_NS__UInteger_parentRelativeLevel((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Texture::bufferBytesPerRow() const +_MTL_INLINE NS::UInteger MTL::Texture::parentRelativeSlice() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferBytesPerRow)); + return _MTL_msg_NS__UInteger_parentRelativeSlice((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Texture::bufferOffset() const +_MTL_INLINE MTL::Buffer* MTL::Texture::buffer() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferOffset)); + return _MTL_msg_MTL__Bufferp_buffer((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureCompressionType MTL::Texture::compressionType() const +_MTL_INLINE NS::UInteger MTL::Texture::bufferOffset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(compressionType)); + return _MTL_msg_NS__UInteger_bufferOffset((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Texture::depth() const +_MTL_INLINE NS::UInteger MTL::Texture::bufferBytesPerRow() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(depth)); + return _MTL_msg_NS__UInteger_bufferBytesPerRow((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Texture::firstMipmapInTail() const +_MTL_INLINE IOSurfaceRef MTL::Texture::iosurface() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(firstMipmapInTail)); + return _MTL_msg_IOSurfaceRef_iosurface((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Texture::framebufferOnly() const +_MTL_INLINE NS::UInteger MTL::Texture::iosurfacePlane() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isFramebufferOnly)); + return _MTL_msg_NS__UInteger_iosurfacePlane((const void*)this, nullptr); } -_MTL_INLINE void MTL::Texture::getBytes(void* pixelBytes, NS::UInteger bytesPerRow, NS::UInteger bytesPerImage, MTL::Region region, NS::UInteger level, NS::UInteger slice) +_MTL_INLINE MTL::TextureType MTL::Texture::textureType() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(getBytes_bytesPerRow_bytesPerImage_fromRegion_mipmapLevel_slice_), pixelBytes, bytesPerRow, bytesPerImage, region, level, slice); + return _MTL_msg_MTL__TextureType_textureType((const void*)this, nullptr); } -_MTL_INLINE void MTL::Texture::getBytes(void* pixelBytes, NS::UInteger bytesPerRow, MTL::Region region, NS::UInteger level) +_MTL_INLINE MTL::PixelFormat MTL::Texture::pixelFormat() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(getBytes_bytesPerRow_fromRegion_mipmapLevel_), pixelBytes, bytesPerRow, region, level); + return _MTL_msg_MTL__PixelFormat_pixelFormat((const void*)this, nullptr); } -_MTL_INLINE MTL::ResourceID MTL::Texture::gpuResourceID() const +_MTL_INLINE NS::UInteger MTL::Texture::width() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_NS__UInteger_width((const void*)this, nullptr); } _MTL_INLINE NS::UInteger MTL::Texture::height() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(height)); + return _MTL_msg_NS__UInteger_height((const void*)this, nullptr); } -_MTL_INLINE IOSurfaceRef MTL::Texture::iosurface() const +_MTL_INLINE NS::UInteger MTL::Texture::depth() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(iosurface)); + return _MTL_msg_NS__UInteger_depth((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Texture::iosurfacePlane() const +_MTL_INLINE NS::UInteger MTL::Texture::mipmapLevelCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(iosurfacePlane)); + return _MTL_msg_NS__UInteger_mipmapLevelCount((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Texture::isFramebufferOnly() const +_MTL_INLINE NS::UInteger MTL::Texture::sampleCount() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isFramebufferOnly)); + return _MTL_msg_NS__UInteger_sampleCount((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Texture::isShareable() const +_MTL_INLINE NS::UInteger MTL::Texture::arrayLength() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isShareable)); + return _MTL_msg_NS__UInteger_arrayLength((const void*)this, nullptr); } -_MTL_INLINE bool MTL::Texture::isSparse() const +_MTL_INLINE MTL::TextureUsage MTL::Texture::usage() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isSparse)); + return _MTL_msg_MTL__TextureUsage_usage((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Texture::mipmapLevelCount() const +_MTL_INLINE bool MTL::Texture::shareable() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(mipmapLevelCount)); + return _MTL_msg_bool_shareable((const void*)this, nullptr); } -_MTL_INLINE MTL::Texture* MTL::Texture::newRemoteTextureViewForDevice(const MTL::Device* device) +_MTL_INLINE bool MTL::Texture::framebufferOnly() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newRemoteTextureViewForDevice_), device); + return _MTL_msg_bool_framebufferOnly((const void*)this, nullptr); } -_MTL_INLINE MTL::SharedTextureHandle* MTL::Texture::newSharedTextureHandle() +_MTL_INLINE NS::UInteger MTL::Texture::firstMipmapInTail() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newSharedTextureHandle)); + return _MTL_msg_NS__UInteger_firstMipmapInTail((const void*)this, nullptr); } -_MTL_INLINE MTL::Texture* MTL::Texture::newTextureView(MTL::PixelFormat pixelFormat) +_MTL_INLINE NS::UInteger MTL::Texture::tailSizeInBytes() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureViewWithPixelFormat_), pixelFormat); + return _MTL_msg_NS__UInteger_tailSizeInBytes((const void*)this, nullptr); } -_MTL_INLINE MTL::Texture* MTL::Texture::newTextureView(MTL::PixelFormat pixelFormat, MTL::TextureType textureType, NS::Range levelRange, NS::Range sliceRange) +_MTL_INLINE bool MTL::Texture::isSparse() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureViewWithPixelFormat_textureType_levels_slices_), pixelFormat, textureType, levelRange, sliceRange); + return _MTL_msg_bool_isSparse((const void*)this, nullptr); } -_MTL_INLINE MTL::Texture* MTL::Texture::newTextureView(const MTL::TextureViewDescriptor* descriptor) +_MTL_INLINE bool MTL::Texture::allowGPUOptimizedContents() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureViewWithDescriptor_), descriptor); + return _MTL_msg_bool_allowGPUOptimizedContents((const void*)this, nullptr); } -_MTL_INLINE MTL::Texture* MTL::Texture::newTextureView(MTL::PixelFormat pixelFormat, MTL::TextureType textureType, NS::Range levelRange, NS::Range sliceRange, MTL::TextureSwizzleChannels swizzle) +_MTL_INLINE MTL::TextureCompressionType MTL::Texture::compressionType() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureViewWithPixelFormat_textureType_levels_slices_swizzle_), pixelFormat, textureType, levelRange, sliceRange, swizzle); + return _MTL_msg_MTL__TextureCompressionType_compressionType((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Texture::parentRelativeLevel() const +_MTL_INLINE MTL::ResourceID MTL::Texture::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(parentRelativeLevel)); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Texture::parentRelativeSlice() const +_MTL_INLINE MTL::Texture* MTL::Texture::remoteStorageTexture() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(parentRelativeSlice)); + return _MTL_msg_MTL__Texturep_remoteStorageTexture((const void*)this, nullptr); } -_MTL_INLINE MTL::Texture* MTL::Texture::parentTexture() const +_MTL_INLINE MTL::TextureSwizzleChannels MTL::Texture::swizzle() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(parentTexture)); + return _MTL_msg_MTL__TextureSwizzleChannels_swizzle((const void*)this, nullptr); } -_MTL_INLINE MTL::PixelFormat MTL::Texture::pixelFormat() const +_MTL_INLINE MTL::TextureSparseTier MTL::Texture::sparseTextureTier() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(pixelFormat)); + return _MTL_msg_MTL__TextureSparseTier_sparseTextureTier((const void*)this, nullptr); } -_MTL_INLINE MTL::Texture* MTL::Texture::remoteStorageTexture() const +_MTL_INLINE void MTL::Texture::getBytes(void * pixelBytes, NS::UInteger bytesPerRow, NS::UInteger bytesPerImage, MTL::Region region, NS::UInteger level, NS::UInteger slice) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(remoteStorageTexture)); + _MTL_msg_v_getBytes_bytesPerRow_bytesPerImage_fromRegion_mipmapLevel_slice__voidp_NS__UInteger_NS__UInteger_MTL__Region_NS__UInteger_NS__UInteger((const void*)this, nullptr, pixelBytes, bytesPerRow, bytesPerImage, region, level, slice); } -_MTL_INLINE void MTL::Texture::replaceRegion(MTL::Region region, NS::UInteger level, NS::UInteger slice, const void* pixelBytes, NS::UInteger bytesPerRow, NS::UInteger bytesPerImage) +_MTL_INLINE void MTL::Texture::replace(MTL::Region region, NS::UInteger level, NS::UInteger slice, const void * pixelBytes, NS::UInteger bytesPerRow, NS::UInteger bytesPerImage) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(replaceRegion_mipmapLevel_slice_withBytes_bytesPerRow_bytesPerImage_), region, level, slice, pixelBytes, bytesPerRow, bytesPerImage); + _MTL_msg_v_replaceRegion_mipmapLevel_slice_withBytes_bytesPerRow_bytesPerImage__MTL__Region_NS__UInteger_NS__UInteger_constvoidp_NS__UInteger_NS__UInteger((const void*)this, nullptr, region, level, slice, pixelBytes, bytesPerRow, bytesPerImage); } -_MTL_INLINE void MTL::Texture::replaceRegion(MTL::Region region, NS::UInteger level, const void* pixelBytes, NS::UInteger bytesPerRow) +_MTL_INLINE void MTL::Texture::getBytes(void * pixelBytes, NS::UInteger bytesPerRow, MTL::Region region, NS::UInteger level) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(replaceRegion_mipmapLevel_withBytes_bytesPerRow_), region, level, pixelBytes, bytesPerRow); + _MTL_msg_v_getBytes_bytesPerRow_fromRegion_mipmapLevel__voidp_NS__UInteger_MTL__Region_NS__UInteger((const void*)this, nullptr, pixelBytes, bytesPerRow, region, level); } -_MTL_INLINE MTL::Resource* MTL::Texture::rootResource() const +_MTL_INLINE void MTL::Texture::replace(MTL::Region region, NS::UInteger level, const void * pixelBytes, NS::UInteger bytesPerRow) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(rootResource)); + _MTL_msg_v_replaceRegion_mipmapLevel_withBytes_bytesPerRow__MTL__Region_NS__UInteger_constvoidp_NS__UInteger((const void*)this, nullptr, region, level, pixelBytes, bytesPerRow); } -_MTL_INLINE NS::UInteger MTL::Texture::sampleCount() const +_MTL_INLINE MTL::Texture* MTL::Texture::newTextureView(MTL::PixelFormat pixelFormat) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sampleCount)); + return _MTL_msg_MTL__Texturep_newTextureViewWithPixelFormat__MTL__PixelFormat((const void*)this, nullptr, pixelFormat); } -_MTL_INLINE bool MTL::Texture::shareable() const +_MTL_INLINE MTL::Texture* MTL::Texture::newTextureView(MTL::PixelFormat pixelFormat, MTL::TextureType textureType, NS::Range levelRange, NS::Range sliceRange) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(isShareable)); + return _MTL_msg_MTL__Texturep_newTextureViewWithPixelFormat_textureType_levels_slices__MTL__PixelFormat_MTL__TextureType_NS__Range_NS__Range((const void*)this, nullptr, pixelFormat, textureType, levelRange, sliceRange); } -_MTL_INLINE MTL::TextureSparseTier MTL::Texture::sparseTextureTier() const +_MTL_INLINE MTL::SharedTextureHandle* MTL::Texture::newSharedTextureHandle() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(sparseTextureTier)); + return _MTL_msg_MTL__SharedTextureHandlep_newSharedTextureHandle((const void*)this, nullptr); } -_MTL_INLINE MTL::TextureSwizzleChannels MTL::Texture::swizzle() const +_MTL_INLINE MTL::Texture* MTL::Texture::newTextureView(MTL::TextureViewDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(swizzle)); + return _MTL_msg_MTL__Texturep_newTextureViewWithDescriptor__MTL__TextureViewDescriptorp((const void*)this, nullptr, descriptor); } -_MTL_INLINE NS::UInteger MTL::Texture::tailSizeInBytes() const +_MTL_INLINE MTL::Texture* MTL::Texture::newRemoteTextureView(MTL::Device* device) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(tailSizeInBytes)); + return _MTL_msg_MTL__Texturep_newRemoteTextureViewForDevice__MTL__Devicep((const void*)this, nullptr, device); } -_MTL_INLINE MTL::TextureType MTL::Texture::textureType() const +_MTL_INLINE MTL::Texture* MTL::Texture::newTextureView(MTL::PixelFormat pixelFormat, MTL::TextureType textureType, NS::Range levelRange, NS::Range sliceRange, MTL::TextureSwizzleChannels swizzle) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureType)); + return _MTL_msg_MTL__Texturep_newTextureViewWithPixelFormat_textureType_levels_slices_swizzle__MTL__PixelFormat_MTL__TextureType_NS__Range_NS__Range_MTL__TextureSwizzleChannels((const void*)this, nullptr, pixelFormat, textureType, levelRange, sliceRange, swizzle); } -_MTL_INLINE MTL::TextureUsage MTL::Texture::usage() const +_MTL_INLINE bool MTL::Texture::isShareable() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(usage)); + return _MTL_msg_bool_isShareable((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::Texture::width() const +_MTL_INLINE bool MTL::Texture::isFramebufferOnly() { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(width)); + return _MTL_msg_bool_isFramebufferOnly((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLTextureViewPool.hpp b/thirdparty/metal-cpp/Metal/MTLTextureViewPool.hpp index cb7556f56af2..449696e1b7d2 100644 --- a/thirdparty/metal-cpp/Metal/MTLTextureViewPool.hpp +++ b/thirdparty/metal-cpp/Metal/MTLTextureViewPool.hpp @@ -1,59 +1,50 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLTextureViewPool.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLResourceViewPool.hpp" -#include "MTLTypes.hpp" + +namespace MTL { + class Buffer; + class Texture; + class TextureDescriptor; + class TextureViewDescriptor; +} namespace MTL { -class Buffer; -class Texture; -class TextureDescriptor; -class TextureViewDescriptor; -class TextureViewPool : public NS::Referencing +class TextureViewPool : public NS::Referencing { public: - ResourceID setTextureView(const MTL::Texture* texture, NS::UInteger index); - ResourceID setTextureView(const MTL::Texture* texture, const MTL::TextureViewDescriptor* descriptor, NS::UInteger index); - ResourceID setTextureViewFromBuffer(const MTL::Buffer* buffer, const MTL::TextureDescriptor* descriptor, NS::UInteger offset, NS::UInteger bytesPerRow, NS::UInteger index); + MTL::ResourceID setTextureView(MTL::Texture* texture, NS::UInteger index); + MTL::ResourceID setTextureView(MTL::Texture* texture, MTL::TextureViewDescriptor* descriptor, NS::UInteger index); + MTL::ResourceID setTextureViewFromBuffer(MTL::Buffer* buffer, MTL::TextureDescriptor* descriptor, NS::UInteger offset, NS::UInteger bytesPerRow, NS::UInteger index); + }; -} -_MTL_INLINE MTL::ResourceID MTL::TextureViewPool::setTextureView(const MTL::Texture* texture, NS::UInteger index) +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLTextureViewPool; + +_MTL_INLINE MTL::ResourceID MTL::TextureViewPool::setTextureView(MTL::Texture* texture, NS::UInteger index) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(setTextureView_atIndex_), texture, index); + return _MTL_msg_MTL__ResourceID_setTextureView_atIndex__MTL__Texturep_NS__UInteger((const void*)this, nullptr, texture, index); } -_MTL_INLINE MTL::ResourceID MTL::TextureViewPool::setTextureView(const MTL::Texture* texture, const MTL::TextureViewDescriptor* descriptor, NS::UInteger index) +_MTL_INLINE MTL::ResourceID MTL::TextureViewPool::setTextureView(MTL::Texture* texture, MTL::TextureViewDescriptor* descriptor, NS::UInteger index) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(setTextureView_descriptor_atIndex_), texture, descriptor, index); + return _MTL_msg_MTL__ResourceID_setTextureView_descriptor_atIndex__MTL__Texturep_MTL__TextureViewDescriptorp_NS__UInteger((const void*)this, nullptr, texture, descriptor, index); } -_MTL_INLINE MTL::ResourceID MTL::TextureViewPool::setTextureViewFromBuffer(const MTL::Buffer* buffer, const MTL::TextureDescriptor* descriptor, NS::UInteger offset, NS::UInteger bytesPerRow, NS::UInteger index) +_MTL_INLINE MTL::ResourceID MTL::TextureViewPool::setTextureViewFromBuffer(MTL::Buffer* buffer, MTL::TextureDescriptor* descriptor, NS::UInteger offset, NS::UInteger bytesPerRow, NS::UInteger index) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(setTextureViewFromBuffer_descriptor_offset_bytesPerRow_atIndex_), buffer, descriptor, offset, bytesPerRow, index); + return _MTL_msg_MTL__ResourceID_setTextureViewFromBuffer_descriptor_offset_bytesPerRow_atIndex__MTL__Bufferp_MTL__TextureDescriptorp_NS__UInteger_NS__UInteger_NS__UInteger((const void*)this, nullptr, buffer, descriptor, offset, bytesPerRow, index); } diff --git a/thirdparty/metal-cpp/Metal/MTLTypes.hpp b/thirdparty/metal-cpp/Metal/MTLTypes.hpp deleted file mode 100644 index c6bbc031fdfc..000000000000 --- a/thirdparty/metal-cpp/Metal/MTLTypes.hpp +++ /dev/null @@ -1,164 +0,0 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLTypes.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#pragma once - -#include "../Foundation/Foundation.hpp" -#include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" - -namespace MTL -{ -struct SamplePosition; - -using Coordinate2D = MTL::SamplePosition; - -struct Origin -{ - Origin() = default; - - Origin(NS::UInteger x, NS::UInteger y, NS::UInteger z); - - static Origin Make(NS::UInteger x, NS::UInteger y, NS::UInteger z); - - NS::UInteger x; - NS::UInteger y; - NS::UInteger z; -} _MTL_PACKED; - -struct Size -{ - Size() = default; - - Size(NS::UInteger width, NS::UInteger height, NS::UInteger depth); - - static Size Make(NS::UInteger width, NS::UInteger height, NS::UInteger depth); - - NS::UInteger width; - NS::UInteger height; - NS::UInteger depth; -} _MTL_PACKED; - -struct Region -{ - Region() = default; - - Region(NS::UInteger x, NS::UInteger width); - - Region(NS::UInteger x, NS::UInteger y, NS::UInteger width, NS::UInteger height); - - Region(NS::UInteger x, NS::UInteger y, NS::UInteger z, NS::UInteger width, NS::UInteger height, NS::UInteger depth); - - static Region Make1D(NS::UInteger x, NS::UInteger width); - - static Region Make2D(NS::UInteger x, NS::UInteger y, NS::UInteger width, NS::UInteger height); - - static Region Make3D(NS::UInteger x, NS::UInteger y, NS::UInteger z, NS::UInteger width, NS::UInteger height, NS::UInteger depth); - - MTL::Origin origin; - MTL::Size size; -} _MTL_PACKED; - -struct SamplePosition -{ - SamplePosition() = default; - - SamplePosition(float x, float y); - - static SamplePosition Make(float x, float y); - - float x; - float y; -} _MTL_PACKED; - -struct ResourceID -{ - uint64_t _impl; -} _MTL_PACKED; - -} -_MTL_INLINE MTL::Origin::Origin(NS::UInteger x, NS::UInteger y, NS::UInteger z) - : x(x) - , y(y) - , z(z) -{ -} - -_MTL_INLINE MTL::Origin MTL::Origin::Make(NS::UInteger x, NS::UInteger y, NS::UInteger z) -{ - return Origin(x, y, z); -} - -_MTL_INLINE MTL::Size::Size(NS::UInteger width, NS::UInteger height, NS::UInteger depth) - : width(width) - , height(height) - , depth(depth) -{ -} - -_MTL_INLINE MTL::Size MTL::Size::Make(NS::UInteger width, NS::UInteger height, NS::UInteger depth) -{ - return Size(width, height, depth); -} - -_MTL_INLINE MTL::Region::Region(NS::UInteger x, NS::UInteger width) - : origin(x, 0, 0) - , size(width, 1, 1) -{ -} - -_MTL_INLINE MTL::Region::Region(NS::UInteger x, NS::UInteger y, NS::UInteger width, NS::UInteger height) - : origin(x, y, 0) - , size(width, height, 1) -{ -} - -_MTL_INLINE MTL::Region::Region(NS::UInteger x, NS::UInteger y, NS::UInteger z, NS::UInteger width, NS::UInteger height, NS::UInteger depth) - : origin(x, y, z) - , size(width, height, depth) -{ -} - -_MTL_INLINE MTL::Region MTL::Region::Make1D(NS::UInteger x, NS::UInteger width) -{ - return Region(x, width); -} - -_MTL_INLINE MTL::Region MTL::Region::Make2D(NS::UInteger x, NS::UInteger y, NS::UInteger width, NS::UInteger height) -{ - return Region(x, y, width, height); -} - -_MTL_INLINE MTL::Region MTL::Region::Make3D(NS::UInteger x, NS::UInteger y, NS::UInteger z, NS::UInteger width, NS::UInteger height, NS::UInteger depth) -{ - return Region(x, y, z, width, height, depth); -} - -_MTL_INLINE MTL::SamplePosition::SamplePosition(float x, float y) - : x(x) - , y(y) -{ -} - -_MTL_INLINE MTL::SamplePosition MTL::SamplePosition::Make(float x, float y) -{ - return SamplePosition(x, y); -} diff --git a/thirdparty/metal-cpp/Metal/MTLVersion.hpp b/thirdparty/metal-cpp/Metal/MTLVersion.hpp deleted file mode 100644 index d3503972481c..000000000000 --- a/thirdparty/metal-cpp/Metal/MTLVersion.hpp +++ /dev/null @@ -1,32 +0,0 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLVersion.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#pragma once - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#define METALCPP_VERSION_MAJOR 370 -#define METALCPP_VERSION_MINOR 63 -#define METALCPP_VERSION_PATCH 1 - -#define METALCPP_SUPPORTS_VERSION(major, minor, patch) \ - ((major < METALCPP_VERSION_MAJOR) || \ - (major == METALCPP_VERSION_MAJOR && minor < METALCPP_VERSION_MINOR) || \ - (major == METALCPP_VERSION_MAJOR && minor == METALCPP_VERSION_MINOR && patch <= METALCPP_VERSION_PATCH)) diff --git a/thirdparty/metal-cpp/Metal/MTLVertexDescriptor.hpp b/thirdparty/metal-cpp/Metal/MTLVertexDescriptor.hpp index 4a38f3bc6b1e..adadcafd4d33 100644 --- a/thirdparty/metal-cpp/Metal/MTLVertexDescriptor.hpp +++ b/thirdparty/metal-cpp/Metal/MTLVertexDescriptor.hpp @@ -1,37 +1,16 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLVertexDescriptor.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" namespace MTL { -class VertexAttributeDescriptor; -class VertexAttributeDescriptorArray; -class VertexBufferLayoutDescriptor; -class VertexBufferLayoutDescriptorArray; -class VertexDescriptor; + _MTL_ENUM(NS::UInteger, VertexFormat) { VertexFormatInvalid = 0, VertexFormatUChar2 = 1, @@ -97,230 +76,235 @@ _MTL_ENUM(NS::UInteger, VertexStepFunction) { VertexStepFunctionPerPatchControlPoint = 4, }; -static const NS::UInteger BufferLayoutStrideDynamic = NS::UIntegerMax; + +class VertexBufferLayoutDescriptor; +class VertexBufferLayoutDescriptorArray; +class VertexAttributeDescriptor; +class VertexAttributeDescriptorArray; +class VertexDescriptor; class VertexBufferLayoutDescriptor : public NS::Copying { public: static VertexBufferLayoutDescriptor* alloc(); + VertexBufferLayoutDescriptor* init() const; - VertexBufferLayoutDescriptor* init(); - - void setStepFunction(MTL::VertexStepFunction stepFunction); + void setStepFunction(MTL::VertexStepFunction stepFunction); + void setStepRate(NS::UInteger stepRate); + void setStride(NS::UInteger stride); + MTL::VertexStepFunction stepFunction() const; + NS::UInteger stepRate() const; + NS::UInteger stride() const; - void setStepRate(NS::UInteger stepRate); - - void setStride(NS::UInteger stride); - - VertexStepFunction stepFunction() const; - - NS::UInteger stepRate() const; - - NS::UInteger stride() const; }; + class VertexBufferLayoutDescriptorArray : public NS::Referencing { public: static VertexBufferLayoutDescriptorArray* alloc(); + VertexBufferLayoutDescriptorArray* init() const; - VertexBufferLayoutDescriptorArray* init(); + MTL::VertexBufferLayoutDescriptor* object(NS::UInteger index); + void setObject(MTL::VertexBufferLayoutDescriptor* bufferDesc, NS::UInteger index); - VertexBufferLayoutDescriptor* object(NS::UInteger index); - void setObject(const MTL::VertexBufferLayoutDescriptor* bufferDesc, NS::UInteger index); }; + class VertexAttributeDescriptor : public NS::Copying { public: static VertexAttributeDescriptor* alloc(); + VertexAttributeDescriptor* init() const; - NS::UInteger bufferIndex() const; - - VertexFormat format() const; + NS::UInteger bufferIndex() const; + MTL::VertexFormat format() const; + NS::UInteger offset() const; + void setBufferIndex(NS::UInteger bufferIndex); + void setFormat(MTL::VertexFormat format); + void setOffset(NS::UInteger offset); - VertexAttributeDescriptor* init(); - - NS::UInteger offset() const; - - void setBufferIndex(NS::UInteger bufferIndex); - - void setFormat(MTL::VertexFormat format); - - void setOffset(NS::UInteger offset); }; + class VertexAttributeDescriptorArray : public NS::Referencing { public: static VertexAttributeDescriptorArray* alloc(); + VertexAttributeDescriptorArray* init() const; - VertexAttributeDescriptorArray* init(); + MTL::VertexAttributeDescriptor* object(NS::UInteger index); + void setObject(MTL::VertexAttributeDescriptor* attributeDesc, NS::UInteger index); - VertexAttributeDescriptor* object(NS::UInteger index); - void setObject(const MTL::VertexAttributeDescriptor* attributeDesc, NS::UInteger index); }; + class VertexDescriptor : public NS::Copying { public: - static VertexDescriptor* alloc(); + static VertexDescriptor* alloc(); + VertexDescriptor* init() const; - VertexAttributeDescriptorArray* attributes() const; + static MTL::VertexDescriptor* vertexDescriptor(); - VertexDescriptor* init(); + MTL::VertexAttributeDescriptorArray* attributes() const; + MTL::VertexBufferLayoutDescriptorArray* layouts() const; + void reset(); - VertexBufferLayoutDescriptorArray* layouts() const; +}; - void reset(); +} // namespace MTL - static VertexDescriptor* vertexDescriptor(); -}; +// --- Class symbols + inline implementations --- -} +extern "C" void *OBJC_CLASS_$_MTLVertexBufferLayoutDescriptor; +extern "C" void *OBJC_CLASS_$_MTLVertexBufferLayoutDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLVertexAttributeDescriptor; +extern "C" void *OBJC_CLASS_$_MTLVertexAttributeDescriptorArray; +extern "C" void *OBJC_CLASS_$_MTLVertexDescriptor; _MTL_INLINE MTL::VertexBufferLayoutDescriptor* MTL::VertexBufferLayoutDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLVertexBufferLayoutDescriptor)); + return _MTL_msg_MTL__VertexBufferLayoutDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLVertexBufferLayoutDescriptor, nullptr); } -_MTL_INLINE MTL::VertexBufferLayoutDescriptor* MTL::VertexBufferLayoutDescriptor::init() +_MTL_INLINE MTL::VertexBufferLayoutDescriptor* MTL::VertexBufferLayoutDescriptor::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__VertexBufferLayoutDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE void MTL::VertexBufferLayoutDescriptor::setStepFunction(MTL::VertexStepFunction stepFunction) +_MTL_INLINE NS::UInteger MTL::VertexBufferLayoutDescriptor::stride() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStepFunction_), stepFunction); + return _MTL_msg_NS__UInteger_stride((const void*)this, nullptr); } -_MTL_INLINE void MTL::VertexBufferLayoutDescriptor::setStepRate(NS::UInteger stepRate) +_MTL_INLINE void MTL::VertexBufferLayoutDescriptor::setStride(NS::UInteger stride) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStepRate_), stepRate); + _MTL_msg_v_setStride__NS__UInteger((const void*)this, nullptr, stride); } -_MTL_INLINE void MTL::VertexBufferLayoutDescriptor::setStride(NS::UInteger stride) +_MTL_INLINE MTL::VertexStepFunction MTL::VertexBufferLayoutDescriptor::stepFunction() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setStride_), stride); + return _MTL_msg_MTL__VertexStepFunction_stepFunction((const void*)this, nullptr); } -_MTL_INLINE MTL::VertexStepFunction MTL::VertexBufferLayoutDescriptor::stepFunction() const +_MTL_INLINE void MTL::VertexBufferLayoutDescriptor::setStepFunction(MTL::VertexStepFunction stepFunction) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stepFunction)); + _MTL_msg_v_setStepFunction__MTL__VertexStepFunction((const void*)this, nullptr, stepFunction); } _MTL_INLINE NS::UInteger MTL::VertexBufferLayoutDescriptor::stepRate() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stepRate)); + return _MTL_msg_NS__UInteger_stepRate((const void*)this, nullptr); } -_MTL_INLINE NS::UInteger MTL::VertexBufferLayoutDescriptor::stride() const +_MTL_INLINE void MTL::VertexBufferLayoutDescriptor::setStepRate(NS::UInteger stepRate) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(stride)); + _MTL_msg_v_setStepRate__NS__UInteger((const void*)this, nullptr, stepRate); } _MTL_INLINE MTL::VertexBufferLayoutDescriptorArray* MTL::VertexBufferLayoutDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLVertexBufferLayoutDescriptorArray)); + return _MTL_msg_MTL__VertexBufferLayoutDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLVertexBufferLayoutDescriptorArray, nullptr); } -_MTL_INLINE MTL::VertexBufferLayoutDescriptorArray* MTL::VertexBufferLayoutDescriptorArray::init() +_MTL_INLINE MTL::VertexBufferLayoutDescriptorArray* MTL::VertexBufferLayoutDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__VertexBufferLayoutDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::VertexBufferLayoutDescriptor* MTL::VertexBufferLayoutDescriptorArray::object(NS::UInteger index) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), index); + return _MTL_msg_MTL__VertexBufferLayoutDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, index); } -_MTL_INLINE void MTL::VertexBufferLayoutDescriptorArray::setObject(const MTL::VertexBufferLayoutDescriptor* bufferDesc, NS::UInteger index) +_MTL_INLINE void MTL::VertexBufferLayoutDescriptorArray::setObject(MTL::VertexBufferLayoutDescriptor* bufferDesc, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), bufferDesc, index); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__VertexBufferLayoutDescriptorp_NS__UInteger((const void*)this, nullptr, bufferDesc, index); } _MTL_INLINE MTL::VertexAttributeDescriptor* MTL::VertexAttributeDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLVertexAttributeDescriptor)); + return _MTL_msg_MTL__VertexAttributeDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLVertexAttributeDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::VertexAttributeDescriptor::bufferIndex() const +_MTL_INLINE MTL::VertexAttributeDescriptor* MTL::VertexAttributeDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(bufferIndex)); + return _MTL_msg_MTL__VertexAttributeDescriptorp_init((const void*)this, nullptr); } _MTL_INLINE MTL::VertexFormat MTL::VertexAttributeDescriptor::format() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(format)); + return _MTL_msg_MTL__VertexFormat_format((const void*)this, nullptr); } -_MTL_INLINE MTL::VertexAttributeDescriptor* MTL::VertexAttributeDescriptor::init() +_MTL_INLINE void MTL::VertexAttributeDescriptor::setFormat(MTL::VertexFormat format) { - return NS::Object::init(); + _MTL_msg_v_setFormat__MTL__VertexFormat((const void*)this, nullptr, format); } _MTL_INLINE NS::UInteger MTL::VertexAttributeDescriptor::offset() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(offset)); + return _MTL_msg_NS__UInteger_offset((const void*)this, nullptr); } -_MTL_INLINE void MTL::VertexAttributeDescriptor::setBufferIndex(NS::UInteger bufferIndex) +_MTL_INLINE void MTL::VertexAttributeDescriptor::setOffset(NS::UInteger offset) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setBufferIndex_), bufferIndex); + _MTL_msg_v_setOffset__NS__UInteger((const void*)this, nullptr, offset); } -_MTL_INLINE void MTL::VertexAttributeDescriptor::setFormat(MTL::VertexFormat format) +_MTL_INLINE NS::UInteger MTL::VertexAttributeDescriptor::bufferIndex() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFormat_), format); + return _MTL_msg_NS__UInteger_bufferIndex((const void*)this, nullptr); } -_MTL_INLINE void MTL::VertexAttributeDescriptor::setOffset(NS::UInteger offset) +_MTL_INLINE void MTL::VertexAttributeDescriptor::setBufferIndex(NS::UInteger bufferIndex) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setOffset_), offset); + _MTL_msg_v_setBufferIndex__NS__UInteger((const void*)this, nullptr, bufferIndex); } _MTL_INLINE MTL::VertexAttributeDescriptorArray* MTL::VertexAttributeDescriptorArray::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLVertexAttributeDescriptorArray)); + return _MTL_msg_MTL__VertexAttributeDescriptorArrayp_alloc((const void*)&OBJC_CLASS_$_MTLVertexAttributeDescriptorArray, nullptr); } -_MTL_INLINE MTL::VertexAttributeDescriptorArray* MTL::VertexAttributeDescriptorArray::init() +_MTL_INLINE MTL::VertexAttributeDescriptorArray* MTL::VertexAttributeDescriptorArray::init() const { - return NS::Object::init(); + return _MTL_msg_MTL__VertexAttributeDescriptorArrayp_init((const void*)this, nullptr); } _MTL_INLINE MTL::VertexAttributeDescriptor* MTL::VertexAttributeDescriptorArray::object(NS::UInteger index) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), index); + return _MTL_msg_MTL__VertexAttributeDescriptorp_objectAtIndexedSubscript__NS__UInteger((const void*)this, nullptr, index); } -_MTL_INLINE void MTL::VertexAttributeDescriptorArray::setObject(const MTL::VertexAttributeDescriptor* attributeDesc, NS::UInteger index) +_MTL_INLINE void MTL::VertexAttributeDescriptorArray::setObject(MTL::VertexAttributeDescriptor* attributeDesc, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attributeDesc, index); + _MTL_msg_v_setObject_atIndexedSubscript__MTL__VertexAttributeDescriptorp_NS__UInteger((const void*)this, nullptr, attributeDesc, index); } _MTL_INLINE MTL::VertexDescriptor* MTL::VertexDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLVertexDescriptor)); + return _MTL_msg_MTL__VertexDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLVertexDescriptor, nullptr); } -_MTL_INLINE MTL::VertexAttributeDescriptorArray* MTL::VertexDescriptor::attributes() const +_MTL_INLINE MTL::VertexDescriptor* MTL::VertexDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(attributes)); + return _MTL_msg_MTL__VertexDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::VertexDescriptor* MTL::VertexDescriptor::init() +_MTL_INLINE MTL::VertexDescriptor* MTL::VertexDescriptor::vertexDescriptor() { - return NS::Object::init(); + return _MTL_msg_MTL__VertexDescriptorp_vertexDescriptor((const void*)&OBJC_CLASS_$_MTLVertexDescriptor, nullptr); } _MTL_INLINE MTL::VertexBufferLayoutDescriptorArray* MTL::VertexDescriptor::layouts() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(layouts)); + return _MTL_msg_MTL__VertexBufferLayoutDescriptorArrayp_layouts((const void*)this, nullptr); } -_MTL_INLINE void MTL::VertexDescriptor::reset() +_MTL_INLINE MTL::VertexAttributeDescriptorArray* MTL::VertexDescriptor::attributes() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); + return _MTL_msg_MTL__VertexAttributeDescriptorArrayp_attributes((const void*)this, nullptr); } -_MTL_INLINE MTL::VertexDescriptor* MTL::VertexDescriptor::vertexDescriptor() +_MTL_INLINE void MTL::VertexDescriptor::reset() { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLVertexDescriptor), _MTL_PRIVATE_SEL(vertexDescriptor)); + _MTL_msg_v_reset((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/Metal/MTLVisibleFunctionTable.hpp b/thirdparty/metal-cpp/Metal/MTLVisibleFunctionTable.hpp index de144ea2bb18..1ade6e61d923 100644 --- a/thirdparty/metal-cpp/Metal/MTLVisibleFunctionTable.hpp +++ b/thirdparty/metal-cpp/Metal/MTLVisibleFunctionTable.hpp @@ -1,96 +1,89 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/MTLVisibleFunctionTable.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -#include "../Foundation/Foundation.hpp" #include "MTLDefines.hpp" -#include "MTLHeaderBridge.hpp" -#include "MTLPrivate.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" +#include "MTLBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLResource.hpp" -#include "MTLTypes.hpp" + +namespace MTL { + class FunctionHandle; +} namespace MTL { -class FunctionHandle; + class VisibleFunctionTableDescriptor; +class VisibleFunctionTable; class VisibleFunctionTableDescriptor : public NS::Copying { public: static VisibleFunctionTableDescriptor* alloc(); + VisibleFunctionTableDescriptor* init() const; - NS::UInteger functionCount() const; + static MTL::VisibleFunctionTableDescriptor* visibleFunctionTableDescriptor(); - VisibleFunctionTableDescriptor* init(); + NS::UInteger functionCount() const; + void setFunctionCount(NS::UInteger functionCount); - void setFunctionCount(NS::UInteger functionCount); - - static VisibleFunctionTableDescriptor* visibleFunctionTableDescriptor(); }; -class VisibleFunctionTable : public NS::Referencing + +class VisibleFunctionTable : public NS::Referencing { public: - ResourceID gpuResourceID() const; + MTL::ResourceID gpuResourceID() const; + void setFunction(MTL::FunctionHandle* function, NS::UInteger index); + void setFunctions(const MTL::FunctionHandle* const * functions, NS::Range range); - void setFunction(const MTL::FunctionHandle* function, NS::UInteger index); - void setFunctions(const MTL::FunctionHandle* const functions[], NS::Range range); }; -} +} // namespace MTL + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLVisibleFunctionTableDescriptor; +extern "C" void *OBJC_CLASS_$_MTLVisibleFunctionTable; + _MTL_INLINE MTL::VisibleFunctionTableDescriptor* MTL::VisibleFunctionTableDescriptor::alloc() { - return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLVisibleFunctionTableDescriptor)); + return _MTL_msg_MTL__VisibleFunctionTableDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLVisibleFunctionTableDescriptor, nullptr); } -_MTL_INLINE NS::UInteger MTL::VisibleFunctionTableDescriptor::functionCount() const +_MTL_INLINE MTL::VisibleFunctionTableDescriptor* MTL::VisibleFunctionTableDescriptor::init() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(functionCount)); + return _MTL_msg_MTL__VisibleFunctionTableDescriptorp_init((const void*)this, nullptr); } -_MTL_INLINE MTL::VisibleFunctionTableDescriptor* MTL::VisibleFunctionTableDescriptor::init() +_MTL_INLINE MTL::VisibleFunctionTableDescriptor* MTL::VisibleFunctionTableDescriptor::visibleFunctionTableDescriptor() { - return NS::Object::init(); + return _MTL_msg_MTL__VisibleFunctionTableDescriptorp_visibleFunctionTableDescriptor((const void*)&OBJC_CLASS_$_MTLVisibleFunctionTableDescriptor, nullptr); } -_MTL_INLINE void MTL::VisibleFunctionTableDescriptor::setFunctionCount(NS::UInteger functionCount) +_MTL_INLINE NS::UInteger MTL::VisibleFunctionTableDescriptor::functionCount() const { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctionCount_), functionCount); + return _MTL_msg_NS__UInteger_functionCount((const void*)this, nullptr); } -_MTL_INLINE MTL::VisibleFunctionTableDescriptor* MTL::VisibleFunctionTableDescriptor::visibleFunctionTableDescriptor() +_MTL_INLINE void MTL::VisibleFunctionTableDescriptor::setFunctionCount(NS::UInteger functionCount) { - return Object::sendMessage(_MTL_PRIVATE_CLS(MTLVisibleFunctionTableDescriptor), _MTL_PRIVATE_SEL(visibleFunctionTableDescriptor)); + _MTL_msg_v_setFunctionCount__NS__UInteger((const void*)this, nullptr, functionCount); } _MTL_INLINE MTL::ResourceID MTL::VisibleFunctionTable::gpuResourceID() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(gpuResourceID)); + return _MTL_msg_MTL__ResourceID_gpuResourceID((const void*)this, nullptr); } -_MTL_INLINE void MTL::VisibleFunctionTable::setFunction(const MTL::FunctionHandle* function, NS::UInteger index) +_MTL_INLINE void MTL::VisibleFunctionTable::setFunction(MTL::FunctionHandle* function, NS::UInteger index) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunction_atIndex_), function, index); + _MTL_msg_v_setFunction_atIndex__MTL__FunctionHandlep_NS__UInteger((const void*)this, nullptr, function, index); } -_MTL_INLINE void MTL::VisibleFunctionTable::setFunctions(const MTL::FunctionHandle* const functions[], NS::Range range) +_MTL_INLINE void MTL::VisibleFunctionTable::setFunctions(const MTL::FunctionHandle* const * functions, NS::Range range) { - Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctions_withRange_), functions, range); + _MTL_msg_v_setFunctions_withRange__constMTL__FunctionHandlepconstp_NS__Range((const void*)this, nullptr, functions, range); } diff --git a/thirdparty/metal-cpp/Metal/Metal.hpp b/thirdparty/metal-cpp/Metal/Metal.hpp index 0d89cc044b4d..057f5a44088e 100644 --- a/thirdparty/metal-cpp/Metal/Metal.hpp +++ b/thirdparty/metal-cpp/Metal/Metal.hpp @@ -1,32 +1,14 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// Metal/Metal.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - +#include "MTLDefines.hpp" +#include "MTLBlocks.hpp" +#include "MTLStructs.hpp" #include "MTLAccelerationStructure.hpp" #include "MTLAccelerationStructureCommandEncoder.hpp" #include "MTLAccelerationStructureTypes.hpp" #include "MTLAllocation.hpp" #include "MTLArgument.hpp" +#include "MTLArgument.hpp" #include "MTLArgumentEncoder.hpp" #include "MTLBinaryArchive.hpp" #include "MTLBlitCommandEncoder.hpp" @@ -41,9 +23,13 @@ #include "MTLComputePass.hpp" #include "MTLComputePipeline.hpp" #include "MTLCounters.hpp" +#include "MTLDataType.hpp" +#include "MTLDataType.hpp" #include "MTLDefines.hpp" #include "MTLDepthStencil.hpp" +#include "MTLDepthStencil.hpp" #include "MTLDevice.hpp" +#include "MTLDeviceCertification.hpp" #include "MTLDrawable.hpp" #include "MTLDynamicLibrary.hpp" #include "MTLEvent.hpp" @@ -53,68 +39,42 @@ #include "MTLFunctionHandle.hpp" #include "MTLFunctionLog.hpp" #include "MTLFunctionStitching.hpp" -#include "MTLHeaderBridge.hpp" +#include "MTLGPUAddress.hpp" #include "MTLHeap.hpp" -#include "MTLIndirectCommandBuffer.hpp" -#include "MTLIndirectCommandEncoder.hpp" -#include "MTLIntersectionFunctionTable.hpp" #include "MTLIOCommandBuffer.hpp" #include "MTLIOCommandQueue.hpp" #include "MTLIOCompressor.hpp" +#include "MTLIndirectCommandBuffer.hpp" +#include "MTLIndirectCommandEncoder.hpp" +#include "MTLIntersectionFunctionTable.hpp" #include "MTLLibrary.hpp" #include "MTLLinkedFunctions.hpp" #include "MTLLogState.hpp" #include "MTLParallelRenderCommandEncoder.hpp" #include "MTLPipeline.hpp" #include "MTLPixelFormat.hpp" +#include "MTLPixelFormat.hpp" #include "MTLPrivate.hpp" #include "MTLRasterizationRate.hpp" #include "MTLRenderCommandEncoder.hpp" #include "MTLRenderPass.hpp" +#include "MTLRenderPass.hpp" +#include "MTLRenderPipeline.hpp" #include "MTLRenderPipeline.hpp" #include "MTLResidencySet.hpp" #include "MTLResource.hpp" +#include "MTLResource.hpp" #include "MTLResourceStateCommandEncoder.hpp" #include "MTLResourceStatePass.hpp" +#include "MTLResourceViewPool.hpp" #include "MTLSampler.hpp" +#include "MTLSampler.hpp" +#include "MTLStageInputOutputDescriptor.hpp" #include "MTLStageInputOutputDescriptor.hpp" +#include "MTLTensor.hpp" #include "MTLTexture.hpp" -#include "MTLTypes.hpp" +#include "MTLTextureViewPool.hpp" #include "MTLVertexDescriptor.hpp" #include "MTLVisibleFunctionTable.hpp" -#include "MTLVersion.hpp" -#include "MTLTensor.hpp" -#include "MTLResourceViewPool.hpp" -#include "MTLTextureViewPool.hpp" -#include "MTLDataType.hpp" -#include "MTL4ArgumentTable.hpp" -#include "MTL4BinaryFunction.hpp" -#include "MTL4CommandAllocator.hpp" -#include "MTL4CommandBuffer.hpp" -#include "MTL4CommandEncoder.hpp" -#include "MTL4CommandQueue.hpp" -#include "MTL4Counters.hpp" -#include "MTL4RenderPass.hpp" -#include "MTL4RenderCommandEncoder.hpp" -#include "MTL4ComputeCommandEncoder.hpp" -#include "MTL4MachineLearningCommandEncoder.hpp" -#include "MTL4Compiler.hpp" -#include "MTL4CompilerTask.hpp" -#include "MTL4LibraryDescriptor.hpp" -#include "MTL4FunctionDescriptor.hpp" -#include "MTL4LibraryFunctionDescriptor.hpp" -#include "MTL4SpecializedFunctionDescriptor.hpp" -#include "MTL4StitchedFunctionDescriptor.hpp" -#include "MTL4PipelineState.hpp" -#include "MTL4ComputePipeline.hpp" -#include "MTL4RenderPipeline.hpp" -#include "MTL4MachineLearningPipeline.hpp" -#include "MTL4TileRenderPipeline.hpp" -#include "MTL4MeshRenderPipeline.hpp" -#include "MTL4PipelineDataSetSerializer.hpp" -#include "MTL4Archive.hpp" -#include "MTL4CommitFeedback.hpp" -#include "MTL4BinaryFunctionDescriptor.hpp" -#include "MTL4LinkingDescriptor.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +#include "Metal4.hpp" +#include "MTLDeviceExtras.hpp" diff --git a/thirdparty/metal-cpp/Metal/Metal4.hpp b/thirdparty/metal-cpp/Metal/Metal4.hpp new file mode 100644 index 000000000000..0b6db7f7024a --- /dev/null +++ b/thirdparty/metal-cpp/Metal/Metal4.hpp @@ -0,0 +1,35 @@ +#pragma once + +#include "MTL4Defines.hpp" +#include "MTL4Blocks.hpp" +#include "MTL4Structs.hpp" +#include "MTL4AccelerationStructure.hpp" +#include "MTL4Archive.hpp" +#include "MTL4ArgumentTable.hpp" +#include "MTL4BinaryFunction.hpp" +#include "MTL4BinaryFunctionDescriptor.hpp" +#include "MTL4CommandAllocator.hpp" +#include "MTL4CommandBuffer.hpp" +#include "MTL4CommandEncoder.hpp" +#include "MTL4CommandQueue.hpp" +#include "MTL4CommitFeedback.hpp" +#include "MTL4Compiler.hpp" +#include "MTL4CompilerTask.hpp" +#include "MTL4ComputeCommandEncoder.hpp" +#include "MTL4ComputePipeline.hpp" +#include "MTL4Counters.hpp" +#include "MTL4FunctionDescriptor.hpp" +#include "MTL4LibraryDescriptor.hpp" +#include "MTL4LibraryFunctionDescriptor.hpp" +#include "MTL4LinkingDescriptor.hpp" +#include "MTL4MachineLearningCommandEncoder.hpp" +#include "MTL4MachineLearningPipeline.hpp" +#include "MTL4MeshRenderPipeline.hpp" +#include "MTL4PipelineDataSetSerializer.hpp" +#include "MTL4PipelineState.hpp" +#include "MTL4RenderCommandEncoder.hpp" +#include "MTL4RenderPass.hpp" +#include "MTL4RenderPipeline.hpp" +#include "MTL4SpecializedFunctionDescriptor.hpp" +#include "MTL4StitchedFunctionDescriptor.hpp" +#include "MTL4TileRenderPipeline.hpp" diff --git a/thirdparty/metal-cpp/MetalFX/MTL4FXBridge.hpp b/thirdparty/metal-cpp/MetalFX/MTL4FXBridge.hpp new file mode 100644 index 000000000000..c522885d7c55 --- /dev/null +++ b/thirdparty/metal-cpp/MetalFX/MTL4FXBridge.hpp @@ -0,0 +1,25 @@ +#pragma once + +// Consolidated extern "C" trampoline decls for this framework. +// One entry per (return, args, selector) — identical C++ signatures +// across multiple classes collapse to a single linker alias of +// `_objc_msgSend$`. Per-class headers include this file +// instead of declaring their own externs. + +#include "MTL4FXDefines.hpp" +#include +#include "../Foundation/NSTypes.hpp" + +namespace MTL4 { + class CommandBuffer; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +#pragma clang diagnostic ignored "-Wunguarded-availability-new" + +extern "C" { +void _MTL4FX_msg_v_encodeToCommandBuffer__MTL4__CommandBufferp(const void*, SEL, MTL4::CommandBuffer*) __asm__("_objc_msgSend$" "encodeToCommandBuffer:"); +} // extern "C" + +#pragma clang diagnostic pop diff --git a/thirdparty/metal-cpp/MetalFX/MTL4FXDefines.hpp b/thirdparty/metal-cpp/MetalFX/MTL4FXDefines.hpp new file mode 100644 index 000000000000..ed57b394a51d --- /dev/null +++ b/thirdparty/metal-cpp/MetalFX/MTL4FXDefines.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../Foundation/NSDefines.hpp" + +#define _MTL4FX_EXPORT _NS_EXPORT +#define _MTL4FX_EXTERN _NS_EXTERN +#define _MTL4FX_INLINE _NS_INLINE +#define _MTL4FX_PACKED _NS_PACKED + +#define _MTL4FX_CONST(type, name) _NS_CONST(type, name) +#define _MTL4FX_ENUM(type, name) _NS_ENUM(type, name) +#define _MTL4FX_OPTIONS(type, name) _NS_OPTIONS(type, name) + +#define _MTL4FX_VALIDATE_SIZE(ns, name) _NS_VALIDATE_SIZE(ns, name) +#define _MTL4FX_VALIDATE_ENUM(ns, name) _NS_VALIDATE_ENUM(ns, name) diff --git a/thirdparty/metal-cpp/MetalFX/MTL4FXFrameInterpolator.hpp b/thirdparty/metal-cpp/MetalFX/MTL4FXFrameInterpolator.hpp index 1c50ec9e940a..863c8abc679d 100644 --- a/thirdparty/metal-cpp/MetalFX/MTL4FXFrameInterpolator.hpp +++ b/thirdparty/metal-cpp/MetalFX/MTL4FXFrameInterpolator.hpp @@ -1,47 +1,33 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// MetalFX/MTL4FXFrameInterpolator.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include "MTLFXDefines.hpp" -#include "MTLFXPrivate.hpp" - +#include "MTL4FXDefines.hpp" +#include "MTL4FXBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLFXFrameInterpolator.hpp" -#include "../Metal/Metal.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace MTL4 { + class CommandBuffer; +} namespace MTL4FX { - class FrameInterpolator : public NS::Referencing - { - public: - void encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer); - }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +class FrameInterpolator : public NS::Referencing +{ +public: + void encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer); + +}; + +} // namespace MTL4FX + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4FXFrameInterpolator; -_MTLFX_INLINE void MTL4FX::FrameInterpolator::encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer) +_MTL4FX_INLINE void MTL4FX::FrameInterpolator::encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), commandBuffer ); + _MTL4FX_msg_v_encodeToCommandBuffer__MTL4__CommandBufferp((const void*)this, nullptr, commandBuffer); } diff --git a/thirdparty/metal-cpp/MetalFX/MTL4FXSpatialScaler.hpp b/thirdparty/metal-cpp/MetalFX/MTL4FXSpatialScaler.hpp index 8ea8dfdd592b..ff5b8367ff5d 100644 --- a/thirdparty/metal-cpp/MetalFX/MTL4FXSpatialScaler.hpp +++ b/thirdparty/metal-cpp/MetalFX/MTL4FXSpatialScaler.hpp @@ -1,49 +1,33 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// MetalFX/MTL4FXSpatialScaler.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include "MTLFXDefines.hpp" -#include "MTLFXPrivate.hpp" - +#include "MTL4FXDefines.hpp" +#include "MTL4FXBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLFXSpatialScaler.hpp" -#include "../Metal/Metal.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace MTL4 { + class CommandBuffer; +} namespace MTL4FX { - class SpatialScaler : public NS::Referencing< SpatialScaler, MTLFX::SpatialScalerBase > - { - public: - void encodeToCommandBuffer( MTL4::CommandBuffer* pCommandBuffer ); - }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +class SpatialScaler : public NS::Referencing +{ +public: + void encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer); -_MTLFX_INLINE void MTL4FX::SpatialScaler::encodeToCommandBuffer( MTL4::CommandBuffer* pCommandBuffer ) +}; + +} // namespace MTL4FX + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4FXSpatialScaler; + +_MTL4FX_INLINE void MTL4FX::SpatialScaler::encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), pCommandBuffer ); + _MTL4FX_msg_v_encodeToCommandBuffer__MTL4__CommandBufferp((const void*)this, nullptr, commandBuffer); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/MetalFX/MTL4FXTemporalDenoisedScaler.hpp b/thirdparty/metal-cpp/MetalFX/MTL4FXTemporalDenoisedScaler.hpp index 73014bbc256d..b82c82f90e7a 100644 --- a/thirdparty/metal-cpp/MetalFX/MTL4FXTemporalDenoisedScaler.hpp +++ b/thirdparty/metal-cpp/MetalFX/MTL4FXTemporalDenoisedScaler.hpp @@ -1,49 +1,33 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// MetalFX/MTLFXTemporalDenoisedScaler.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include "MTLFXDefines.hpp" -#include "MTLFXPrivate.hpp" - +#include "MTL4FXDefines.hpp" +#include "MTL4FXBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLFXTemporalDenoisedScaler.hpp" -#include "../Metal/Metal.hpp" -#include - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace MTL4 { + class CommandBuffer; +} namespace MTL4FX { - class TemporalDenoisedScaler : public NS::Referencing< TemporalDenoisedScaler, MTLFX::TemporalDenoisedScalerBase > - { - public: - void encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer); - }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +class TemporalDenoisedScaler : public NS::Referencing +{ +public: + void encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer); + +}; + +} // namespace MTL4FX + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4FXTemporalDenoisedScaler; -_MTLFX_INLINE void MTL4FX::TemporalDenoisedScaler::encodeToCommandBuffer( MTL4::CommandBuffer* commandBuffer ) +_MTL4FX_INLINE void MTL4FX::TemporalDenoisedScaler::encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), commandBuffer ); + _MTL4FX_msg_v_encodeToCommandBuffer__MTL4__CommandBufferp((const void*)this, nullptr, commandBuffer); } diff --git a/thirdparty/metal-cpp/MetalFX/MTL4FXTemporalScaler.hpp b/thirdparty/metal-cpp/MetalFX/MTL4FXTemporalScaler.hpp index 3bda5dca8a9a..5f18b168b3e2 100644 --- a/thirdparty/metal-cpp/MetalFX/MTL4FXTemporalScaler.hpp +++ b/thirdparty/metal-cpp/MetalFX/MTL4FXTemporalScaler.hpp @@ -1,49 +1,33 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// MetalFX/MTL4FXTemporalScaler.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include "MTLFXDefines.hpp" -#include "MTLFXPrivate.hpp" - +#include "MTL4FXDefines.hpp" +#include "MTL4FXBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include "MTLFXTemporalScaler.hpp" -#include "../Metal/Metal.hpp" -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace MTL4 { + class CommandBuffer; +} namespace MTL4FX { - class TemporalScaler : public NS::Referencing< TemporalScaler, MTLFX::TemporalScalerBase > - { - public: - void encodeToCommandBuffer( MTL4::CommandBuffer* pCommandBuffer ); - }; -} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +class TemporalScaler : public NS::Referencing +{ +public: + void encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer); -_MTLFX_INLINE void MTL4FX::TemporalScaler::encodeToCommandBuffer( MTL4::CommandBuffer* pCommandBuffer ) +}; + +} // namespace MTL4FX + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTL4FXTemporalScaler; + +_MTL4FX_INLINE void MTL4FX::TemporalScaler::encodeToCommandBuffer(MTL4::CommandBuffer* commandBuffer) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), pCommandBuffer ); + _MTL4FX_msg_v_encodeToCommandBuffer__MTL4__CommandBufferp((const void*)this, nullptr, commandBuffer); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/MetalFX/MTLFXBridge.hpp b/thirdparty/metal-cpp/MetalFX/MTLFXBridge.hpp new file mode 100644 index 000000000000..5c8b50618f71 --- /dev/null +++ b/thirdparty/metal-cpp/MetalFX/MTLFXBridge.hpp @@ -0,0 +1,221 @@ +#pragma once + +// Consolidated extern "C" trampoline decls for this framework. +// One entry per (return, args, selector) — identical C++ signatures +// across multiple classes collapse to a single linker alias of +// `_objc_msgSend$`. Per-class headers include this file +// instead of declaring their own externs. + +#include "MTLFXDefines.hpp" +#include +#include "../Foundation/NSTypes.hpp" + +namespace MTL { + class CommandBuffer; + class Device; + class Fence; + class Texture; + enum PixelFormat : NS::UInteger; + using TextureUsage = NS::UInteger; +} +namespace MTL4 { + class Compiler; +} +namespace MTL4FX { + class FrameInterpolator; + class SpatialScaler; + class TemporalDenoisedScaler; + class TemporalScaler; +} +namespace MTLFX { + class FrameInterpolator; + class FrameInterpolatorDescriptor; + class SpatialScaler; + class SpatialScalerDescriptor; + class TemporalDenoisedScaler; + class TemporalDenoisedScalerDescriptor; + class TemporalScaler; + class TemporalScalerDescriptor; + enum SpatialScalerColorProcessingMode : NS::Integer; +} +namespace NS { + class Object; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +#pragma clang diagnostic ignored "-Wunguarded-availability-new" + +extern "C" { +MTLFX::FrameInterpolatorDescriptor* _MTLFX_msg_MTLFX__FrameInterpolatorDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTLFX::SpatialScalerDescriptor* _MTLFX_msg_MTLFX__SpatialScalerDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTLFX::TemporalDenoisedScalerDescriptor* _MTLFX_msg_MTLFX__TemporalDenoisedScalerDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +MTLFX::TemporalScalerDescriptor* _MTLFX_msg_MTLFX__TemporalScalerDescriptorp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +float _MTLFX_msg_float_aspectRatio(const void*, SEL) __asm__("_objc_msgSend$" "aspectRatio"); +bool _MTLFX_msg_bool_autoExposureEnabled(const void*, SEL) __asm__("_objc_msgSend$" "autoExposureEnabled"); +MTLFX::SpatialScalerColorProcessingMode _MTLFX_msg_MTLFX__SpatialScalerColorProcessingMode_colorProcessingMode(const void*, SEL) __asm__("_objc_msgSend$" "colorProcessingMode"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_colorTexture(const void*, SEL) __asm__("_objc_msgSend$" "colorTexture"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_colorTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "colorTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_colorTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "colorTextureUsage"); +float _MTLFX_msg_float_deltaTime(const void*, SEL) __asm__("_objc_msgSend$" "deltaTime"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_denoiseStrengthMaskTexture(const void*, SEL) __asm__("_objc_msgSend$" "denoiseStrengthMaskTexture"); +bool _MTLFX_msg_bool_denoiseStrengthMaskTextureEnabled(const void*, SEL) __asm__("_objc_msgSend$" "denoiseStrengthMaskTextureEnabled"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_denoiseStrengthMaskTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "denoiseStrengthMaskTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_denoiseStrengthMaskTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "denoiseStrengthMaskTextureUsage"); +bool _MTLFX_msg_bool_depthReversed(const void*, SEL) __asm__("_objc_msgSend$" "depthReversed"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_depthTexture(const void*, SEL) __asm__("_objc_msgSend$" "depthTexture"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_depthTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "depthTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_depthTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "depthTextureUsage"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_diffuseAlbedoTexture(const void*, SEL) __asm__("_objc_msgSend$" "diffuseAlbedoTexture"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_diffuseAlbedoTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "diffuseAlbedoTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_diffuseAlbedoTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "diffuseAlbedoTextureUsage"); +void _MTLFX_msg_v_encodeToCommandBuffer__MTL__CommandBufferp(const void*, SEL, MTL::CommandBuffer*) __asm__("_objc_msgSend$" "encodeToCommandBuffer:"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_exposureTexture(const void*, SEL) __asm__("_objc_msgSend$" "exposureTexture"); +float _MTLFX_msg_float_farPlane(const void*, SEL) __asm__("_objc_msgSend$" "farPlane"); +MTL::Fence* _MTLFX_msg_MTL__Fencep_fence(const void*, SEL) __asm__("_objc_msgSend$" "fence"); +float _MTLFX_msg_float_fieldOfView(const void*, SEL) __asm__("_objc_msgSend$" "fieldOfView"); +MTLFX::FrameInterpolatorDescriptor* _MTLFX_msg_MTLFX__FrameInterpolatorDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTLFX::SpatialScalerDescriptor* _MTLFX_msg_MTLFX__SpatialScalerDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTLFX::TemporalDenoisedScalerDescriptor* _MTLFX_msg_MTLFX__TemporalDenoisedScalerDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +MTLFX::TemporalScalerDescriptor* _MTLFX_msg_MTLFX__TemporalScalerDescriptorp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +NS::UInteger _MTLFX_msg_NS__UInteger_inputContentHeight(const void*, SEL) __asm__("_objc_msgSend$" "inputContentHeight"); +float _MTLFX_msg_float_inputContentMaxScale(const void*, SEL) __asm__("_objc_msgSend$" "inputContentMaxScale"); +float _MTLFX_msg_float_inputContentMinScale(const void*, SEL) __asm__("_objc_msgSend$" "inputContentMinScale"); +bool _MTLFX_msg_bool_inputContentPropertiesEnabled(const void*, SEL) __asm__("_objc_msgSend$" "inputContentPropertiesEnabled"); +NS::UInteger _MTLFX_msg_NS__UInteger_inputContentWidth(const void*, SEL) __asm__("_objc_msgSend$" "inputContentWidth"); +NS::UInteger _MTLFX_msg_NS__UInteger_inputHeight(const void*, SEL) __asm__("_objc_msgSend$" "inputHeight"); +NS::UInteger _MTLFX_msg_NS__UInteger_inputWidth(const void*, SEL) __asm__("_objc_msgSend$" "inputWidth"); +bool _MTLFX_msg_bool_isAutoExposureEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isAutoExposureEnabled"); +bool _MTLFX_msg_bool_isDenoiseStrengthMaskTextureEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isDenoiseStrengthMaskTextureEnabled"); +bool _MTLFX_msg_bool_isDepthReversed(const void*, SEL) __asm__("_objc_msgSend$" "isDepthReversed"); +bool _MTLFX_msg_bool_isInputContentPropertiesEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isInputContentPropertiesEnabled"); +bool _MTLFX_msg_bool_isReactiveMaskTextureEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isReactiveMaskTextureEnabled"); +bool _MTLFX_msg_bool_isSpecularHitDistanceTextureEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isSpecularHitDistanceTextureEnabled"); +bool _MTLFX_msg_bool_isTransparencyOverlayTextureEnabled(const void*, SEL) __asm__("_objc_msgSend$" "isTransparencyOverlayTextureEnabled"); +bool _MTLFX_msg_bool_isUITextureComposited(const void*, SEL) __asm__("_objc_msgSend$" "isUITextureComposited"); +float _MTLFX_msg_float_jitterOffsetX(const void*, SEL) __asm__("_objc_msgSend$" "jitterOffsetX"); +float _MTLFX_msg_float_jitterOffsetY(const void*, SEL) __asm__("_objc_msgSend$" "jitterOffsetY"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_motionTexture(const void*, SEL) __asm__("_objc_msgSend$" "motionTexture"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_motionTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "motionTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_motionTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "motionTextureUsage"); +float _MTLFX_msg_float_motionVectorScaleX(const void*, SEL) __asm__("_objc_msgSend$" "motionVectorScaleX"); +float _MTLFX_msg_float_motionVectorScaleY(const void*, SEL) __asm__("_objc_msgSend$" "motionVectorScaleY"); +float _MTLFX_msg_float_nearPlane(const void*, SEL) __asm__("_objc_msgSend$" "nearPlane"); +MTLFX::FrameInterpolator* _MTLFX_msg_MTLFX__FrameInterpolatorp_newFrameInterpolatorWithDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "newFrameInterpolatorWithDevice:"); +MTL4FX::FrameInterpolator* _MTLFX_msg_MTL4FX__FrameInterpolatorp_newFrameInterpolatorWithDevice_compiler__MTL__Devicep_MTL4__Compilerp(const void*, SEL, MTL::Device*, MTL4::Compiler*) __asm__("_objc_msgSend$" "newFrameInterpolatorWithDevice:compiler:"); +MTLFX::SpatialScaler* _MTLFX_msg_MTLFX__SpatialScalerp_newSpatialScalerWithDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "newSpatialScalerWithDevice:"); +MTL4FX::SpatialScaler* _MTLFX_msg_MTL4FX__SpatialScalerp_newSpatialScalerWithDevice_compiler__MTL__Devicep_MTL4__Compilerp(const void*, SEL, MTL::Device*, MTL4::Compiler*) __asm__("_objc_msgSend$" "newSpatialScalerWithDevice:compiler:"); +MTLFX::TemporalDenoisedScaler* _MTLFX_msg_MTLFX__TemporalDenoisedScalerp_newTemporalDenoisedScalerWithDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "newTemporalDenoisedScalerWithDevice:"); +MTL4FX::TemporalDenoisedScaler* _MTLFX_msg_MTL4FX__TemporalDenoisedScalerp_newTemporalDenoisedScalerWithDevice_compiler__MTL__Devicep_MTL4__Compilerp(const void*, SEL, MTL::Device*, MTL4::Compiler*) __asm__("_objc_msgSend$" "newTemporalDenoisedScalerWithDevice:compiler:"); +MTLFX::TemporalScaler* _MTLFX_msg_MTLFX__TemporalScalerp_newTemporalScalerWithDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "newTemporalScalerWithDevice:"); +MTL4FX::TemporalScaler* _MTLFX_msg_MTL4FX__TemporalScalerp_newTemporalScalerWithDevice_compiler__MTL__Devicep_MTL4__Compilerp(const void*, SEL, MTL::Device*, MTL4::Compiler*) __asm__("_objc_msgSend$" "newTemporalScalerWithDevice:compiler:"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_normalTexture(const void*, SEL) __asm__("_objc_msgSend$" "normalTexture"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_normalTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "normalTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_normalTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "normalTextureUsage"); +NS::UInteger _MTLFX_msg_NS__UInteger_outputHeight(const void*, SEL) __asm__("_objc_msgSend$" "outputHeight"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_outputTexture(const void*, SEL) __asm__("_objc_msgSend$" "outputTexture"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_outputTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "outputTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_outputTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "outputTextureUsage"); +NS::UInteger _MTLFX_msg_NS__UInteger_outputWidth(const void*, SEL) __asm__("_objc_msgSend$" "outputWidth"); +float _MTLFX_msg_float_preExposure(const void*, SEL) __asm__("_objc_msgSend$" "preExposure"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_prevColorTexture(const void*, SEL) __asm__("_objc_msgSend$" "prevColorTexture"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_reactiveMaskTexture(const void*, SEL) __asm__("_objc_msgSend$" "reactiveMaskTexture"); +bool _MTLFX_msg_bool_reactiveMaskTextureEnabled(const void*, SEL) __asm__("_objc_msgSend$" "reactiveMaskTextureEnabled"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_reactiveMaskTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "reactiveMaskTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_reactiveTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "reactiveTextureUsage"); +bool _MTLFX_msg_bool_requiresSynchronousInitialization(const void*, SEL) __asm__("_objc_msgSend$" "requiresSynchronousInitialization"); +bool _MTLFX_msg_bool_reset(const void*, SEL) __asm__("_objc_msgSend$" "reset"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_roughnessTexture(const void*, SEL) __asm__("_objc_msgSend$" "roughnessTexture"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_roughnessTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "roughnessTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_roughnessTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "roughnessTextureUsage"); +NS::Object* _MTLFX_msg_NS__Objectp_scaler(const void*, SEL) __asm__("_objc_msgSend$" "scaler"); +void _MTLFX_msg_v_setAspectRatio__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setAspectRatio:"); +void _MTLFX_msg_v_setAutoExposureEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setAutoExposureEnabled:"); +void _MTLFX_msg_v_setColorProcessingMode__MTLFX__SpatialScalerColorProcessingMode(const void*, SEL, MTLFX::SpatialScalerColorProcessingMode) __asm__("_objc_msgSend$" "setColorProcessingMode:"); +void _MTLFX_msg_v_setColorTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setColorTexture:"); +void _MTLFX_msg_v_setColorTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setColorTextureFormat:"); +void _MTLFX_msg_v_setDeltaTime__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setDeltaTime:"); +void _MTLFX_msg_v_setDenoiseStrengthMaskTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setDenoiseStrengthMaskTexture:"); +void _MTLFX_msg_v_setDenoiseStrengthMaskTextureEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setDenoiseStrengthMaskTextureEnabled:"); +void _MTLFX_msg_v_setDenoiseStrengthMaskTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setDenoiseStrengthMaskTextureFormat:"); +void _MTLFX_msg_v_setDepthReversed__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setDepthReversed:"); +void _MTLFX_msg_v_setDepthTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setDepthTexture:"); +void _MTLFX_msg_v_setDepthTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setDepthTextureFormat:"); +void _MTLFX_msg_v_setDiffuseAlbedoTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setDiffuseAlbedoTexture:"); +void _MTLFX_msg_v_setDiffuseAlbedoTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setDiffuseAlbedoTextureFormat:"); +void _MTLFX_msg_v_setExposureTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setExposureTexture:"); +void _MTLFX_msg_v_setFarPlane__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setFarPlane:"); +void _MTLFX_msg_v_setFence__MTL__Fencep(const void*, SEL, MTL::Fence*) __asm__("_objc_msgSend$" "setFence:"); +void _MTLFX_msg_v_setFieldOfView__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setFieldOfView:"); +void _MTLFX_msg_v_setInputContentHeight__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInputContentHeight:"); +void _MTLFX_msg_v_setInputContentMaxScale__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setInputContentMaxScale:"); +void _MTLFX_msg_v_setInputContentMinScale__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setInputContentMinScale:"); +void _MTLFX_msg_v_setInputContentPropertiesEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setInputContentPropertiesEnabled:"); +void _MTLFX_msg_v_setInputContentWidth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInputContentWidth:"); +void _MTLFX_msg_v_setInputHeight__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInputHeight:"); +void _MTLFX_msg_v_setInputWidth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setInputWidth:"); +void _MTLFX_msg_v_setIsUITextureComposited__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setIsUITextureComposited:"); +void _MTLFX_msg_v_setJitterOffsetX__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setJitterOffsetX:"); +void _MTLFX_msg_v_setJitterOffsetY__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setJitterOffsetY:"); +void _MTLFX_msg_v_setMotionTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setMotionTexture:"); +void _MTLFX_msg_v_setMotionTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setMotionTextureFormat:"); +void _MTLFX_msg_v_setMotionVectorScaleX__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setMotionVectorScaleX:"); +void _MTLFX_msg_v_setMotionVectorScaleY__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setMotionVectorScaleY:"); +void _MTLFX_msg_v_setNearPlane__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setNearPlane:"); +void _MTLFX_msg_v_setNormalTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setNormalTexture:"); +void _MTLFX_msg_v_setNormalTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setNormalTextureFormat:"); +void _MTLFX_msg_v_setOutputHeight__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setOutputHeight:"); +void _MTLFX_msg_v_setOutputTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setOutputTexture:"); +void _MTLFX_msg_v_setOutputTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setOutputTextureFormat:"); +void _MTLFX_msg_v_setOutputWidth__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setOutputWidth:"); +void _MTLFX_msg_v_setPreExposure__float(const void*, SEL, float) __asm__("_objc_msgSend$" "setPreExposure:"); +void _MTLFX_msg_v_setPrevColorTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setPrevColorTexture:"); +void _MTLFX_msg_v_setReactiveMaskTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setReactiveMaskTexture:"); +void _MTLFX_msg_v_setReactiveMaskTextureEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setReactiveMaskTextureEnabled:"); +void _MTLFX_msg_v_setReactiveMaskTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setReactiveMaskTextureFormat:"); +void _MTLFX_msg_v_setRequiresSynchronousInitialization__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setRequiresSynchronousInitialization:"); +void _MTLFX_msg_v_setReset__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setReset:"); +void _MTLFX_msg_v_setRoughnessTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setRoughnessTexture:"); +void _MTLFX_msg_v_setRoughnessTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setRoughnessTextureFormat:"); +void _MTLFX_msg_v_setScaler__NS__Objectp(const void*, SEL, NS::Object*) __asm__("_objc_msgSend$" "setScaler:"); +void _MTLFX_msg_v_setShouldResetHistory__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setShouldResetHistory:"); +void _MTLFX_msg_v_setSpecularAlbedoTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setSpecularAlbedoTexture:"); +void _MTLFX_msg_v_setSpecularAlbedoTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setSpecularAlbedoTextureFormat:"); +void _MTLFX_msg_v_setSpecularHitDistanceTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setSpecularHitDistanceTexture:"); +void _MTLFX_msg_v_setSpecularHitDistanceTextureEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setSpecularHitDistanceTextureEnabled:"); +void _MTLFX_msg_v_setSpecularHitDistanceTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setSpecularHitDistanceTextureFormat:"); +void _MTLFX_msg_v_setTransparencyOverlayTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setTransparencyOverlayTexture:"); +void _MTLFX_msg_v_setTransparencyOverlayTextureEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setTransparencyOverlayTextureEnabled:"); +void _MTLFX_msg_v_setTransparencyOverlayTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setTransparencyOverlayTextureFormat:"); +void _MTLFX_msg_v_setUITexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setUITexture:"); +void _MTLFX_msg_v_setUITextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setUITextureFormat:"); +void _MTLFX_msg_v_setUiTexture__MTL__Texturep(const void*, SEL, MTL::Texture*) __asm__("_objc_msgSend$" "setUiTexture:"); +void _MTLFX_msg_v_setUiTextureComposited__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setUiTextureComposited:"); +void _MTLFX_msg_v_setUiTextureFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setUiTextureFormat:"); +void _MTLFX_msg_v_setViewToClipMatrix__voidp(const void*, SEL, void*) __asm__("_objc_msgSend$" "setViewToClipMatrix:"); +void _MTLFX_msg_v_setWorldToViewMatrix__voidp(const void*, SEL, void*) __asm__("_objc_msgSend$" "setWorldToViewMatrix:"); +bool _MTLFX_msg_bool_shouldResetHistory(const void*, SEL) __asm__("_objc_msgSend$" "shouldResetHistory"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_specularAlbedoTexture(const void*, SEL) __asm__("_objc_msgSend$" "specularAlbedoTexture"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_specularAlbedoTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "specularAlbedoTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_specularAlbedoTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "specularAlbedoTextureUsage"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_specularHitDistanceTexture(const void*, SEL) __asm__("_objc_msgSend$" "specularHitDistanceTexture"); +bool _MTLFX_msg_bool_specularHitDistanceTextureEnabled(const void*, SEL) __asm__("_objc_msgSend$" "specularHitDistanceTextureEnabled"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_specularHitDistanceTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "specularHitDistanceTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_specularHitDistanceTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "specularHitDistanceTextureUsage"); +float _MTLFX_msg_float_supportedInputContentMaxScaleForDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "supportedInputContentMaxScaleForDevice:"); +float _MTLFX_msg_float_supportedInputContentMinScaleForDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "supportedInputContentMinScaleForDevice:"); +bool _MTLFX_msg_bool_supportsDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "supportsDevice:"); +bool _MTLFX_msg_bool_supportsMetal4FX__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "supportsMetal4FX:"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_transparencyOverlayTexture(const void*, SEL) __asm__("_objc_msgSend$" "transparencyOverlayTexture"); +bool _MTLFX_msg_bool_transparencyOverlayTextureEnabled(const void*, SEL) __asm__("_objc_msgSend$" "transparencyOverlayTextureEnabled"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_transparencyOverlayTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "transparencyOverlayTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_transparencyOverlayTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "transparencyOverlayTextureUsage"); +MTL::Texture* _MTLFX_msg_MTL__Texturep_uiTexture(const void*, SEL) __asm__("_objc_msgSend$" "uiTexture"); +bool _MTLFX_msg_bool_uiTextureComposited(const void*, SEL) __asm__("_objc_msgSend$" "uiTextureComposited"); +MTL::PixelFormat _MTLFX_msg_MTL__PixelFormat_uiTextureFormat(const void*, SEL) __asm__("_objc_msgSend$" "uiTextureFormat"); +MTL::TextureUsage _MTLFX_msg_MTL__TextureUsage_uiTextureUsage(const void*, SEL) __asm__("_objc_msgSend$" "uiTextureUsage"); +void* _MTLFX_msg_voidp_viewToClipMatrix(const void*, SEL) __asm__("_objc_msgSend$" "viewToClipMatrix"); +void* _MTLFX_msg_voidp_worldToViewMatrix(const void*, SEL) __asm__("_objc_msgSend$" "worldToViewMatrix"); +} // extern "C" + +#pragma clang diagnostic pop diff --git a/thirdparty/metal-cpp/MetalFX/MTLFXFrameInterpolator.hpp b/thirdparty/metal-cpp/MetalFX/MTLFXFrameInterpolator.hpp index 10ff69cbc4eb..cf0cb50c8c6f 100644 --- a/thirdparty/metal-cpp/MetalFX/MTLFXFrameInterpolator.hpp +++ b/thirdparty/metal-cpp/MetalFX/MTLFXFrameInterpolator.hpp @@ -1,719 +1,564 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// MetalFX/MTLFXFrameInterpolator.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "MTLFXDefines.hpp" -#include "MTLFXPrivate.hpp" -#include "MTLFXTemporalScaler.hpp" - -#include "../Metal/Metal.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace MTL4FX -{ - class TemporalScaler; - class TemporalDenoisedScaler; +#include "MTLFXBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class CommandBuffer; + class Device; + class Fence; + class Texture; + enum PixelFormat : NS::UInteger; + using TextureUsage = NS::UInteger; +} +namespace MTL4 { + class Compiler; +} +namespace MTL4FX { class FrameInterpolator; } +namespace NS { + class Object; +} namespace MTLFX { - class FrameInterpolatorDescriptor : public NS::Copying< FrameInterpolatorDescriptor > - { - public: - static FrameInterpolatorDescriptor* alloc(); - FrameInterpolatorDescriptor* init(); - - MTL::PixelFormat colorTextureFormat() const; - void setColorTextureFormat(MTL::PixelFormat colorTextureFormat); - - MTL::PixelFormat outputTextureFormat() const; - void setOutputTextureFormat(MTL::PixelFormat outputTextureFormat); - - MTL::PixelFormat depthTextureFormat() const; - void setDepthTextureFormat(MTL::PixelFormat depthTextureFormat); - - MTL::PixelFormat motionTextureFormat() const; - void setMotionTextureFormat(MTL::PixelFormat motionTextureFormat); - - MTL::PixelFormat uiTextureFormat() const; - void setUITextureFormat(MTL::PixelFormat uiTextureFormat); - - MTLFX::FrameInterpolatableScaler* scaler() const; - void setScaler(MTLFX::FrameInterpolatableScaler* scaler); - - NS::UInteger inputWidth() const; - void setInputWidth( NS::UInteger inputWidth ); - - NS::UInteger inputHeight() const; - void setInputHeight( NS::UInteger inputHeight ); - - NS::UInteger outputWidth() const; - void setOutputWidth( NS::UInteger outputWidth ); - - NS::UInteger outputHeight() const; - void setOutputHeight( NS::UInteger outputHeight ); - - class FrameInterpolator* newFrameInterpolator( const MTL::Device* pDevice) const; - MTL4FX::FrameInterpolator* newFrameInterpolator( const MTL::Device* pDevice, const MTL4::Compiler* pCompiler) const; - - static bool supportsMetal4FX(MTL::Device* device); - static bool supportsDevice(MTL::Device* device); - }; - - class FrameInterpolatorBase : public NS::Referencing - { - public: - MTL::TextureUsage colorTextureUsage() const; - MTL::TextureUsage outputTextureUsage() const; - MTL::TextureUsage depthTextureUsage() const; - MTL::TextureUsage motionTextureUsage() const; - MTL::TextureUsage uiTextureUsage() const; - - MTL::PixelFormat colorTextureFormat() const; - MTL::PixelFormat depthTextureFormat() const; - MTL::PixelFormat motionTextureFormat() const; - MTL::PixelFormat outputTextureFormat() const; - - NS::UInteger inputWidth() const; - NS::UInteger inputHeight() const; - NS::UInteger outputWidth() const; - NS::UInteger outputHeight() const; - MTL::PixelFormat uiTextureFormat() const; - - MTL::Texture* colorTexture() const; - void setColorTexture(MTL::Texture* colorTexture); - - MTL::Texture* prevColorTexture() const; - void setPrevColorTexture(MTL::Texture* prevColorTexture); - - MTL::Texture* depthTexture() const; - void setDepthTexture(MTL::Texture* depthTexture); - - MTL::Texture* motionTexture() const; - void setMotionTexture(MTL::Texture* motionTexture); - - float motionVectorScaleX() const; - void setMotionVectorScaleX(float scaleX); - - float motionVectorScaleY() const; - void setMotionVectorScaleY(float scaleY); - - float deltaTime() const; - void setDeltaTime( float deltaTime ); - - float nearPlane() const; - void setNearPlane( float nearPlane ); - - float farPlane() const; - void setFarPlane( float farPlane ); - - float fieldOfView() const; - void setFieldOfView( float fieldOfView ); - - float aspectRatio() const; - void setAspectRatio( float aspectRatio ); - - MTL::Texture* uiTexture() const; - void setUITexture(MTL::Texture* uiTexture); - - float jitterOffsetX() const; - void setJitterOffsetX( float jitterOffsetX ); - float jitterOffsetY() const; - void setJitterOffsetY( float jitterOffsetY ); - - bool isUITextureComposited() const; - void setIsUITextureComposited( bool uiTextureComposited ); - - bool shouldResetHistory() const; - void setShouldResetHistory( bool shouldResetHistory ); - - MTL::Texture* outputTexture() const; - void setOutputTexture( MTL::Texture* outputTexture ); - - MTL::Fence* fence() const; - void setFence( MTL::Fence* fence ); - - bool isDepthReversed() const; - void setDepthReversed( bool depthReversed ); - }; - - class FrameInterpolator : public NS::Referencing - { - public: - void encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer); - }; - -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +class FrameInterpolatorDescriptor; +class FrameInterpolatorBase; +class FrameInterpolator; + +class FrameInterpolatorDescriptor : public NS::Copying +{ +public: + static FrameInterpolatorDescriptor* alloc(); + FrameInterpolatorDescriptor* init() const; + + static bool supportsDevice(MTL::Device* device); + static bool supportsMetal4FX(MTL::Device* device); + + MTL::PixelFormat colorTextureFormat() const; + MTL::PixelFormat depthTextureFormat() const; + NS::UInteger inputHeight() const; + NS::UInteger inputWidth() const; + MTL::PixelFormat motionTextureFormat() const; + MTLFX::FrameInterpolator* newFrameInterpolator(MTL::Device* device); + MTL4FX::FrameInterpolator* newFrameInterpolator(MTL::Device* device, MTL4::Compiler* compiler); + NS::UInteger outputHeight() const; + MTL::PixelFormat outputTextureFormat() const; + NS::UInteger outputWidth() const; + NS::Object* scaler() const; + void setColorTextureFormat(MTL::PixelFormat colorTextureFormat); + void setDepthTextureFormat(MTL::PixelFormat depthTextureFormat); + void setInputHeight(NS::UInteger inputHeight); + void setInputWidth(NS::UInteger inputWidth); + void setMotionTextureFormat(MTL::PixelFormat motionTextureFormat); + void setOutputHeight(NS::UInteger outputHeight); + void setOutputTextureFormat(MTL::PixelFormat outputTextureFormat); + void setOutputWidth(NS::UInteger outputWidth); + void setScaler(NS::Object* scaler); + void setUITextureFormat(MTL::PixelFormat uiTextureFormat); + void setUiTextureFormat(MTL::PixelFormat uiTextureFormat); + MTL::PixelFormat uiTextureFormat() const; + +}; + +class FrameInterpolatorBase : public NS::Referencing +{ +public: + float aspectRatio() const; + MTL::Texture* colorTexture() const; + MTL::PixelFormat colorTextureFormat() const; + MTL::TextureUsage colorTextureUsage() const; + float deltaTime() const; + bool depthReversed() const; + MTL::Texture* depthTexture() const; + MTL::PixelFormat depthTextureFormat() const; + MTL::TextureUsage depthTextureUsage() const; + float farPlane() const; + MTL::Fence* fence() const; + float fieldOfView() const; + NS::UInteger inputHeight() const; + NS::UInteger inputWidth() const; + bool isDepthReversed(); + bool isUITextureComposited(); + float jitterOffsetX() const; + float jitterOffsetY() const; + MTL::Texture* motionTexture() const; + MTL::PixelFormat motionTextureFormat() const; + MTL::TextureUsage motionTextureUsage() const; + float motionVectorScaleX() const; + float motionVectorScaleY() const; + float nearPlane() const; + NS::UInteger outputHeight() const; + MTL::Texture* outputTexture() const; + MTL::PixelFormat outputTextureFormat() const; + MTL::TextureUsage outputTextureUsage() const; + NS::UInteger outputWidth() const; + MTL::Texture* prevColorTexture() const; + void setAspectRatio(float aspectRatio); + void setColorTexture(MTL::Texture* colorTexture); + void setDeltaTime(float deltaTime); + void setDepthReversed(bool depthReversed); + void setDepthTexture(MTL::Texture* depthTexture); + void setFarPlane(float farPlane); + void setFence(MTL::Fence* fence); + void setFieldOfView(float fieldOfView); + void setIsUITextureComposited(bool uiTextureComposited); + void setJitterOffsetX(float jitterOffsetX); + void setJitterOffsetY(float jitterOffsetY); + void setMotionTexture(MTL::Texture* motionTexture); + void setMotionVectorScaleX(float motionVectorScaleX); + void setMotionVectorScaleY(float motionVectorScaleY); + void setNearPlane(float nearPlane); + void setOutputTexture(MTL::Texture* outputTexture); + void setPrevColorTexture(MTL::Texture* prevColorTexture); + void setShouldResetHistory(bool shouldResetHistory); + void setUITexture(MTL::Texture* uiTexture); + void setUiTexture(MTL::Texture* uiTexture); + void setUiTextureComposited(bool uiTextureComposited); + bool shouldResetHistory() const; + MTL::Texture* uiTexture() const; + bool uiTextureComposited() const; + MTL::PixelFormat uiTextureFormat() const; + MTL::TextureUsage uiTextureUsage() const; + +}; + +class FrameInterpolator : public NS::Referencing +{ +public: + void encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer); + +}; + +} // namespace MTLFX + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLFXFrameInterpolatorDescriptor; +extern "C" void *OBJC_CLASS_$_MTLFXFrameInterpolatorBase; +extern "C" void *OBJC_CLASS_$_MTLFXFrameInterpolator; _MTLFX_INLINE MTLFX::FrameInterpolatorDescriptor* MTLFX::FrameInterpolatorDescriptor::alloc() { - return NS::Object::alloc< FrameInterpolatorDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXFrameInterpolatorDescriptor ) ); + return _MTLFX_msg_MTLFX__FrameInterpolatorDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLFXFrameInterpolatorDescriptor, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE MTLFX::FrameInterpolatorDescriptor* MTLFX::FrameInterpolatorDescriptor::init() const +{ + return _MTLFX_msg_MTLFX__FrameInterpolatorDescriptorp_init((const void*)this, nullptr); +} -_MTLFX_INLINE MTLFX::FrameInterpolatorDescriptor* MTLFX::FrameInterpolatorDescriptor::init() +_MTLFX_INLINE bool MTLFX::FrameInterpolatorDescriptor::supportsMetal4FX(MTL::Device* device) { - return NS::Object::init< FrameInterpolatorDescriptor >(); + return _MTLFX_msg_bool_supportsMetal4FX__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXFrameInterpolatorDescriptor, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE bool MTLFX::FrameInterpolatorDescriptor::supportsDevice(MTL::Device* device) +{ + return _MTLFX_msg_bool_supportsDevice__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXFrameInterpolatorDescriptor, nullptr, device); +} _MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorDescriptor::colorTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_colorTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setColorTextureFormat( MTL::PixelFormat colorTextureFormat ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setColorTextureFormat(MTL::PixelFormat colorTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTextureFormat_ ), colorTextureFormat ); + _MTLFX_msg_v_setColorTextureFormat__MTL__PixelFormat((const void*)this, nullptr, colorTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorDescriptor::outputTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_outputTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setOutputTextureFormat( MTL::PixelFormat outputTextureFormat ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setOutputTextureFormat(MTL::PixelFormat outputTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTextureFormat_ ), outputTextureFormat ); + _MTLFX_msg_v_setOutputTextureFormat__MTL__PixelFormat((const void*)this, nullptr, outputTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorDescriptor::depthTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_depthTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setDepthTextureFormat( MTL::PixelFormat depthTextureFormat ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setDepthTextureFormat(MTL::PixelFormat depthTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTextureFormat_ ), depthTextureFormat ); + _MTLFX_msg_v_setDepthTextureFormat__MTL__PixelFormat((const void*)this, nullptr, depthTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorDescriptor::motionTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_motionTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setMotionTextureFormat( MTL::PixelFormat motionTextureFormat ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setMotionTextureFormat(MTL::PixelFormat motionTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTextureFormat_ ), motionTextureFormat ); + _MTLFX_msg_v_setMotionTextureFormat__MTL__PixelFormat((const void*)this, nullptr, motionTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorDescriptor::uiTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( uiTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_uiTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setUITextureFormat( MTL::PixelFormat uiTextureFormat ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setUiTextureFormat(MTL::PixelFormat uiTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setUITextureFormat_ ), uiTextureFormat ); + _MTLFX_msg_v_setUiTextureFormat__MTL__PixelFormat((const void*)this, nullptr, uiTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTLFX::FrameInterpolatableScaler* MTLFX::FrameInterpolatorDescriptor::scaler() const +_MTLFX_INLINE NS::Object* MTLFX::FrameInterpolatorDescriptor::scaler() const { - return NS::Object::sendMessage< MTLFX::FrameInterpolatableScaler* >( this, _MTLFX_PRIVATE_SEL( scaler ) ); + return _MTLFX_msg_NS__Objectp_scaler((const void*)this, nullptr); } -_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setScaler(MTLFX::FrameInterpolatableScaler* scaler) +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setScaler(NS::Object* scaler) { - NS::Object::sendMessage< void >(this, _MTLFX_PRIVATE_SEL( setScaler_ ), scaler ); + _MTLFX_msg_v_setScaler__NS__Objectp((const void*)this, nullptr, scaler); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorDescriptor::inputWidth() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); + return _MTLFX_msg_NS__UInteger_inputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setInputWidth( NS::UInteger inputWidth ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setInputWidth(NS::UInteger inputWidth) { - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputWidth_ ), inputWidth ); + _MTLFX_msg_v_setInputWidth__NS__UInteger((const void*)this, nullptr, inputWidth); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorDescriptor::inputHeight() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); + return _MTLFX_msg_NS__UInteger_inputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setInputHeight( NS::UInteger inputHeight ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setInputHeight(NS::UInteger inputHeight) { - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputHeight_ ), inputHeight ); + _MTLFX_msg_v_setInputHeight__NS__UInteger((const void*)this, nullptr, inputHeight); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorDescriptor::outputWidth() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); + return _MTLFX_msg_NS__UInteger_outputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setOutputWidth( NS::UInteger outputWidth ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setOutputWidth(NS::UInteger outputWidth) { - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputWidth_ ), outputWidth ); + _MTLFX_msg_v_setOutputWidth__NS__UInteger((const void*)this, nullptr, outputWidth); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorDescriptor::outputHeight() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setOutputHeight( NS::UInteger outputHeight ) -{ - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputHeight_ ), outputHeight ); + return _MTLFX_msg_NS__UInteger_outputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTLFX::FrameInterpolator* MTLFX::FrameInterpolatorDescriptor::newFrameInterpolator( const MTL::Device* device ) const +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setOutputHeight(NS::UInteger outputHeight) { - return NS::Object::sendMessage< MTLFX::FrameInterpolator* >( this, _MTLFX_PRIVATE_SEL( newFrameInterpolatorWithDevice_ ), device ); + _MTLFX_msg_v_setOutputHeight__NS__UInteger((const void*)this, nullptr, outputHeight); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTL4FX::FrameInterpolator* MTLFX::FrameInterpolatorDescriptor::newFrameInterpolator( const MTL::Device* device, const MTL4::Compiler* compiler ) const +_MTLFX_INLINE MTLFX::FrameInterpolator* MTLFX::FrameInterpolatorDescriptor::newFrameInterpolator(MTL::Device* device) { - return NS::Object::sendMessage< MTL4FX::FrameInterpolator* >( this, _MTLFX_PRIVATE_SEL( newFrameInterpolatorWithDevice_compiler_ ), device, compiler ); + return _MTLFX_msg_MTLFX__FrameInterpolatorp_newFrameInterpolatorWithDevice__MTL__Devicep((const void*)this, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::FrameInterpolatorDescriptor::supportsMetal4FX(MTL::Device* device) +_MTLFX_INLINE MTL4FX::FrameInterpolator* MTLFX::FrameInterpolatorDescriptor::newFrameInterpolator(MTL::Device* device, MTL4::Compiler* compiler) { - return NS::Object::sendMessageSafe< bool >( _MTLFX_PRIVATE_CLS(MTLFXFrameInterpolatorDescriptor), _MTLFX_PRIVATE_SEL( supportsMetal4FX_ ), device ); + return _MTLFX_msg_MTL4FX__FrameInterpolatorp_newFrameInterpolatorWithDevice_compiler__MTL__Devicep_MTL4__Compilerp((const void*)this, nullptr, device, compiler); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::FrameInterpolatorDescriptor::supportsDevice(MTL::Device* device) +_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setUITextureFormat(MTL::PixelFormat uiTextureFormat) { - return NS::Object::sendMessageSafe< bool >( _MTLFX_PRIVATE_CLS(MTLFXFrameInterpolatorDescriptor), _MTLFX_PRIVATE_SEL( supportsDevice_ ), device ); + _MTLFX_msg_v_setUITextureFormat__MTL__PixelFormat((const void*)this, nullptr, uiTextureFormat); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::FrameInterpolatorBase::colorTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_colorTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::FrameInterpolatorBase::outputTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_outputTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::FrameInterpolatorBase::depthTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( depthTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_depthTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::FrameInterpolatorBase::motionTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( motionTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_motionTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::FrameInterpolatorBase::uiTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( uiTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_uiTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorBase::colorTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_colorTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorBase::depthTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_depthTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorBase::motionTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_motionTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorBase::outputTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_outputTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorBase::inputWidth() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); + return _MTLFX_msg_NS__UInteger_inputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorBase::inputHeight() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); + return _MTLFX_msg_NS__UInteger_inputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorBase::outputWidth() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); + return _MTLFX_msg_NS__UInteger_outputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorBase::outputHeight() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); + return _MTLFX_msg_NS__UInteger_outputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorBase::uiTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( uiTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_uiTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::colorTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) ); + return _MTLFX_msg_MTL__Texturep_colorTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setColorTexture(MTL::Texture* colorTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTexture_ ), colorTexture ); + _MTLFX_msg_v_setColorTexture__MTL__Texturep((const void*)this, nullptr, colorTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::prevColorTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( prevColorTexture ) ); + return _MTLFX_msg_MTL__Texturep_prevColorTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setPrevColorTexture(MTL::Texture* prevColorTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setPrevColorTexture_ ), prevColorTexture ); + _MTLFX_msg_v_setPrevColorTexture__MTL__Texturep((const void*)this, nullptr, prevColorTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::depthTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( depthTexture ) ); + return _MTLFX_msg_MTL__Texturep_depthTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setDepthTexture(MTL::Texture* depthTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTexture_ ), depthTexture ); + _MTLFX_msg_v_setDepthTexture__MTL__Texturep((const void*)this, nullptr, depthTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::motionTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( motionTexture ) ); + return _MTLFX_msg_MTL__Texturep_motionTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setMotionTexture(MTL::Texture* motionTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTexture_ ), motionTexture ); + _MTLFX_msg_v_setMotionTexture__MTL__Texturep((const void*)this, nullptr, motionTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::FrameInterpolatorBase::motionVectorScaleX() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleX ) ); + return _MTLFX_msg_float_motionVectorScaleX((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setMotionVectorScaleX(float scaleX) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setMotionVectorScaleX(float motionVectorScaleX) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleX_ ), scaleX ); + _MTLFX_msg_v_setMotionVectorScaleX__float((const void*)this, nullptr, motionVectorScaleX); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::FrameInterpolatorBase::motionVectorScaleY() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleY ) ); + return _MTLFX_msg_float_motionVectorScaleY((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setMotionVectorScaleY(float scaleY) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setMotionVectorScaleY(float motionVectorScaleY) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleY_ ), scaleY ); + _MTLFX_msg_v_setMotionVectorScaleY__float((const void*)this, nullptr, motionVectorScaleY); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::deltaTime() const +_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::deltaTime() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( deltaTime ) ); + return _MTLFX_msg_float_deltaTime((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setDeltaTime( float deltaTime ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setDeltaTime(float deltaTime) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDeltaTime_ ), deltaTime ); + _MTLFX_msg_v_setDeltaTime__float((const void*)this, nullptr, deltaTime); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::nearPlane() const +_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::nearPlane() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( nearPlane ) ); + return _MTLFX_msg_float_nearPlane((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setNearPlane( float nearPlane ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setNearPlane(float nearPlane) { - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setNearPlane_ ), nearPlane ); + _MTLFX_msg_v_setNearPlane__float((const void*)this, nullptr, nearPlane); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::farPlane() const +_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::farPlane() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( farPlane ) ); + return _MTLFX_msg_float_farPlane((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setFarPlane( float farPlane ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setFarPlane(float farPlane) { - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFarPlane_ ), farPlane ); + _MTLFX_msg_v_setFarPlane__float((const void*)this, nullptr, farPlane); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::fieldOfView() const +_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::fieldOfView() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( fieldOfView ) ); + return _MTLFX_msg_float_fieldOfView((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setFieldOfView( float fieldOfView ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setFieldOfView(float fieldOfView) { - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFieldOfView_ ), fieldOfView ); + _MTLFX_msg_v_setFieldOfView__float((const void*)this, nullptr, fieldOfView); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::aspectRatio() const +_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::aspectRatio() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( aspectRatio ) ); + return _MTLFX_msg_float_aspectRatio((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setAspectRatio( float aspectRatio ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setAspectRatio(float aspectRatio) { - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setAspectRatio_ ), aspectRatio ); + _MTLFX_msg_v_setAspectRatio__float((const void*)this, nullptr, aspectRatio); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::uiTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( uiTexture ) ); + return _MTLFX_msg_MTL__Texturep_uiTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setUITexture(MTL::Texture* uiTexture) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setUiTexture(MTL::Texture* uiTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setUITexture_ ), uiTexture ); + _MTLFX_msg_v_setUiTexture__MTL__Texturep((const void*)this, nullptr, uiTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::FrameInterpolatorBase::jitterOffsetX() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetX ) ); + return _MTLFX_msg_float_jitterOffsetX((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setJitterOffsetX( float jitterOffsetX ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setJitterOffsetX(float jitterOffsetX) { - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetX_ ), jitterOffsetX ); + _MTLFX_msg_v_setJitterOffsetX__float((const void*)this, nullptr, jitterOffsetX); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::FrameInterpolatorBase::jitterOffsetY() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetY ) ); + return _MTLFX_msg_float_jitterOffsetY((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setJitterOffsetY( float jitterOffsetY ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setJitterOffsetY(float jitterOffsetY) { - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetY_ ), jitterOffsetY ); + _MTLFX_msg_v_setJitterOffsetY__float((const void*)this, nullptr, jitterOffsetY); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::FrameInterpolatorBase::isUITextureComposited() const +_MTLFX_INLINE bool MTLFX::FrameInterpolatorBase::uiTextureComposited() const { - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isUITextureComposited ) ); + return _MTLFX_msg_bool_uiTextureComposited((const void*)this, nullptr); } -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setIsUITextureComposited( bool uiTextureComposited ) +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setUiTextureComposited(bool uiTextureComposited) { - NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setIsUITextureComposited_ ), uiTextureComposited ); + _MTLFX_msg_v_setUiTextureComposited__bool((const void*)this, nullptr, uiTextureComposited); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE bool MTLFX::FrameInterpolatorBase::shouldResetHistory() const { - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( shouldResetHistory ) ); + return _MTLFX_msg_bool_shouldResetHistory((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setShouldResetHistory(bool shouldResetHistory) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setShouldResetHistory_ ), shouldResetHistory ); + _MTLFX_msg_v_setShouldResetHistory__bool((const void*)this, nullptr, shouldResetHistory); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::outputTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) ); + return _MTLFX_msg_MTL__Texturep_outputTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setOutputTexture(MTL::Texture* outputTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTexture_ ), outputTexture ); + _MTLFX_msg_v_setOutputTexture__MTL__Texturep((const void*)this, nullptr, outputTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Fence* MTLFX::FrameInterpolatorBase::fence() const { - return NS::Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) ); + return _MTLFX_msg_MTL__Fencep_fence((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setFence(MTL::Fence* fence) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFence_ ), fence ); + _MTLFX_msg_v_setFence__MTL__Fencep((const void*)this, nullptr, fence); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE bool MTLFX::FrameInterpolatorBase::depthReversed() const +{ + return _MTLFX_msg_bool_depthReversed((const void*)this, nullptr); +} -_MTLFX_INLINE bool MTLFX::FrameInterpolatorBase::isDepthReversed() const +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setDepthReversed(bool depthReversed) { - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDepthReversed ) ); + _MTLFX_msg_v_setDepthReversed__bool((const void*)this, nullptr, depthReversed); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setUITexture(MTL::Texture* uiTexture) +{ + _MTLFX_msg_v_setUITexture__MTL__Texturep((const void*)this, nullptr, uiTexture); +} -_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setDepthReversed(bool depthReversed) +_MTLFX_INLINE bool MTLFX::FrameInterpolatorBase::isUITextureComposited() +{ + return _MTLFX_msg_bool_isUITextureComposited((const void*)this, nullptr); +} + +_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setIsUITextureComposited(bool uiTextureComposited) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthReversed_ ), depthReversed ); + _MTLFX_msg_v_setIsUITextureComposited__bool((const void*)this, nullptr, uiTextureComposited); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE bool MTLFX::FrameInterpolatorBase::isDepthReversed() +{ + return _MTLFX_msg_bool_isDepthReversed((const void*)this, nullptr); +} _MTLFX_INLINE void MTLFX::FrameInterpolator::encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), commandBuffer ); + _MTLFX_msg_v_encodeToCommandBuffer__MTL__CommandBufferp((const void*)this, nullptr, commandBuffer); } diff --git a/thirdparty/metal-cpp/MetalFX/MTLFXPrivate.hpp b/thirdparty/metal-cpp/MetalFX/MTLFXPrivate.hpp deleted file mode 100644 index 21fd728e40b0..000000000000 --- a/thirdparty/metal-cpp/MetalFX/MTLFXPrivate.hpp +++ /dev/null @@ -1,482 +0,0 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// MetalFX/MTLFXPrivate.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#pragma once - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include "MTLFXDefines.hpp" - -#include - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#define _MTLFX_PRIVATE_CLS( symbol ) ( MTLFX::Private::Class::s_k##symbol ) -#define _MTLFX_PRIVATE_SEL( accessor ) ( MTLFX::Private::Selector::s_k##accessor ) - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#if defined( MTLFX_PRIVATE_IMPLEMENTATION ) - -#if defined( METALCPP_SYMBOL_VISIBILITY_HIDDEN ) -#define _MTLFX_PRIVATE_VISIBILITY __attribute__( ( visibility("hidden" ) ) ) -#else -#define _MTLFX_PRIVATE_VISIBILITY __attribute__( ( visibility("default" ) ) ) -#endif // METALCPP_SYMBOL_VISIBILITY_HIDDEN - -#define _MTLFX_PRIVATE_IMPORT __attribute__( ( weak_import ) ) - -#ifdef __OBJC__ -#define _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol ) ( ( __bridge void* ) objc_lookUpClass( #symbol ) ) -#define _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol ) ( ( __bridge void* ) objc_getProtocol( #symbol ) ) -#else -#define _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol ) objc_lookUpClass(#symbol) -#define _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol ) objc_getProtocol(#symbol) -#endif // __OBJC__ - -#define _MTLFX_PRIVATE_DEF_CLS( symbol ) void* s_k##symbol _MTLFX_PRIVATE_VISIBILITY = _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol ) -#define _MTLFX_PRIVATE_DEF_PRO( symbol ) void* s_k##symbol _MTLFX_PRIVATE_VISIBILITY = _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol ) -#define _MTLFX_PRIVATE_DEF_SEL( accessor, symbol ) SEL s_k##accessor _MTLFX_PRIVATE_VISIBILITY = sel_registerName( symbol ) - -#include -#define MTLFX_DEF_FUNC( name, signature ) using Fn##name = signature; \ - Fn##name name = reinterpret_cast< Fn##name >( dlsym( RTLD_DEFAULT, #name ) ) - -namespace MTLFX::Private -{ - template - - inline _Type const LoadSymbol(const char* pSymbol) - { - const _Type* pAddress = static_cast<_Type*>(dlsym(RTLD_DEFAULT, pSymbol)); - - return pAddress ? *pAddress : nullptr; - } -} // MTLFX::Private - -#if defined(__MAC_26_0) || defined(__IPHONE_26_0) || defined(__TVOS_26_0) - -#define _MTLFX_PRIVATE_DEF_STR( type, symbol ) \ - _MTLFX_EXTERN type const MTLFX##symbol _MTLFX_PRIVATE_IMPORT; \ - type const MTLFX::symbol = ( nullptr != &MTLFX##symbol ) ? MTLFX##ssymbol : nullptr - -#define _MTLFX_PRIVATE_DEF_CONST( type, symbol ) \ - _MTLFX_EXTERN type const MTLFX##ssymbol _MTLFX_PRIVATE_IMPORT; \ - type const MTLFX::symbol = (nullptr != &MTLFX##ssymbol) ? MTLFX##ssymbol : nullptr - -#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol ) \ - _MTLFX_EXTERN type const MTLFX##ssymbol; \ - type const MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol ) - -#else - -#define _MTLFX_PRIVATE_DEF_STR( type, symbol ) \ - _MTLFX_EXTERN type const MTLFX##ssymbol; \ - type const MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol ) - -#define _MTLFX_PRIVATE_DEF_CONST( type, symbol ) \ - _MTLFX_EXTERN type const MTLFX##ssymbol; \ - type const MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol ) - -#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol ) _MTLFX_PRIVATE_DEF_CONST( type, symbol ) - -#endif - -#else - -#define _MTLFX_PRIVATE_DEF_CLS( symbol ) extern void* s_k##symbol -#define _MTLFX_PRIVATE_DEF_PRO( symbol ) extern void* s_k##symbol -#define _MTLFX_PRIVATE_DEF_SEL( accessor, symbol ) extern SEL s_k##accessor -#define _MTLFX_PRIVATE_DEF_STR( type, symbol ) extern type const MTLFX::symbol -#define _MTLFX_PRIVATE_DEF_CONST( type, symbol ) extern type const MTLFX::symbol -#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol ) extern type const MTLFX::symbol - -#endif // MTLFX_PRIVATE_IMPLEMENTATION - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace MTLFX -{ - namespace Private - { - namespace Class - { - _MTLFX_PRIVATE_DEF_CLS( MTLFXSpatialScalerDescriptor ); - _MTLFX_PRIVATE_DEF_CLS( MTLFXTemporalScalerDescriptor ); - _MTLFX_PRIVATE_DEF_CLS( MTLFXFrameInterpolatorDescriptor ); - _MTLFX_PRIVATE_DEF_CLS( MTLFXTemporalDenoisedScalerDescriptor ); - - _MTLFX_PRIVATE_DEF_CLS( MTL4FXSpatialScalerDescriptor ); - _MTLFX_PRIVATE_DEF_CLS( MTL4FXTemporalScalerDescriptor ); - _MTLFX_PRIVATE_DEF_CLS( MTL4FXFrameInterpolatorDescriptor ); - _MTLFX_PRIVATE_DEF_CLS( MTL4FXTemporalDenoisedScalerDescriptor ); - } // Class - } // Private -} // MTLFX - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace MTLFX -{ - namespace Private - { - namespace Protocol - { - _MTLFX_PRIVATE_DEF_PRO( MTLFXSpatialScaler ); - _MTLFX_PRIVATE_DEF_PRO( MTLFXTemporalScaler ); - } // Protocol - } // Private -} // MTLFX - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace MTLFX -{ - namespace Private - { - namespace Selector - { - _MTLFX_PRIVATE_DEF_SEL( aspectRatio, - "aspectRatio" ); - _MTLFX_PRIVATE_DEF_SEL( colorProcessingMode, - "colorProcessingMode" ); - _MTLFX_PRIVATE_DEF_SEL( colorTexture, - "colorTexture" ); - _MTLFX_PRIVATE_DEF_SEL( colorTextureFormat, - "colorTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( colorTextureUsage, - "colorTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( deltaTime, - "deltaTime" ); - _MTLFX_PRIVATE_DEF_SEL( denoiseStrengthMaskTexture, - "denoiseStrengthMaskTexture" ); - _MTLFX_PRIVATE_DEF_SEL( denoiseStrengthMaskTextureFormat, - "denoiseStrengthMaskTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( denoiseStrengthMaskTextureUsage, - "denoiseStrengthMaskTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( depthTexture, - "depthTexture" ); - _MTLFX_PRIVATE_DEF_SEL( depthTextureFormat, - "depthTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( depthTextureUsage, - "depthTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( diffuseAlbedoTexture, - "diffuseAlbedoTexture" ); - _MTLFX_PRIVATE_DEF_SEL( diffuseAlbedoTextureFormat, - "diffuseAlbedoTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( diffuseAlbedoTextureUsage, - "diffuseAlbedoTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( encodeToCommandBuffer_, - "encodeToCommandBuffer:" ); - _MTLFX_PRIVATE_DEF_SEL( exposureTexture, - "exposureTexture" ); - _MTLFX_PRIVATE_DEF_SEL( farPlane, - "farPlane" ); - _MTLFX_PRIVATE_DEF_SEL( fence, - "fence" ); - _MTLFX_PRIVATE_DEF_SEL( fieldOfView, - "fieldOfView" ); - _MTLFX_PRIVATE_DEF_SEL( height, - "height" ); - _MTLFX_PRIVATE_DEF_SEL( inputContentHeight, - "inputContentHeight" ); - _MTLFX_PRIVATE_DEF_SEL( inputContentMaxScale, - "inputContentMaxScale" ); - _MTLFX_PRIVATE_DEF_SEL( inputContentMinScale, - "inputContentMinScale" ); - _MTLFX_PRIVATE_DEF_SEL( inputContentWidth, - "inputContentWidth" ); - _MTLFX_PRIVATE_DEF_SEL( inputHeight, - "inputHeight" ); - _MTLFX_PRIVATE_DEF_SEL( inputWidth, - "inputWidth" ); - _MTLFX_PRIVATE_DEF_SEL( isAutoExposureEnabled, - "isAutoExposureEnabled" ); - _MTLFX_PRIVATE_DEF_SEL( isDenoiseStrengthMaskTextureEnabled, - "isDenoiseStrengthMaskTextureEnabled" ); - _MTLFX_PRIVATE_DEF_SEL( isDepthReversed, - "isDepthReversed" ); - _MTLFX_PRIVATE_DEF_SEL( isInputContentPropertiesEnabled, - "isInputContentPropertiesEnabled" ); - _MTLFX_PRIVATE_DEF_SEL( isTransparencyOverlayTextureEnabled, - "isTransparencyOverlayTextureEnabled" ); - _MTLFX_PRIVATE_DEF_SEL( isReactiveMaskTextureEnabled, - "isReactiveMaskTextureEnabled" ); - _MTLFX_PRIVATE_DEF_SEL( isSpecularHitDistanceTextureEnabled, - "isSpecularHitDistanceTextureEnabled" ); - _MTLFX_PRIVATE_DEF_SEL( isUITextureComposited, - "isUITextureComposited" ); - _MTLFX_PRIVATE_DEF_SEL( jitterOffsetX, - "jitterOffsetX" ); - _MTLFX_PRIVATE_DEF_SEL( jitterOffsetY, - "jitterOffsetY" ); - _MTLFX_PRIVATE_DEF_SEL( maskTexture, - "maskTexture" ); - _MTLFX_PRIVATE_DEF_SEL( maskTextureFormat, - "maskTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( maskTextureUsage, - "maskTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( motionTexture, - "motionTexture" ); - _MTLFX_PRIVATE_DEF_SEL( motionTextureFormat, - "motionTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( motionTextureUsage, - "motionTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( motionVectorScaleX, - "motionVectorScaleX" ); - _MTLFX_PRIVATE_DEF_SEL( motionVectorScaleY, - "motionVectorScaleY" ); - _MTLFX_PRIVATE_DEF_SEL( nearPlane, - "nearPlane" ); - _MTLFX_PRIVATE_DEF_SEL( newFrameInterpolatorWithDevice_, - "newFrameInterpolatorWithDevice:" ); - _MTLFX_PRIVATE_DEF_SEL( newFrameInterpolatorWithDevice_compiler_, - "newFrameInterpolatorWithDevice:compiler:" ); - _MTLFX_PRIVATE_DEF_SEL( newTemporalDenoisedScalerWithDevice_, - "newTemporalDenoisedScalerWithDevice:" ); - _MTLFX_PRIVATE_DEF_SEL( newTemporalDenoisedScalerWithDevice_compiler_, - "newTemporalDenoisedScalerWithDevice:compiler:" ); - _MTLFX_PRIVATE_DEF_SEL( newSpatialScalerWithDevice_, - "newSpatialScalerWithDevice:" ); - _MTLFX_PRIVATE_DEF_SEL( newSpatialScalerWithDevice_compiler_, - "newSpatialScalerWithDevice:compiler:" ); - _MTLFX_PRIVATE_DEF_SEL( newTemporalScalerWithDevice_, - "newTemporalScalerWithDevice:" ); - _MTLFX_PRIVATE_DEF_SEL( newTemporalScalerWithDevice_compiler_, - "newTemporalScalerWithDevice:compiler:" ); - _MTLFX_PRIVATE_DEF_SEL( normalTexture, - "normalTexture" ); - _MTLFX_PRIVATE_DEF_SEL( normalTextureFormat, - "normalTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( normalTextureUsage, - "normalTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( outputHeight, - "outputHeight" ); - _MTLFX_PRIVATE_DEF_SEL( outputTexture, - "outputTexture" ); - _MTLFX_PRIVATE_DEF_SEL( outputTextureFormat, - "outputTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( outputTextureUsage, - "outputTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( outputWidth, - "outputWidth" ); - _MTLFX_PRIVATE_DEF_SEL( preExposure, - "preExposure" ); - _MTLFX_PRIVATE_DEF_SEL( transparencyOverlayTextureFormat, - "transparencyOverlayTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( transparencyOverlayTextureUsage, - "transparencyOverlayTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( prevColorTexture, - "prevColorTexture" ); - _MTLFX_PRIVATE_DEF_SEL( reactiveMaskTextureFormat, - "reactiveMaskTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( reactiveTextureUsage, - "reactiveTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( reactiveMaskTexture, - "reactiveMaskTexture" ); - _MTLFX_PRIVATE_DEF_SEL( reset, - "reset" ); - _MTLFX_PRIVATE_DEF_SEL( requiresSynchronousInitialization, - "requiresSynchronousInitialization" ); - _MTLFX_PRIVATE_DEF_SEL( roughnessTextureFormat, - "roughnessTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( roughnessTextureUsage, - "roughnessTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( scaler, - "scaler" ); - _MTLFX_PRIVATE_DEF_SEL( scaler4, - "scaler4" ); - _MTLFX_PRIVATE_DEF_SEL( setAspectRatio_, - "setAspectRatio:" ); - _MTLFX_PRIVATE_DEF_SEL( setAutoExposureEnabled_, - "setAutoExposureEnabled:" ); - _MTLFX_PRIVATE_DEF_SEL( setColorProcessingMode_, - "setColorProcessingMode:" ); - _MTLFX_PRIVATE_DEF_SEL( setColorTexture_, - "setColorTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setColorTextureFormat_, - "setColorTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setDeltaTime_, - "setDeltaTime:" ); - _MTLFX_PRIVATE_DEF_SEL( setDenoiseStrengthMaskTexture_, - "setDenoiseStrengthMaskTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setDenoiseStrengthMaskTextureEnabled_, - "setDenoiseStrengthMaskTextureEnabled:" ); - _MTLFX_PRIVATE_DEF_SEL( setDenoiseStrengthMaskTextureFormat_, - "setDenoiseStrengthMaskTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setDepthInverted_, - "setDepthInverted:" ); - _MTLFX_PRIVATE_DEF_SEL( setDepthReversed_, - "setDepthReversed:" ); - _MTLFX_PRIVATE_DEF_SEL( setDepthTexture_, - "setDepthTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setDepthTextureFormat_, - "setDepthTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setDiffuseAlbedoTexture_, - "setDiffuseAlbedoTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setDiffuseAlbedoTextureFormat_, - "setDiffuseAlbedoTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setExposureTexture_, - "setExposureTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setFarPlane_, - "setFarPlane:" ); - _MTLFX_PRIVATE_DEF_SEL( setFence_, - "setFence:" ); - _MTLFX_PRIVATE_DEF_SEL( setFieldOfView_, - "setFieldOfView:" ); - _MTLFX_PRIVATE_DEF_SEL( setHeight_, - "setHeight:" ); - _MTLFX_PRIVATE_DEF_SEL( setInputContentHeight_, - "setInputContentHeight:" ); - _MTLFX_PRIVATE_DEF_SEL( setInputContentMaxScale_, - "setInputContentMaxScale:" ); - _MTLFX_PRIVATE_DEF_SEL( setInputContentMinScale_, - "setInputContentMinScale:" ); - _MTLFX_PRIVATE_DEF_SEL( setInputContentPropertiesEnabled_, - "setInputContentPropertiesEnabled:" ); - _MTLFX_PRIVATE_DEF_SEL( setInputContentWidth_, - "setInputContentWidth:" ); - _MTLFX_PRIVATE_DEF_SEL( setInputHeight_, - "setInputHeight:" ); - _MTLFX_PRIVATE_DEF_SEL( setInputWidth_, - "setInputWidth:" ); - _MTLFX_PRIVATE_DEF_SEL( setIsUITextureComposited_, - "setIsUITextureComposited:" ); - _MTLFX_PRIVATE_DEF_SEL( setJitterOffsetX_, - "setJitterOffsetX:" ); - _MTLFX_PRIVATE_DEF_SEL( setJitterOffsetY_, - "setJitterOffsetY:" ); - _MTLFX_PRIVATE_DEF_SEL( setNearPlane_, - "setNearPlane:" ); - _MTLFX_PRIVATE_DEF_SEL( setMaskTexture_, - "setMaskTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setMaskTextureFormat_, - "setMaskTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setMotionTexture_, - "setMotionTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setMotionTextureFormat_, - "setMotionTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setMotionVectorScaleX_, - "setMotionVectorScaleX:" ); - _MTLFX_PRIVATE_DEF_SEL( setMotionVectorScaleY_, - "setMotionVectorScaleY:" ); - _MTLFX_PRIVATE_DEF_SEL( setNormalTexture_, - "setNormalTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setNormalTextureFormat_, - "setNormalTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setOutputHeight_, - "setOutputHeight:" ); - _MTLFX_PRIVATE_DEF_SEL( setOutputTexture_, - "setOutputTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setOutputTextureFormat_, - "setOutputTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setOutputWidth_, - "setOutputWidth:" ); - _MTLFX_PRIVATE_DEF_SEL( transparencyOverlayTexture, - "transparencyOverlayTexture" ); - _MTLFX_PRIVATE_DEF_SEL( setTransparencyOverlayTexture_, - "setTransparencyOverlayTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setTransparencyOverlayTextureEnabled_, - "setTransparencyOverlayTextureEnabled:" ); - _MTLFX_PRIVATE_DEF_SEL( setPreExposure_, - "setPreExposure:" ); - _MTLFX_PRIVATE_DEF_SEL( setTransparencyOverlayTextureFormat_, - "setTransparencyOverlayTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setPrevColorTexture_, - "setPrevColorTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setReactiveMaskTexture_, - "setReactiveMaskTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setReactiveMaskTextureEnabled_, - "setReactiveMaskTextureEnabled:" ); - _MTLFX_PRIVATE_DEF_SEL( setReactiveMaskTextureFormat_, - "setReactiveMaskTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setRequiresSynchronousInitialization_, - "setRequiresSynchronousInitialization:" ); - _MTLFX_PRIVATE_DEF_SEL( setReset_, - "setReset:" ); - _MTLFX_PRIVATE_DEF_SEL( roughnessTexture, - "roughnessTexture" ); - _MTLFX_PRIVATE_DEF_SEL( setRoughnessTexture_, - "setRoughnessTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setRoughnessTextureFormat_, - "setRoughnessTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setScaler_, - "setScaler:" ); - _MTLFX_PRIVATE_DEF_SEL( setShouldResetHistory_, - "setShouldResetHistory:" ); - _MTLFX_PRIVATE_DEF_SEL( specularHitDistanceTexture, - "specularHitDistanceTexture" ); - _MTLFX_PRIVATE_DEF_SEL( setSpecularHitDistanceTexture_, - "setSpecularHitDistanceTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setSpecularHitDistanceTextureEnabled_, - "setSpecularHitDistanceTextureEnabled:" ); - _MTLFX_PRIVATE_DEF_SEL( setSpecularAlbedoTexture_, - "setSpecularAlbedoTexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setSpecularAlbedoTextureFormat_, - "setSpecularAlbedoTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setSpecularHitDistanceTextureFormat_, - "setSpecularHitDistanceTextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setUITexture_, - "setUITexture:" ); - _MTLFX_PRIVATE_DEF_SEL( setUITextureFormat_, - "setUITextureFormat:" ); - _MTLFX_PRIVATE_DEF_SEL( setViewToClipMatrix_, - "setViewToClipMatrix:" ); - _MTLFX_PRIVATE_DEF_SEL( setWidth_, - "setWidth:" ); - _MTLFX_PRIVATE_DEF_SEL( setWorldToViewMatrix_, - "setWorldToViewMatrix:" ); - _MTLFX_PRIVATE_DEF_SEL( shouldResetHistory, - "shouldResetHistory" ); - _MTLFX_PRIVATE_DEF_SEL( specularAlbedoTexture, - "specularAlbedoTexture" ); - _MTLFX_PRIVATE_DEF_SEL( specularAlbedoTextureFormat, - "specularAlbedoTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( specularAlbedoTextureUsage, - "specularAlbedoTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( specularHitDistanceTextureFormat, - "specularHitDistanceTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( specularHitDistanceTextureUsage, - "specularHitDistanceTextureUsage" ); - _MTLFX_PRIVATE_DEF_SEL( supportedInputContentMaxScaleForDevice_, - "supportedInputContentMaxScaleForDevice:" ); - _MTLFX_PRIVATE_DEF_SEL( supportedInputContentMinScaleForDevice_, - "supportedInputContentMinScaleForDevice:" ); - _MTLFX_PRIVATE_DEF_SEL( supportsDevice_, - "supportsDevice:" ); - _MTLFX_PRIVATE_DEF_SEL( supportsMetal4FX_, - "supportsMetal4FX:" ); - _MTLFX_PRIVATE_DEF_SEL( uiTexture, - "uiTexture" ); - _MTLFX_PRIVATE_DEF_SEL( uiTextureFormat, - "uiTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( uiTextureUsage, - "uiTextureFormat" ); - _MTLFX_PRIVATE_DEF_SEL( viewToClipMatrix, - "viewToClipMatrix" ); - _MTLFX_PRIVATE_DEF_SEL( width, - "width" ); - _MTLFX_PRIVATE_DEF_SEL( worldToViewMatrix, - "worldToViewMatrix" ); - } // Selector - } // Private -} // MTLFX - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/MetalFX/MTLFXSpatialScaler.hpp b/thirdparty/metal-cpp/MetalFX/MTLFXSpatialScaler.hpp index cb1186ed8992..f64db47b4303 100644 --- a/thirdparty/metal-cpp/MetalFX/MTLFXSpatialScaler.hpp +++ b/thirdparty/metal-cpp/MetalFX/MTLFXSpatialScaler.hpp @@ -1,397 +1,304 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// MetalFX/MTLFXSpatialScaler.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "MTLFXDefines.hpp" -#include "MTLFXPrivate.hpp" - -#include "../Metal/Metal.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace MTL4FX -{ +#include "MTLFXBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class CommandBuffer; + class Device; + class Fence; + class Texture; + enum PixelFormat : NS::UInteger; + using TextureUsage = NS::UInteger; +} +namespace MTL4 { + class Compiler; +} +namespace MTL4FX { class SpatialScaler; } namespace MTLFX { - _MTLFX_ENUM( NS::Integer, SpatialScalerColorProcessingMode ) - { - SpatialScalerColorProcessingModePerceptual = 0, - SpatialScalerColorProcessingModeLinear = 1, - SpatialScalerColorProcessingModeHDR = 2 - }; - - class SpatialScalerDescriptor : public NS::Copying< SpatialScalerDescriptor > - { - public: - static class SpatialScalerDescriptor* alloc(); - class SpatialScalerDescriptor* init(); - - MTL::PixelFormat colorTextureFormat() const; - void setColorTextureFormat( MTL::PixelFormat format ); - - MTL::PixelFormat outputTextureFormat() const; - void setOutputTextureFormat( MTL::PixelFormat format ); - - NS::UInteger inputWidth() const; - void setInputWidth( NS::UInteger width ); - - NS::UInteger inputHeight() const; - void setInputHeight( NS::UInteger height ); - - NS::UInteger outputWidth() const; - void setOutputWidth( NS::UInteger width ); - - NS::UInteger outputHeight() const; - void setOutputHeight( NS::UInteger height ); - - SpatialScalerColorProcessingMode colorProcessingMode() const; - void setColorProcessingMode( SpatialScalerColorProcessingMode mode ); - - class SpatialScaler* newSpatialScaler( const MTL::Device* pDevice ) const; - MTL4FX::SpatialScaler* newSpatialScaler( const MTL::Device* pDevice, const MTL4::Compiler* pCompiler ) const; - - static bool supportsDevice( const MTL::Device* pDevice); - static bool supportsMetal4FX( const MTL::Device* pDevice ); - }; - - class SpatialScalerBase : public NS::Referencing< SpatialScaler > - { - public: - MTL::TextureUsage colorTextureUsage() const; - MTL::TextureUsage outputTextureUsage() const; - - NS::UInteger inputContentWidth() const; - void setInputContentWidth( NS::UInteger width ); - - NS::UInteger inputContentHeight() const; - void setInputContentHeight( NS::UInteger height ); - MTL::Texture* colorTexture() const; - void setColorTexture( MTL::Texture* pTexture ); - - MTL::Texture* outputTexture() const; - void setOutputTexture( MTL::Texture* pTexture ); - - MTL::PixelFormat colorTextureFormat() const; - MTL::PixelFormat outputTextureFormat() const; - NS::UInteger inputWidth() const; - NS::UInteger inputHeight() const; - NS::UInteger outputWidth() const; - NS::UInteger outputHeight() const; - SpatialScalerColorProcessingMode colorProcessingMode() const; - - MTL::Fence* fence() const; - void setFence( MTL::Fence* pFence ); - }; - - class SpatialScaler : public NS::Referencing< SpatialScaler, SpatialScalerBase > - { - public: - void encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ); - }; -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_ENUM(NS::Integer, SpatialScalerColorProcessingMode) { + SpatialScalerColorProcessingModePerceptual = 0, + SpatialScalerColorProcessingModeLinear = 1, + SpatialScalerColorProcessingModeHDR = 2, +}; + + +class SpatialScalerDescriptor; +class SpatialScalerBase; +class SpatialScaler; + +class SpatialScalerDescriptor : public NS::Copying +{ +public: + static SpatialScalerDescriptor* alloc(); + SpatialScalerDescriptor* init() const; + + static bool supportsDevice(MTL::Device* device); + static bool supportsMetal4FX(MTL::Device* device); + + MTLFX::SpatialScalerColorProcessingMode colorProcessingMode() const; + MTL::PixelFormat colorTextureFormat() const; + NS::UInteger inputHeight() const; + NS::UInteger inputWidth() const; + MTLFX::SpatialScaler* newSpatialScaler(MTL::Device* device); + MTL4FX::SpatialScaler* newSpatialScaler(MTL::Device* device, MTL4::Compiler* compiler); + NS::UInteger outputHeight() const; + MTL::PixelFormat outputTextureFormat() const; + NS::UInteger outputWidth() const; + void setColorProcessingMode(MTLFX::SpatialScalerColorProcessingMode colorProcessingMode); + void setColorTextureFormat(MTL::PixelFormat colorTextureFormat); + void setInputHeight(NS::UInteger inputHeight); + void setInputWidth(NS::UInteger inputWidth); + void setOutputHeight(NS::UInteger outputHeight); + void setOutputTextureFormat(MTL::PixelFormat outputTextureFormat); + void setOutputWidth(NS::UInteger outputWidth); + +}; + +class SpatialScalerBase : public NS::Referencing +{ +public: + MTLFX::SpatialScalerColorProcessingMode colorProcessingMode() const; + MTL::Texture* colorTexture() const; + MTL::PixelFormat colorTextureFormat() const; + MTL::TextureUsage colorTextureUsage() const; + MTL::Fence* fence() const; + NS::UInteger inputContentHeight() const; + NS::UInteger inputContentWidth() const; + NS::UInteger inputHeight() const; + NS::UInteger inputWidth() const; + NS::UInteger outputHeight() const; + MTL::Texture* outputTexture() const; + MTL::PixelFormat outputTextureFormat() const; + MTL::TextureUsage outputTextureUsage() const; + NS::UInteger outputWidth() const; + void setColorTexture(MTL::Texture* colorTexture); + void setFence(MTL::Fence* fence); + void setInputContentHeight(NS::UInteger inputContentHeight); + void setInputContentWidth(NS::UInteger inputContentWidth); + void setOutputTexture(MTL::Texture* outputTexture); + +}; + +class SpatialScaler : public NS::Referencing +{ +public: + void encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer); + +}; + +} // namespace MTLFX + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLFXSpatialScalerDescriptor; +extern "C" void *OBJC_CLASS_$_MTLFXSpatialScalerBase; +extern "C" void *OBJC_CLASS_$_MTLFXSpatialScaler; _MTLFX_INLINE MTLFX::SpatialScalerDescriptor* MTLFX::SpatialScalerDescriptor::alloc() { - return NS::Object::alloc< SpatialScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXSpatialScalerDescriptor ) ); + return _MTLFX_msg_MTLFX__SpatialScalerDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLFXSpatialScalerDescriptor, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE MTLFX::SpatialScalerDescriptor* MTLFX::SpatialScalerDescriptor::init() const +{ + return _MTLFX_msg_MTLFX__SpatialScalerDescriptorp_init((const void*)this, nullptr); +} -_MTLFX_INLINE MTLFX::SpatialScalerDescriptor* MTLFX::SpatialScalerDescriptor::init() +_MTLFX_INLINE bool MTLFX::SpatialScalerDescriptor::supportsMetal4FX(MTL::Device* device) { - return NS::Object::init< SpatialScalerDescriptor >(); + return _MTLFX_msg_bool_supportsMetal4FX__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXSpatialScalerDescriptor, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE bool MTLFX::SpatialScalerDescriptor::supportsDevice(MTL::Device* device) +{ + return _MTLFX_msg_bool_supportsDevice__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXSpatialScalerDescriptor, nullptr, device); +} _MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScalerDescriptor::colorTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_colorTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setColorTextureFormat( MTL::PixelFormat format ) +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setColorTextureFormat(MTL::PixelFormat colorTextureFormat) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTextureFormat_ ), format ); + _MTLFX_msg_v_setColorTextureFormat__MTL__PixelFormat((const void*)this, nullptr, colorTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScalerDescriptor::outputTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_outputTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat format ) +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputTextureFormat(MTL::PixelFormat outputTextureFormat) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTextureFormat_ ), format ); + _MTLFX_msg_v_setOutputTextureFormat__MTL__PixelFormat((const void*)this, nullptr, outputTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::inputWidth() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); + return _MTLFX_msg_NS__UInteger_inputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setInputWidth( NS::UInteger width ) +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setInputWidth(NS::UInteger inputWidth) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputWidth_ ), width ); + _MTLFX_msg_v_setInputWidth__NS__UInteger((const void*)this, nullptr, inputWidth); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::inputHeight() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); + return _MTLFX_msg_NS__UInteger_inputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setInputHeight( NS::UInteger height ) +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setInputHeight(NS::UInteger inputHeight) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputHeight_ ), height ); + _MTLFX_msg_v_setInputHeight__NS__UInteger((const void*)this, nullptr, inputHeight); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::outputWidth() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); + return _MTLFX_msg_NS__UInteger_outputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputWidth( NS::UInteger width ) +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputWidth(NS::UInteger outputWidth) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputWidth_ ), width ); + _MTLFX_msg_v_setOutputWidth__NS__UInteger((const void*)this, nullptr, outputWidth); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::outputHeight() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); + return _MTLFX_msg_NS__UInteger_outputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputHeight( NS::UInteger height ) +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputHeight(NS::UInteger outputHeight) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputHeight_ ), height ); + _MTLFX_msg_v_setOutputHeight__NS__UInteger((const void*)this, nullptr, outputHeight); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTLFX::SpatialScalerColorProcessingMode MTLFX::SpatialScalerDescriptor::colorProcessingMode() const { - return Object::sendMessage< SpatialScalerColorProcessingMode >( this, _MTLFX_PRIVATE_SEL( colorProcessingMode ) ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setColorProcessingMode( SpatialScalerColorProcessingMode mode ) -{ - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorProcessingMode_ ), mode ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTLFX::SpatialScaler* MTLFX::SpatialScalerDescriptor::newSpatialScaler( const MTL::Device* pDevice ) const -{ - return Object::sendMessage< SpatialScaler* >( this, _MTLFX_PRIVATE_SEL( newSpatialScalerWithDevice_ ), pDevice ); + return _MTLFX_msg_MTLFX__SpatialScalerColorProcessingMode_colorProcessingMode((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTL4FX::SpatialScaler* MTLFX::SpatialScalerDescriptor::newSpatialScaler( const MTL::Device* pDevice, const MTL4::Compiler* pCompiler ) const +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setColorProcessingMode(MTLFX::SpatialScalerColorProcessingMode colorProcessingMode) { - return Object::sendMessage< MTL4FX::SpatialScaler* >( this, _MTLFX_PRIVATE_SEL( newSpatialScalerWithDevice_compiler_ ), pDevice, pCompiler ); + _MTLFX_msg_v_setColorProcessingMode__MTLFX__SpatialScalerColorProcessingMode((const void*)this, nullptr, colorProcessingMode); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::SpatialScalerDescriptor::supportsDevice( const MTL::Device* pDevice ) +_MTLFX_INLINE MTLFX::SpatialScaler* MTLFX::SpatialScalerDescriptor::newSpatialScaler(MTL::Device* device) { - return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXSpatialScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsDevice_ ), pDevice ); + return _MTLFX_msg_MTLFX__SpatialScalerp_newSpatialScalerWithDevice__MTL__Devicep((const void*)this, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::SpatialScalerDescriptor::supportsMetal4FX( const MTL::Device* pDevice ) +_MTLFX_INLINE MTL4FX::SpatialScaler* MTLFX::SpatialScalerDescriptor::newSpatialScaler(MTL::Device* device, MTL4::Compiler* compiler) { - return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXSpatialScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsMetal4FX_ ), pDevice ); + return _MTLFX_msg_MTL4FX__SpatialScalerp_newSpatialScalerWithDevice_compiler__MTL__Devicep_MTL4__Compilerp((const void*)this, nullptr, device, compiler); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::SpatialScalerBase::colorTextureUsage() const { - return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_colorTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::SpatialScalerBase::outputTextureUsage() const { - return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_outputTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerBase::inputContentWidth() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentWidth ) ); + return _MTLFX_msg_NS__UInteger_inputContentWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerBase::setInputContentWidth( NS::UInteger width ) +_MTLFX_INLINE void MTLFX::SpatialScalerBase::setInputContentWidth(NS::UInteger inputContentWidth) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentWidth_ ), width ); + _MTLFX_msg_v_setInputContentWidth__NS__UInteger((const void*)this, nullptr, inputContentWidth); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerBase::inputContentHeight() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentHeight ) ); + return _MTLFX_msg_NS__UInteger_inputContentHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerBase::setInputContentHeight( NS::UInteger height ) +_MTLFX_INLINE void MTLFX::SpatialScalerBase::setInputContentHeight(NS::UInteger inputContentHeight) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentHeight_ ), height ); + _MTLFX_msg_v_setInputContentHeight__NS__UInteger((const void*)this, nullptr, inputContentHeight); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::SpatialScalerBase::colorTexture() const { - return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) ); + return _MTLFX_msg_MTL__Texturep_colorTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerBase::setColorTexture( MTL::Texture* pTexture ) +_MTLFX_INLINE void MTLFX::SpatialScalerBase::setColorTexture(MTL::Texture* colorTexture) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTexture_ ), pTexture ); + _MTLFX_msg_v_setColorTexture__MTL__Texturep((const void*)this, nullptr, colorTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::SpatialScalerBase::outputTexture() const { - return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) ); + return _MTLFX_msg_MTL__Texturep_outputTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerBase::setOutputTexture( MTL::Texture* pTexture ) +_MTLFX_INLINE void MTLFX::SpatialScalerBase::setOutputTexture(MTL::Texture* outputTexture) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTexture_ ), pTexture ); + _MTLFX_msg_v_setOutputTexture__MTL__Texturep((const void*)this, nullptr, outputTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScalerBase::colorTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_colorTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScalerBase::outputTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_outputTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerBase::inputWidth() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); + return _MTLFX_msg_NS__UInteger_inputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerBase::inputHeight() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); + return _MTLFX_msg_NS__UInteger_inputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerBase::outputWidth() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); + return _MTLFX_msg_NS__UInteger_outputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerBase::outputHeight() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); + return _MTLFX_msg_NS__UInteger_outputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTLFX::SpatialScalerColorProcessingMode MTLFX::SpatialScalerBase::colorProcessingMode() const { - return Object::sendMessage< SpatialScalerColorProcessingMode >( this, _MTLFX_PRIVATE_SEL( colorProcessingMode ) ); + return _MTLFX_msg_MTLFX__SpatialScalerColorProcessingMode_colorProcessingMode((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Fence* MTLFX::SpatialScalerBase::fence() const { - return Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) ); + return _MTLFX_msg_MTL__Fencep_fence((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScalerBase::setFence( MTL::Fence* pFence ) +_MTLFX_INLINE void MTLFX::SpatialScalerBase::setFence(MTL::Fence* fence) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFence_ ), pFence ); + _MTLFX_msg_v_setFence__MTL__Fencep((const void*)this, nullptr, fence); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::SpatialScaler::encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ) +_MTLFX_INLINE void MTLFX::SpatialScaler::encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), pCommandBuffer ); + _MTLFX_msg_v_encodeToCommandBuffer__MTL__CommandBufferp((const void*)this, nullptr, commandBuffer); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/MetalFX/MTLFXTemporalDenoisedScaler.hpp b/thirdparty/metal-cpp/MetalFX/MTLFXTemporalDenoisedScaler.hpp index 5863e078de88..6a905402d8ac 100644 --- a/thirdparty/metal-cpp/MetalFX/MTLFXTemporalDenoisedScaler.hpp +++ b/thirdparty/metal-cpp/MetalFX/MTLFXTemporalDenoisedScaler.hpp @@ -1,1208 +1,867 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// MetalFX/MTLFXTemporalDenoisedScaler.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "MTLFXDefines.hpp" -#include "MTLFXPrivate.hpp" -#include "MTLFXTemporalScaler.hpp" - -#include "../Metal/Metal.hpp" - -#include - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace MTL4FX -{ +#include "MTLFXBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class CommandBuffer; + class Device; + class Fence; + class Texture; + enum PixelFormat : NS::UInteger; + using TextureUsage = NS::UInteger; +} +namespace MTL4 { + class Compiler; +} +namespace MTL4FX { class TemporalDenoisedScaler; } namespace MTLFX { - class TemporalDenoisedScalerDescriptor : public NS::Copying< TemporalDenoisedScalerDescriptor > - { - public: - static class TemporalDenoisedScalerDescriptor* alloc(); - class TemporalDenoisedScalerDescriptor* init(); - - MTL::PixelFormat colorTextureFormat() const; - void setColorTextureFormat( MTL::PixelFormat pixelFormat ); - - MTL::PixelFormat depthTextureFormat() const; - void setDepthTextureFormat( MTL::PixelFormat pixelFormat ); - - MTL::PixelFormat motionTextureFormat() const; - void setMotionTextureFormat( MTL::PixelFormat pixelFormal ); - - MTL::PixelFormat diffuseAlbedoTextureFormat() const; - void setDiffuseAlbedoTextureFormat( MTL::PixelFormat pixelFormat ); - - MTL::PixelFormat specularAlbedoTextureFormat() const; - void setSpecularAlbedoTextureFormat( MTL::PixelFormat pixelFormat ); - - MTL::PixelFormat normalTextureFormat() const; - void setNormalTextureFormat( MTL::PixelFormat pixelFormat ); - - MTL::PixelFormat roughnessTextureFormat() const; - void setRoughnessTextureFormat( MTL::PixelFormat pixelFormat ); - - MTL::PixelFormat specularHitDistanceTextureFormat() const; - void setSpecularHitDistanceTextureFormat( MTL::PixelFormat pixelFormat ); - - MTL::PixelFormat denoiseStrengthMaskTextureFormat() const; - void setDenoiseStrengthMaskTextureFormat( MTL::PixelFormat pixelFormat ); - - MTL::PixelFormat transparencyOverlayTextureFormat() const; - void setTransparencyOverlayTextureFormat( MTL::PixelFormat pixelFormat ); - - MTL::PixelFormat outputTextureFormat() const; - void setOutputTextureFormat( MTL::PixelFormat pixelFormat ); - - NS::UInteger inputWidth() const; - void setInputWidth( NS::UInteger inputWidth ); - - NS::UInteger inputHeight() const; - void setInputHeight( NS::UInteger inputHeight ); - - NS::UInteger outputWidth() const; - void setOutputWidth( NS::UInteger outputWidth ); - - NS::UInteger outputHeight() const; - void setOutputHeight( NS::UInteger outputHeight ); - - bool requiresSynchronousInitialization() const; - void setRequiresSynchronousInitialization( bool requiresSynchronousInitialization ); - - bool isAutoExposureEnabled() const; - void setAutoExposureEnabled( bool enabled ); - - bool isInputContentPropertiesEnabled() const; - void setInputContentPropertiesEnabled( bool enabled ); - - float inputContentMinScale() const; - void setInputContentMinScale( float inputContentMinScale ); - - float inputContentMaxScale() const; - void setInputContentMaxScale( float inputContentMaxScale ); - - bool isReactiveMaskTextureEnabled() const; - void setReactiveMaskTextureEnabled( bool enabled ); - - MTL::PixelFormat reactiveMaskTextureFormat() const; - void setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat ); - - bool isSpecularHitDistanceTextureEnabled() const; - void setSpecularHitDistanceTextureEnabled( bool enabled ); - - bool isDenoiseStrengthMaskTextureEnabled() const; - void setDenoiseStrengthMaskTextureEnabled( bool enabled ); - - bool isTransparencyOverlayTextureEnabled() const; - void setTransparencyOverlayTextureEnabled( bool enabled ); - - class TemporalDenoisedScaler* newTemporalDenoisedScaler( const MTL::Device* device ) const; - MTL4FX::TemporalDenoisedScaler* newTemporalDenoisedScaler( const MTL::Device* device, const MTL4::Compiler* compiler) const; - - static float supportedInputContentMinScale(MTL::Device* device); - static float supportedInputContentMaxScale(MTL::Device* device); - - static bool supportsMetal4FX( MTL::Device* device); - static bool supportsDevice( MTL::Device* device); - }; - - class TemporalDenoisedScalerBase : public NS::Referencing< TemporalDenoisedScalerBase, FrameInterpolatableScaler > - { - public: - MTL::TextureUsage colorTextureUsage() const; - MTL::TextureUsage depthTextureUsage() const; - MTL::TextureUsage motionTextureUsage() const; - MTL::TextureUsage reactiveTextureUsage() const; - MTL::TextureUsage diffuseAlbedoTextureUsage() const; - MTL::TextureUsage specularAlbedoTextureUsage() const; - MTL::TextureUsage normalTextureUsage() const; - MTL::TextureUsage roughnessTextureUsage() const; - MTL::TextureUsage specularHitDistanceTextureUsage() const; - MTL::TextureUsage denoiseStrengthMaskTextureUsage() const; - MTL::TextureUsage transparencyOverlayTextureUsage() const; - MTL::TextureUsage outputTextureUsage() const; - - MTL::Texture* colorTexture() const; - void setColorTexture( MTL::Texture* colorTexture ); - - MTL::Texture* depthTexture() const; - void setDepthTexture( MTL::Texture* depthTexture ); - - MTL::Texture* motionTexture() const; - void setMotionTexture( MTL::Texture* motionTexture ); - - MTL::Texture* diffuseAlbedoTexture() const; - void setDiffuseAlbedoTexture( MTL::Texture* diffuseAlbedoTexture ); - - MTL::Texture* specularAlbedoTexture() const; - void setSpecularAlbedoTexture( MTL::Texture* specularAlbedoTexture ); - - MTL::Texture* normalTexture() const; - void setNormalTexture( MTL::Texture* normalTexture ); - - MTL::Texture* roughnessTexture() const; - void setRoughnessTexture( MTL::Texture* roughnessTexture ); - - MTL::Texture* specularHitDistanceTexture() const; - void setSpecularHitDistanceTexture( MTL::Texture* specularHitDistanceTexture ); - - MTL::Texture* denoiseStrengthMaskTexture() const; - void setDenoiseStrengthMaskTexture( MTL::Texture* denoiseStrengthMaskTexture ); - - MTL::Texture* transparencyOverlayTexture() const; - void setTransparencyOverlayTexture( MTL::Texture* transparencyOverlayTexture ); - - MTL::Texture* outputTexture() const; - void setOutputTexture( MTL::Texture* outputTexture ); - - MTL::Texture* exposureTexture() const; - void setExposureTexture( MTL::Texture* exposureTexture ); - - float preExposure() const; - void setPreExposure( float preExposure ); - - MTL::Texture* reactiveMaskTexture() const; - void setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture ); - - float jitterOffsetX() const; - void setJitterOffsetX( float jitterOffsetX ); - - float jitterOffsetY() const; - void setJitterOffsetY( float jitterOffsetY ); - - float motionVectorScaleX() const; - void setMotionVectorScaleX( float motionVectorScaleX ); - - float motionVectorScaleY() const; - void setMotionVectorScaleY( float motionVectorScaleY ); - - bool shouldResetHistory() const; - void setShouldResetHistory( bool shouldResetHistory ); - - bool isDepthReversed() const; - void setDepthReversed( bool depthReversed ); - MTL::PixelFormat colorTextureFormat() const; - MTL::PixelFormat depthTextureFormat() const; - MTL::PixelFormat motionTextureFormat() const; - MTL::PixelFormat diffuseAlbedoTextureFormat() const; - MTL::PixelFormat specularAlbedoTextureFormat() const; - MTL::PixelFormat normalTextureFormat() const; - MTL::PixelFormat roughnessTextureFormat() const; - MTL::PixelFormat specularHitDistanceTextureFormat() const; - MTL::PixelFormat denoiseStrengthMaskTextureFormat() const; - MTL::PixelFormat transparencyOverlayTextureFormat() const; - MTL::PixelFormat reactiveMaskTextureFormat() const; - MTL::PixelFormat outputTextureFormat() const; +class TemporalDenoisedScalerDescriptor; +class TemporalDenoisedScalerBase; +class TemporalDenoisedScaler; + +class TemporalDenoisedScalerDescriptor : public NS::Copying +{ +public: + static TemporalDenoisedScalerDescriptor* alloc(); + TemporalDenoisedScalerDescriptor* init() const; + + static float supportedInputContentMaxScale(MTL::Device* device); + static float supportedInputContentMinScale(MTL::Device* device); + static bool supportsDevice(MTL::Device* device); + static bool supportsMetal4FX(MTL::Device* device); + + bool autoExposureEnabled() const; + MTL::PixelFormat colorTextureFormat() const; + bool denoiseStrengthMaskTextureEnabled() const; + MTL::PixelFormat denoiseStrengthMaskTextureFormat() const; + MTL::PixelFormat depthTextureFormat() const; + MTL::PixelFormat diffuseAlbedoTextureFormat() const; + NS::UInteger inputHeight() const; + NS::UInteger inputWidth() const; + bool isAutoExposureEnabled(); + bool isDenoiseStrengthMaskTextureEnabled(); + bool isReactiveMaskTextureEnabled(); + bool isSpecularHitDistanceTextureEnabled(); + bool isTransparencyOverlayTextureEnabled(); + MTL::PixelFormat motionTextureFormat() const; + MTLFX::TemporalDenoisedScaler* newTemporalDenoisedScaler(MTL::Device* device); + MTL4FX::TemporalDenoisedScaler* newTemporalDenoisedScaler(MTL::Device* device, MTL4::Compiler* compiler); + MTL::PixelFormat normalTextureFormat() const; + NS::UInteger outputHeight() const; + MTL::PixelFormat outputTextureFormat() const; + NS::UInteger outputWidth() const; + bool reactiveMaskTextureEnabled() const; + MTL::PixelFormat reactiveMaskTextureFormat() const; + bool requiresSynchronousInitialization() const; + MTL::PixelFormat roughnessTextureFormat() const; + void setAutoExposureEnabled(bool autoExposureEnabled); + void setColorTextureFormat(MTL::PixelFormat colorTextureFormat); + void setDenoiseStrengthMaskTextureEnabled(bool denoiseStrengthMaskTextureEnabled); + void setDenoiseStrengthMaskTextureFormat(MTL::PixelFormat denoiseStrengthMaskTextureFormat); + void setDepthTextureFormat(MTL::PixelFormat depthTextureFormat); + void setDiffuseAlbedoTextureFormat(MTL::PixelFormat diffuseAlbedoTextureFormat); + void setInputHeight(NS::UInteger inputHeight); + void setInputWidth(NS::UInteger inputWidth); + void setMotionTextureFormat(MTL::PixelFormat motionTextureFormat); + void setNormalTextureFormat(MTL::PixelFormat normalTextureFormat); + void setOutputHeight(NS::UInteger outputHeight); + void setOutputTextureFormat(MTL::PixelFormat outputTextureFormat); + void setOutputWidth(NS::UInteger outputWidth); + void setReactiveMaskTextureEnabled(bool reactiveMaskTextureEnabled); + void setReactiveMaskTextureFormat(MTL::PixelFormat reactiveMaskTextureFormat); + void setRequiresSynchronousInitialization(bool requiresSynchronousInitialization); + void setRoughnessTextureFormat(MTL::PixelFormat roughnessTextureFormat); + void setSpecularAlbedoTextureFormat(MTL::PixelFormat specularAlbedoTextureFormat); + void setSpecularHitDistanceTextureEnabled(bool specularHitDistanceTextureEnabled); + void setSpecularHitDistanceTextureFormat(MTL::PixelFormat specularHitDistanceTextureFormat); + void setTransparencyOverlayTextureEnabled(bool transparencyOverlayTextureEnabled); + void setTransparencyOverlayTextureFormat(MTL::PixelFormat transparencyOverlayTextureFormat); + MTL::PixelFormat specularAlbedoTextureFormat() const; + bool specularHitDistanceTextureEnabled() const; + MTL::PixelFormat specularHitDistanceTextureFormat() const; + bool transparencyOverlayTextureEnabled() const; + MTL::PixelFormat transparencyOverlayTextureFormat() const; + +}; + +class TemporalDenoisedScalerBase : public NS::Referencing +{ +public: + MTL::Texture* colorTexture() const; + MTL::PixelFormat colorTextureFormat() const; + MTL::TextureUsage colorTextureUsage() const; + MTL::Texture* denoiseStrengthMaskTexture() const; + MTL::PixelFormat denoiseStrengthMaskTextureFormat() const; + MTL::TextureUsage denoiseStrengthMaskTextureUsage() const; + bool depthReversed() const; + MTL::Texture* depthTexture() const; + MTL::PixelFormat depthTextureFormat() const; + MTL::TextureUsage depthTextureUsage() const; + MTL::Texture* diffuseAlbedoTexture() const; + MTL::PixelFormat diffuseAlbedoTextureFormat() const; + MTL::TextureUsage diffuseAlbedoTextureUsage() const; + MTL::Texture* exposureTexture() const; + MTL::Fence* fence() const; + float inputContentMaxScale() const; + float inputContentMinScale() const; + NS::UInteger inputHeight() const; + NS::UInteger inputWidth() const; + bool isDepthReversed(); + float jitterOffsetX() const; + float jitterOffsetY() const; + MTL::Texture* motionTexture() const; + MTL::PixelFormat motionTextureFormat() const; + MTL::TextureUsage motionTextureUsage() const; + float motionVectorScaleX() const; + float motionVectorScaleY() const; + MTL::Texture* normalTexture() const; + MTL::PixelFormat normalTextureFormat() const; + MTL::TextureUsage normalTextureUsage() const; + NS::UInteger outputHeight() const; + MTL::Texture* outputTexture() const; + MTL::PixelFormat outputTextureFormat() const; + MTL::TextureUsage outputTextureUsage() const; + NS::UInteger outputWidth() const; + float preExposure() const; + MTL::Texture* reactiveMaskTexture() const; + MTL::PixelFormat reactiveMaskTextureFormat() const; + MTL::TextureUsage reactiveTextureUsage() const; + MTL::Texture* roughnessTexture() const; + MTL::PixelFormat roughnessTextureFormat() const; + MTL::TextureUsage roughnessTextureUsage() const; + void setColorTexture(MTL::Texture* colorTexture); + void setDenoiseStrengthMaskTexture(MTL::Texture* denoiseStrengthMaskTexture); + void setDepthReversed(bool depthReversed); + void setDepthTexture(MTL::Texture* depthTexture); + void setDiffuseAlbedoTexture(MTL::Texture* diffuseAlbedoTexture); + void setExposureTexture(MTL::Texture* exposureTexture); + void setFence(MTL::Fence* fence); + void setJitterOffsetX(float jitterOffsetX); + void setJitterOffsetY(float jitterOffsetY); + void setMotionTexture(MTL::Texture* motionTexture); + void setMotionVectorScaleX(float motionVectorScaleX); + void setMotionVectorScaleY(float motionVectorScaleY); + void setNormalTexture(MTL::Texture* normalTexture); + void setOutputTexture(MTL::Texture* outputTexture); + void setPreExposure(float preExposure); + void setReactiveMaskTexture(MTL::Texture* reactiveMaskTexture); + void setRoughnessTexture(MTL::Texture* roughnessTexture); + void setShouldResetHistory(bool shouldResetHistory); + void setSpecularAlbedoTexture(MTL::Texture* specularAlbedoTexture); + void setSpecularHitDistanceTexture(MTL::Texture* specularHitDistanceTexture); + void setTransparencyOverlayTexture(MTL::Texture* transparencyOverlayTexture); + void setViewToClipMatrix(void* viewToClipMatrix); + void setWorldToViewMatrix(void* worldToViewMatrix); + bool shouldResetHistory() const; + MTL::Texture* specularAlbedoTexture() const; + MTL::PixelFormat specularAlbedoTextureFormat() const; + MTL::TextureUsage specularAlbedoTextureUsage() const; + MTL::Texture* specularHitDistanceTexture() const; + MTL::PixelFormat specularHitDistanceTextureFormat() const; + MTL::TextureUsage specularHitDistanceTextureUsage() const; + MTL::Texture* transparencyOverlayTexture() const; + MTL::PixelFormat transparencyOverlayTextureFormat() const; + MTL::TextureUsage transparencyOverlayTextureUsage() const; + void* viewToClipMatrix() const; + void* worldToViewMatrix() const; + +}; + +class TemporalDenoisedScaler : public NS::Referencing +{ +public: + void encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer); + +}; + +} // namespace MTLFX + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLFXTemporalDenoisedScalerDescriptor; +extern "C" void *OBJC_CLASS_$_MTLFXTemporalDenoisedScalerBase; +extern "C" void *OBJC_CLASS_$_MTLFXTemporalDenoisedScaler; - NS::UInteger inputWidth() const; - NS::UInteger inputHeight() const; - NS::UInteger outputWidth() const; - NS::UInteger outputHeight() const; - float inputContentMinScale() const; - float inputContentMaxScale() const; - - simd::float4x4 worldToViewMatrix() const; - void setWorldToViewMatrix( simd::float4x4 worldToViewMatrix ); - - simd::float4x4 viewToClipMatrix() const; - void setViewToClipMatrix( simd::float4x4 viewToClipMatrix ); - - MTL::Fence* fence() const; - void setFence( MTL::Fence* fence ); - }; - - class TemporalDenoisedScaler : public NS::Referencing< TemporalDenoisedScaler, TemporalDenoisedScalerBase > - { - public: - - void encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer); - }; +_MTLFX_INLINE MTLFX::TemporalDenoisedScalerDescriptor* MTLFX::TemporalDenoisedScalerDescriptor::alloc() +{ + return _MTLFX_msg_MTLFX__TemporalDenoisedScalerDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLFXTemporalDenoisedScalerDescriptor, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE MTLFX::TemporalDenoisedScalerDescriptor* MTLFX::TemporalDenoisedScalerDescriptor::init() const +{ + return _MTLFX_msg_MTLFX__TemporalDenoisedScalerDescriptorp_init((const void*)this, nullptr); +} -_MTLFX_INLINE MTLFX::TemporalDenoisedScalerDescriptor* MTLFX::TemporalDenoisedScalerDescriptor::alloc() +_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::supportedInputContentMinScale(MTL::Device* device) { - return NS::Object::alloc< TemporalDenoisedScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ) ); + return _MTLFX_msg_float_supportedInputContentMinScaleForDevice__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXTemporalDenoisedScalerDescriptor, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::supportedInputContentMaxScale(MTL::Device* device) +{ + return _MTLFX_msg_float_supportedInputContentMaxScaleForDevice__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXTemporalDenoisedScalerDescriptor, nullptr, device); +} -_MTLFX_INLINE MTLFX::TemporalDenoisedScalerDescriptor* MTLFX::TemporalDenoisedScalerDescriptor::init() +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::supportsMetal4FX(MTL::Device* device) { - return NS::Object::init< TemporalDenoisedScalerDescriptor >(); + return _MTLFX_msg_bool_supportsMetal4FX__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXTemporalDenoisedScalerDescriptor, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::supportsDevice(MTL::Device* device) +{ + return _MTLFX_msg_bool_supportsDevice__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXTemporalDenoisedScalerDescriptor, nullptr, device); +} _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::colorTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_colorTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setColorTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setColorTextureFormat(MTL::PixelFormat colorTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setColorTextureFormat__MTL__PixelFormat((const void*)this, nullptr, colorTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::depthTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_depthTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDepthTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDepthTextureFormat(MTL::PixelFormat depthTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setDepthTextureFormat__MTL__PixelFormat((const void*)this, nullptr, depthTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::motionTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_motionTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setMotionTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setMotionTextureFormat(MTL::PixelFormat motionTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setMotionTextureFormat__MTL__PixelFormat((const void*)this, nullptr, motionTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::diffuseAlbedoTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_diffuseAlbedoTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDiffuseAlbedoTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDiffuseAlbedoTextureFormat(MTL::PixelFormat diffuseAlbedoTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDiffuseAlbedoTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setDiffuseAlbedoTextureFormat__MTL__PixelFormat((const void*)this, nullptr, diffuseAlbedoTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::specularAlbedoTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_specularAlbedoTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularAlbedoTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularAlbedoTextureFormat(MTL::PixelFormat specularAlbedoTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularAlbedoTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setSpecularAlbedoTextureFormat__MTL__PixelFormat((const void*)this, nullptr, specularAlbedoTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::normalTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( normalTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_normalTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setNormalTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setNormalTextureFormat(MTL::PixelFormat normalTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setNormalTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setNormalTextureFormat__MTL__PixelFormat((const void*)this, nullptr, normalTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::roughnessTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( roughnessTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_roughnessTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setRoughnessTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setRoughnessTextureFormat(MTL::PixelFormat roughnessTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRoughnessTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setRoughnessTextureFormat__MTL__PixelFormat((const void*)this, nullptr, roughnessTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::specularHitDistanceTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_specularHitDistanceTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularHitDistanceTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularHitDistanceTextureFormat(MTL::PixelFormat specularHitDistanceTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularHitDistanceTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setSpecularHitDistanceTextureFormat__MTL__PixelFormat((const void*)this, nullptr, specularHitDistanceTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::denoiseStrengthMaskTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_denoiseStrengthMaskTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDenoiseStrengthMaskTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDenoiseStrengthMaskTextureFormat(MTL::PixelFormat denoiseStrengthMaskTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDenoiseStrengthMaskTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setDenoiseStrengthMaskTextureFormat__MTL__PixelFormat((const void*)this, nullptr, denoiseStrengthMaskTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::transparencyOverlayTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_transparencyOverlayTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setTransparencyOverlayTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setTransparencyOverlayTextureFormat(MTL::PixelFormat transparencyOverlayTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setTransparencyOverlayTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setTransparencyOverlayTextureFormat__MTL__PixelFormat((const void*)this, nullptr, transparencyOverlayTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::outputTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_outputTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputTextureFormat(MTL::PixelFormat outputTextureFormat) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setOutputTextureFormat__MTL__PixelFormat((const void*)this, nullptr, outputTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::inputWidth() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); + return _MTLFX_msg_NS__UInteger_inputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputWidth( NS::UInteger inputWidth ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputWidth(NS::UInteger inputWidth) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputWidth_ ), inputWidth ); + _MTLFX_msg_v_setInputWidth__NS__UInteger((const void*)this, nullptr, inputWidth); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::inputHeight() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); + return _MTLFX_msg_NS__UInteger_inputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputHeight( NS::UInteger inputHeight ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputHeight(NS::UInteger inputHeight) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputHeight_ ), inputHeight ); + _MTLFX_msg_v_setInputHeight__NS__UInteger((const void*)this, nullptr, inputHeight); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::outputWidth() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); + return _MTLFX_msg_NS__UInteger_outputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputWidth( NS::UInteger outputWidth ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputWidth(NS::UInteger outputWidth) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputWidth_ ), outputWidth ); + _MTLFX_msg_v_setOutputWidth__NS__UInteger((const void*)this, nullptr, outputWidth); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::outputHeight() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); + return _MTLFX_msg_NS__UInteger_outputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputHeight( NS::UInteger outputHeight ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputHeight(NS::UInteger outputHeight) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputHeight_ ), outputHeight ); + _MTLFX_msg_v_setOutputHeight__NS__UInteger((const void*)this, nullptr, outputHeight); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::requiresSynchronousInitialization() const { - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( requiresSynchronousInitialization ) ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setRequiresSynchronousInitialization( bool requiresSynchronousInitialization ) -{ - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRequiresSynchronousInitialization_ ), requiresSynchronousInitialization ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isAutoExposureEnabled() const -{ - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isAutoExposureEnabled ) ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setAutoExposureEnabled( bool enabled ) -{ - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setAutoExposureEnabled_ ), enabled ); + return _MTLFX_msg_bool_requiresSynchronousInitialization((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isInputContentPropertiesEnabled() const -{ - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isInputContentPropertiesEnabled ) ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputContentPropertiesEnabled( bool enabled ) -{ - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentPropertiesEnabled_ ), enabled ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::inputContentMinScale() const +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setRequiresSynchronousInitialization(bool requiresSynchronousInitialization) { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) ); + _MTLFX_msg_v_setRequiresSynchronousInitialization__bool((const void*)this, nullptr, requiresSynchronousInitialization); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputContentMinScale( float inputContentMinScale ) +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::autoExposureEnabled() const { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMinScale_ ), inputContentMinScale ); + return _MTLFX_msg_bool_autoExposureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::inputContentMaxScale() const +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setAutoExposureEnabled(bool autoExposureEnabled) { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) ); + _MTLFX_msg_v_setAutoExposureEnabled__bool((const void*)this, nullptr, autoExposureEnabled); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputContentMaxScale( float inputContentMaxScale ) +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::reactiveMaskTextureEnabled() const { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMaxScale_ ), inputContentMaxScale ); + return _MTLFX_msg_bool_reactiveMaskTextureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isReactiveMaskTextureEnabled() const +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setReactiveMaskTextureEnabled(bool reactiveMaskTextureEnabled) { - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isReactiveMaskTextureEnabled ) ); + _MTLFX_msg_v_setReactiveMaskTextureEnabled__bool((const void*)this, nullptr, reactiveMaskTextureEnabled); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setReactiveMaskTextureEnabled( bool enabled ) +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::reactiveMaskTextureFormat() const { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureEnabled_ ), enabled ); + return _MTLFX_msg_MTL__PixelFormat_reactiveMaskTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::reactiveMaskTextureFormat() const +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setReactiveMaskTextureFormat(MTL::PixelFormat reactiveMaskTextureFormat) { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTextureFormat ) ); + _MTLFX_msg_v_setReactiveMaskTextureFormat__MTL__PixelFormat((const void*)this, nullptr, reactiveMaskTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::specularHitDistanceTextureEnabled() const { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureFormat_ ), pixelFormat ); + return _MTLFX_msg_bool_specularHitDistanceTextureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isSpecularHitDistanceTextureEnabled() const +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularHitDistanceTextureEnabled(bool specularHitDistanceTextureEnabled) { - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isSpecularHitDistanceTextureEnabled ) ); + _MTLFX_msg_v_setSpecularHitDistanceTextureEnabled__bool((const void*)this, nullptr, specularHitDistanceTextureEnabled); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularHitDistanceTextureEnabled( bool enabled ) +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::denoiseStrengthMaskTextureEnabled() const { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularHitDistanceTextureEnabled_ ), enabled ); + return _MTLFX_msg_bool_denoiseStrengthMaskTextureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isDenoiseStrengthMaskTextureEnabled() const +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDenoiseStrengthMaskTextureEnabled(bool denoiseStrengthMaskTextureEnabled) { - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDenoiseStrengthMaskTextureEnabled ) ); + _MTLFX_msg_v_setDenoiseStrengthMaskTextureEnabled__bool((const void*)this, nullptr, denoiseStrengthMaskTextureEnabled); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDenoiseStrengthMaskTextureEnabled( bool enabled ) +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::transparencyOverlayTextureEnabled() const { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDenoiseStrengthMaskTextureEnabled_ ), enabled ); + return _MTLFX_msg_bool_transparencyOverlayTextureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isTransparencyOverlayTextureEnabled() const +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setTransparencyOverlayTextureEnabled(bool transparencyOverlayTextureEnabled) { - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isTransparencyOverlayTextureEnabled ) ); + _MTLFX_msg_v_setTransparencyOverlayTextureEnabled__bool((const void*)this, nullptr, transparencyOverlayTextureEnabled); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setTransparencyOverlayTextureEnabled( bool enabled ) +_MTLFX_INLINE MTLFX::TemporalDenoisedScaler* MTLFX::TemporalDenoisedScalerDescriptor::newTemporalDenoisedScaler(MTL::Device* device) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setTransparencyOverlayTextureEnabled_ ), enabled ); + return _MTLFX_msg_MTLFX__TemporalDenoisedScalerp_newTemporalDenoisedScalerWithDevice__MTL__Devicep((const void*)this, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTLFX::TemporalDenoisedScaler* MTLFX::TemporalDenoisedScalerDescriptor::newTemporalDenoisedScaler( const MTL::Device* device ) const +_MTLFX_INLINE MTL4FX::TemporalDenoisedScaler* MTLFX::TemporalDenoisedScalerDescriptor::newTemporalDenoisedScaler(MTL::Device* device, MTL4::Compiler* compiler) { - return NS::Object::sendMessage< TemporalDenoisedScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalDenoisedScalerWithDevice_ ), device ); + return _MTLFX_msg_MTL4FX__TemporalDenoisedScalerp_newTemporalDenoisedScalerWithDevice_compiler__MTL__Devicep_MTL4__Compilerp((const void*)this, nullptr, device, compiler); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTL4FX::TemporalDenoisedScaler* MTLFX::TemporalDenoisedScalerDescriptor::newTemporalDenoisedScaler( const MTL::Device* device, const MTL4::Compiler* compiler ) const +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isAutoExposureEnabled() { - return NS::Object::sendMessage< MTL4FX::TemporalDenoisedScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalDenoisedScalerWithDevice_compiler_ ), device, compiler ); + return _MTLFX_msg_bool_isAutoExposureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::supportedInputContentMinScale( MTL::Device* pDevice ) +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isReactiveMaskTextureEnabled() { - float scale = 1.0f; - - if ( nullptr != methodSignatureForSelector( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ) ) ) - { - scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ), pDevice ); - } - - return scale; + return _MTLFX_msg_bool_isReactiveMaskTextureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::supportedInputContentMaxScale( MTL::Device* pDevice ) +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isSpecularHitDistanceTextureEnabled() { - float scale = 1.0f; - - if ( nullptr != methodSignatureForSelector( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ) ) ) - { - scale = sendMessage< float >( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ), pDevice ); - } - else if ( supportsDevice( pDevice ) ) - { - scale = 2.0f; - } - - return scale; + return _MTLFX_msg_bool_isSpecularHitDistanceTextureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::supportsMetal4FX( MTL::Device* device ) +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isDenoiseStrengthMaskTextureEnabled() { - return NS::Object::sendMessageSafe< bool >( _MTLFX_PRIVATE_CLS(MTLFXTemporalDenoisedScalerDescriptor), _MTLFX_PRIVATE_SEL( supportsMetal4FX_ ), device ); + return _MTLFX_msg_bool_isDenoiseStrengthMaskTextureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::supportsDevice( MTL::Device* device ) +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isTransparencyOverlayTextureEnabled() { - return NS::Object::sendMessageSafe< bool >( _MTLFX_PRIVATE_CLS(MTLFXTemporalDenoisedScalerDescriptor), _MTLFX_PRIVATE_SEL( supportsDevice_ ), device ); + return _MTLFX_msg_bool_isTransparencyOverlayTextureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::colorTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_colorTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::depthTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( depthTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_depthTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::motionTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( motionTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_motionTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::reactiveTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( reactiveTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_reactiveTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::diffuseAlbedoTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_diffuseAlbedoTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::specularAlbedoTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_specularAlbedoTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::normalTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( normalTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_normalTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::roughnessTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( roughnessTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_roughnessTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::specularHitDistanceTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_specularHitDistanceTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::denoiseStrengthMaskTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_denoiseStrengthMaskTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::transparencyOverlayTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_transparencyOverlayTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::outputTextureUsage() const { - return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_outputTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::colorTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) ); + return _MTLFX_msg_MTL__Texturep_colorTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setColorTexture( MTL::Texture* colorTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setColorTexture(MTL::Texture* colorTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTexture_ ), colorTexture ); + _MTLFX_msg_v_setColorTexture__MTL__Texturep((const void*)this, nullptr, colorTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::depthTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( depthTexture ) ); + return _MTLFX_msg_MTL__Texturep_depthTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDepthTexture( MTL::Texture* depthTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDepthTexture(MTL::Texture* depthTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTexture_ ), depthTexture ); + _MTLFX_msg_v_setDepthTexture__MTL__Texturep((const void*)this, nullptr, depthTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::motionTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( motionTexture ) ); + return _MTLFX_msg_MTL__Texturep_motionTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionTexture( MTL::Texture* motionTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionTexture(MTL::Texture* motionTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTexture_ ), motionTexture ); + _MTLFX_msg_v_setMotionTexture__MTL__Texturep((const void*)this, nullptr, motionTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::diffuseAlbedoTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTexture ) ); + return _MTLFX_msg_MTL__Texturep_diffuseAlbedoTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDiffuseAlbedoTexture( MTL::Texture* diffuseAlbedoTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDiffuseAlbedoTexture(MTL::Texture* diffuseAlbedoTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDiffuseAlbedoTexture_ ), diffuseAlbedoTexture ); + _MTLFX_msg_v_setDiffuseAlbedoTexture__MTL__Texturep((const void*)this, nullptr, diffuseAlbedoTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::specularAlbedoTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTexture ) ); + return _MTLFX_msg_MTL__Texturep_specularAlbedoTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setSpecularAlbedoTexture( MTL::Texture* specularAlbedoTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setSpecularAlbedoTexture(MTL::Texture* specularAlbedoTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularAlbedoTexture_ ), specularAlbedoTexture ); + _MTLFX_msg_v_setSpecularAlbedoTexture__MTL__Texturep((const void*)this, nullptr, specularAlbedoTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::normalTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( normalTexture ) ); + return _MTLFX_msg_MTL__Texturep_normalTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setNormalTexture( MTL::Texture* normalTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setNormalTexture(MTL::Texture* normalTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setNormalTexture_ ), normalTexture ); + _MTLFX_msg_v_setNormalTexture__MTL__Texturep((const void*)this, nullptr, normalTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::roughnessTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( roughnessTexture ) ); + return _MTLFX_msg_MTL__Texturep_roughnessTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setRoughnessTexture( MTL::Texture* roughnessTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setRoughnessTexture(MTL::Texture* roughnessTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRoughnessTexture_ ), roughnessTexture ); + _MTLFX_msg_v_setRoughnessTexture__MTL__Texturep((const void*)this, nullptr, roughnessTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::specularHitDistanceTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTexture ) ); + return _MTLFX_msg_MTL__Texturep_specularHitDistanceTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setSpecularHitDistanceTexture( MTL::Texture* specularHitDistanceTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setSpecularHitDistanceTexture(MTL::Texture* specularHitDistanceTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularHitDistanceTexture_ ), specularHitDistanceTexture ); + _MTLFX_msg_v_setSpecularHitDistanceTexture__MTL__Texturep((const void*)this, nullptr, specularHitDistanceTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::denoiseStrengthMaskTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTexture ) ); + return _MTLFX_msg_MTL__Texturep_denoiseStrengthMaskTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDenoiseStrengthMaskTexture( MTL::Texture* denoiseStrengthMaskTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDenoiseStrengthMaskTexture(MTL::Texture* denoiseStrengthMaskTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDenoiseStrengthMaskTexture_ ), denoiseStrengthMaskTexture ); + _MTLFX_msg_v_setDenoiseStrengthMaskTexture__MTL__Texturep((const void*)this, nullptr, denoiseStrengthMaskTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::transparencyOverlayTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTexture ) ); + return _MTLFX_msg_MTL__Texturep_transparencyOverlayTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setTransparencyOverlayTexture( MTL::Texture* transparencyOverlayTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setTransparencyOverlayTexture(MTL::Texture* transparencyOverlayTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setTransparencyOverlayTexture_ ), transparencyOverlayTexture ); + _MTLFX_msg_v_setTransparencyOverlayTexture__MTL__Texturep((const void*)this, nullptr, transparencyOverlayTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::outputTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) ); + return _MTLFX_msg_MTL__Texturep_outputTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setOutputTexture( MTL::Texture* outputTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setOutputTexture(MTL::Texture* outputTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTexture_ ), outputTexture ); + _MTLFX_msg_v_setOutputTexture__MTL__Texturep((const void*)this, nullptr, outputTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::exposureTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( exposureTexture ) ); + return _MTLFX_msg_MTL__Texturep_exposureTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setExposureTexture( MTL::Texture* exposureTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setExposureTexture(MTL::Texture* exposureTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setExposureTexture_ ), exposureTexture ); + _MTLFX_msg_v_setExposureTexture__MTL__Texturep((const void*)this, nullptr, exposureTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::preExposure() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( preExposure ) ); + return _MTLFX_msg_float_preExposure((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setPreExposure( float preExposure ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setPreExposure(float preExposure) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setPreExposure_ ), preExposure ); + _MTLFX_msg_v_setPreExposure__float((const void*)this, nullptr, preExposure); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::reactiveMaskTexture() const { - return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTexture ) ); + return _MTLFX_msg_MTL__Texturep_reactiveMaskTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setReactiveMaskTexture(MTL::Texture* reactiveMaskTexture) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTexture_ ), reactiveMaskTexture ); + _MTLFX_msg_v_setReactiveMaskTexture__MTL__Texturep((const void*)this, nullptr, reactiveMaskTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::jitterOffsetX() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetX ) ); + return _MTLFX_msg_float_jitterOffsetX((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setJitterOffsetX( float jitterOffsetX ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setJitterOffsetX(float jitterOffsetX) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetX_ ), jitterOffsetX ); + _MTLFX_msg_v_setJitterOffsetX__float((const void*)this, nullptr, jitterOffsetX); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::jitterOffsetY() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetY ) ); + return _MTLFX_msg_float_jitterOffsetY((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setJitterOffsetY( float jitterOffsetY ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setJitterOffsetY(float jitterOffsetY) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetY_ ), jitterOffsetY ); + _MTLFX_msg_v_setJitterOffsetY__float((const void*)this, nullptr, jitterOffsetY); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::motionVectorScaleX() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleX ) ); + return _MTLFX_msg_float_motionVectorScaleX((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionVectorScaleX( float motionVectorScaleX ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionVectorScaleX(float motionVectorScaleX) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleX_ ), motionVectorScaleX ); + _MTLFX_msg_v_setMotionVectorScaleX__float((const void*)this, nullptr, motionVectorScaleX); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::motionVectorScaleY() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleY ) ); + return _MTLFX_msg_float_motionVectorScaleY((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionVectorScaleY( float motionVectorScaleY ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionVectorScaleY(float motionVectorScaleY) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleY_ ), motionVectorScaleY ); + _MTLFX_msg_v_setMotionVectorScaleY__float((const void*)this, nullptr, motionVectorScaleY); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerBase::shouldResetHistory() const { - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( shouldResetHistory ) ); + return _MTLFX_msg_bool_shouldResetHistory((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setShouldResetHistory( bool shouldResetHistory ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setShouldResetHistory(bool shouldResetHistory) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setShouldResetHistory_ ), shouldResetHistory ); + _MTLFX_msg_v_setShouldResetHistory__bool((const void*)this, nullptr, shouldResetHistory); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerBase::isDepthReversed() const +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerBase::depthReversed() const { - return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDepthReversed ) ); + return _MTLFX_msg_bool_depthReversed((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDepthReversed( bool depthReversed ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDepthReversed(bool depthReversed) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthReversed_ ), depthReversed ); + _MTLFX_msg_v_setDepthReversed__bool((const void*)this, nullptr, depthReversed); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::colorTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_colorTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::depthTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_depthTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::motionTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_motionTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::diffuseAlbedoTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_diffuseAlbedoTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::specularAlbedoTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_specularAlbedoTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::normalTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( normalTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_normalTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::roughnessTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( roughnessTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_roughnessTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::specularHitDistanceTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_specularHitDistanceTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::denoiseStrengthMaskTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_denoiseStrengthMaskTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::transparencyOverlayTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_transparencyOverlayTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::reactiveMaskTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_reactiveMaskTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::outputTextureFormat() const { - return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_outputTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::inputWidth() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); + return _MTLFX_msg_NS__UInteger_inputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::inputHeight() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); + return _MTLFX_msg_NS__UInteger_inputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::outputWidth() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); + return _MTLFX_msg_NS__UInteger_outputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::outputHeight() const { - return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); + return _MTLFX_msg_NS__UInteger_outputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::inputContentMinScale() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) ); + return _MTLFX_msg_float_inputContentMinScale((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::inputContentMaxScale() const { - return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) ); + return _MTLFX_msg_float_inputContentMaxScale((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE simd::float4x4 MTLFX::TemporalDenoisedScalerBase::worldToViewMatrix() const +_MTLFX_INLINE void* MTLFX::TemporalDenoisedScalerBase::worldToViewMatrix() const { - return NS::Object::sendMessage< simd::float4x4 >( this, _MTLFX_PRIVATE_SEL( worldToViewMatrix ) ); + return _MTLFX_msg_voidp_worldToViewMatrix((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setWorldToViewMatrix( simd::float4x4 worldToViewMatrix ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setWorldToViewMatrix(void* worldToViewMatrix) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setWorldToViewMatrix_ ), worldToViewMatrix ); + _MTLFX_msg_v_setWorldToViewMatrix__voidp((const void*)this, nullptr, worldToViewMatrix); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE simd::float4x4 MTLFX::TemporalDenoisedScalerBase::viewToClipMatrix() const +_MTLFX_INLINE void* MTLFX::TemporalDenoisedScalerBase::viewToClipMatrix() const { - return NS::Object::sendMessage< simd::float4x4 >( this, _MTLFX_PRIVATE_SEL( viewToClipMatrix ) ); + return _MTLFX_msg_voidp_viewToClipMatrix((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setViewToClipMatrix( simd::float4x4 viewToClipMatrix ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setViewToClipMatrix(void* viewToClipMatrix) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setViewToClipMatrix_ ), viewToClipMatrix ); + _MTLFX_msg_v_setViewToClipMatrix__voidp((const void*)this, nullptr, viewToClipMatrix); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Fence* MTLFX::TemporalDenoisedScalerBase::fence() const { - return NS::Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) ); + return _MTLFX_msg_MTL__Fencep_fence((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setFence( MTL::Fence* fence ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setFence(MTL::Fence* fence) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFence_ ), fence ); + _MTLFX_msg_v_setFence__MTL__Fencep((const void*)this, nullptr, fence); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerBase::isDepthReversed() +{ + return _MTLFX_msg_bool_isDepthReversed((const void*)this, nullptr); +} -_MTLFX_INLINE void MTLFX::TemporalDenoisedScaler::encodeToCommandBuffer( MTL::CommandBuffer* commandBuffer ) +_MTLFX_INLINE void MTLFX::TemporalDenoisedScaler::encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer) { - return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), commandBuffer ); + _MTLFX_msg_v_encodeToCommandBuffer__MTL__CommandBufferp((const void*)this, nullptr, commandBuffer); } diff --git a/thirdparty/metal-cpp/MetalFX/MTLFXTemporalScaler.hpp b/thirdparty/metal-cpp/MetalFX/MTLFXTemporalScaler.hpp index c13d4242ab49..d7aa1c0aa323 100644 --- a/thirdparty/metal-cpp/MetalFX/MTLFXTemporalScaler.hpp +++ b/thirdparty/metal-cpp/MetalFX/MTLFXTemporalScaler.hpp @@ -1,803 +1,610 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// MetalFX/MTLFXTemporalScaler.hpp -// -// Copyright 2020-2025 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #include "MTLFXDefines.hpp" -#include "MTLFXPrivate.hpp" - -#include "../Metal/Metal.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace MTL4FX -{ +#include "MTLFXBridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" + +namespace MTL { + class CommandBuffer; + class Device; + class Fence; + class Texture; + enum PixelFormat : NS::UInteger; + using TextureUsage = NS::UInteger; +} +namespace MTL4 { + class Compiler; +} +namespace MTL4FX { class TemporalScaler; } namespace MTLFX { - class TemporalScalerDescriptor : public NS::Copying< TemporalScalerDescriptor > - { - public: - static class TemporalScalerDescriptor* alloc(); - class TemporalScalerDescriptor* init(); - - MTL::PixelFormat colorTextureFormat() const; - void setColorTextureFormat( MTL::PixelFormat format ); - - MTL::PixelFormat depthTextureFormat() const; - void setDepthTextureFormat( MTL::PixelFormat format ); - - MTL::PixelFormat motionTextureFormat() const; - void setMotionTextureFormat( MTL::PixelFormat format ); - - MTL::PixelFormat outputTextureFormat() const; - void setOutputTextureFormat( MTL::PixelFormat format ); - - NS::UInteger inputWidth() const; - void setInputWidth( NS::UInteger width ); - - NS::UInteger inputHeight() const; - void setInputHeight( NS::UInteger height ); - - NS::UInteger outputWidth() const; - void setOutputWidth( NS::UInteger width ); - - NS::UInteger outputHeight() const; - void setOutputHeight( NS::UInteger height ); - - bool isAutoExposureEnabled() const; - void setAutoExposureEnabled( bool enabled ); - - bool isInputContentPropertiesEnabled() const; - void setInputContentPropertiesEnabled( bool enabled ); - - bool requiresSynchronousInitialization() const; - void setRequiresSynchronousInitialization(bool requiresSynchronousInitialization); - - bool isReactiveMaskTextureEnabled() const; - void setReactiveMaskTextureEnabled( bool enabled ); - - MTL::PixelFormat reactiveMaskTextureFormat() const; - void setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat ); - - float inputContentMinScale() const; - void setInputContentMinScale( float scale ); - - float inputContentMaxScale() const; - void setInputContentMaxScale( float scale ); - - class TemporalScaler* newTemporalScaler( const MTL::Device* pDevice ) const; - MTL4FX::TemporalScaler* newTemporalScaler( const MTL::Device* pDevice, const MTL4::Compiler* pCompiler) const; - static float supportedInputContentMinScale( const MTL::Device* pDevice ); - static float supportedInputContentMaxScale( const MTL::Device* pDevice ); +class TemporalScalerDescriptor; +class FrameInterpolatableScaler; +class TemporalScalerBase; +class TemporalScaler; + +class TemporalScalerDescriptor : public NS::Copying +{ +public: + static TemporalScalerDescriptor* alloc(); + TemporalScalerDescriptor* init() const; + + static float supportedInputContentMaxScale(MTL::Device* device); + static float supportedInputContentMinScale(MTL::Device* device); + static bool supportsDevice(MTL::Device* device); + static bool supportsMetal4FX(MTL::Device* device); + + bool autoExposureEnabled() const; + MTL::PixelFormat colorTextureFormat() const; + MTL::PixelFormat depthTextureFormat() const; + float inputContentMaxScale() const; + float inputContentMinScale() const; + bool inputContentPropertiesEnabled() const; + NS::UInteger inputHeight() const; + NS::UInteger inputWidth() const; + bool isAutoExposureEnabled(); + bool isInputContentPropertiesEnabled(); + bool isReactiveMaskTextureEnabled(); + MTL::PixelFormat motionTextureFormat() const; + MTLFX::TemporalScaler* newTemporalScaler(MTL::Device* device); + MTL4FX::TemporalScaler* newTemporalScaler(MTL::Device* device, MTL4::Compiler* compiler); + NS::UInteger outputHeight() const; + MTL::PixelFormat outputTextureFormat() const; + NS::UInteger outputWidth() const; + bool reactiveMaskTextureEnabled() const; + MTL::PixelFormat reactiveMaskTextureFormat() const; + bool requiresSynchronousInitialization() const; + void setAutoExposureEnabled(bool autoExposureEnabled); + void setColorTextureFormat(MTL::PixelFormat colorTextureFormat); + void setDepthTextureFormat(MTL::PixelFormat depthTextureFormat); + void setInputContentMaxScale(float inputContentMaxScale); + void setInputContentMinScale(float inputContentMinScale); + void setInputContentPropertiesEnabled(bool inputContentPropertiesEnabled); + void setInputHeight(NS::UInteger inputHeight); + void setInputWidth(NS::UInteger inputWidth); + void setMotionTextureFormat(MTL::PixelFormat motionTextureFormat); + void setOutputHeight(NS::UInteger outputHeight); + void setOutputTextureFormat(MTL::PixelFormat outputTextureFormat); + void setOutputWidth(NS::UInteger outputWidth); + void setReactiveMaskTextureEnabled(bool reactiveMaskTextureEnabled); + void setReactiveMaskTextureFormat(MTL::PixelFormat reactiveMaskTextureFormat); + void setRequiresSynchronousInitialization(bool requiresSynchronousInitialization); + +}; + +class FrameInterpolatableScaler : public NS::Referencing +{ +public: +}; + +class TemporalScalerBase : public NS::Referencing +{ +public: + MTL::Texture* colorTexture() const; + MTL::PixelFormat colorTextureFormat() const; + MTL::TextureUsage colorTextureUsage() const; + bool depthReversed() const; + MTL::Texture* depthTexture() const; + MTL::PixelFormat depthTextureFormat() const; + MTL::TextureUsage depthTextureUsage() const; + MTL::Texture* exposureTexture() const; + MTL::Fence* fence() const; + NS::UInteger inputContentHeight() const; + float inputContentMaxScale() const; + float inputContentMinScale() const; + NS::UInteger inputContentWidth() const; + NS::UInteger inputHeight() const; + NS::UInteger inputWidth() const; + bool isDepthReversed(); + float jitterOffsetX() const; + float jitterOffsetY() const; + MTL::Texture* motionTexture() const; + MTL::PixelFormat motionTextureFormat() const; + MTL::TextureUsage motionTextureUsage() const; + float motionVectorScaleX() const; + float motionVectorScaleY() const; + NS::UInteger outputHeight() const; + MTL::Texture* outputTexture() const; + MTL::PixelFormat outputTextureFormat() const; + MTL::TextureUsage outputTextureUsage() const; + NS::UInteger outputWidth() const; + float preExposure() const; + MTL::Texture* reactiveMaskTexture() const; + MTL::PixelFormat reactiveMaskTextureFormat() const; + MTL::TextureUsage reactiveTextureUsage() const; + bool reset() const; + void setColorTexture(MTL::Texture* colorTexture); + void setDepthReversed(bool depthReversed); + void setDepthTexture(MTL::Texture* depthTexture); + void setExposureTexture(MTL::Texture* exposureTexture); + void setFence(MTL::Fence* fence); + void setInputContentHeight(NS::UInteger inputContentHeight); + void setInputContentWidth(NS::UInteger inputContentWidth); + void setJitterOffsetX(float jitterOffsetX); + void setJitterOffsetY(float jitterOffsetY); + void setMotionTexture(MTL::Texture* motionTexture); + void setMotionVectorScaleX(float motionVectorScaleX); + void setMotionVectorScaleY(float motionVectorScaleY); + void setOutputTexture(MTL::Texture* outputTexture); + void setPreExposure(float preExposure); + void setReactiveMaskTexture(MTL::Texture* reactiveMaskTexture); + void setReset(bool reset); + +}; + +class TemporalScaler : public NS::Referencing +{ +public: + void encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer); + +}; + +} // namespace MTLFX + +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_MTLFXTemporalScalerDescriptor; +extern "C" void *OBJC_CLASS_$_MTLFXFrameInterpolatableScaler; +extern "C" void *OBJC_CLASS_$_MTLFXTemporalScalerBase; +extern "C" void *OBJC_CLASS_$_MTLFXTemporalScaler; - static bool supportsDevice( const MTL::Device* pDevice ); - static bool supportsMetal4FX( const MTL::Device* pDevice ); - }; - - class FrameInterpolatableScaler : public NS::Copying< FrameInterpolatableScaler > - { - }; - - class TemporalScalerBase : public NS::Referencing< TemporalScaler, FrameInterpolatableScaler > - { - public: - MTL::TextureUsage colorTextureUsage() const; - MTL::TextureUsage depthTextureUsage() const; - MTL::TextureUsage motionTextureUsage() const; - MTL::TextureUsage outputTextureUsage() const; - - NS::UInteger inputContentWidth() const; - void setInputContentWidth( NS::UInteger width ); - - NS::UInteger inputContentHeight() const; - void setInputContentHeight( NS::UInteger height ); - - MTL::Texture* colorTexture() const; - void setColorTexture( MTL::Texture* pTexture ); - - MTL::Texture* depthTexture() const; - void setDepthTexture( MTL::Texture* pTexture ); - - MTL::Texture* motionTexture() const; - void setMotionTexture( MTL::Texture* pTexture ); - - MTL::Texture* outputTexture() const; - void setOutputTexture( MTL::Texture* pTexture ); - - MTL::Texture* exposureTexture() const; - void setExposureTexture( MTL::Texture* pTexture ); - - float preExposure() const; - void setPreExposure( float preExposure ); - - float jitterOffsetX() const; - void setJitterOffsetX( float offset ); - - float jitterOffsetY() const; - void setJitterOffsetY( float offset ); - - float motionVectorScaleX() const; - void setMotionVectorScaleX( float scale ); - - float motionVectorScaleY() const; - void setMotionVectorScaleY( float scale ); - - MTL::Texture* reactiveMaskTexture() const; - void setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture ); - - MTL::TextureUsage reactiveTextureUsage() const; - - bool reset() const; - void setReset( bool reset ); - - bool isDepthReversed() const; - void setDepthReversed( bool depthReversed ); - - MTL::PixelFormat colorTextureFormat() const; - MTL::PixelFormat depthTextureFormat() const; - MTL::PixelFormat motionTextureFormat() const; - MTL::PixelFormat reactiveTextureFormat() const; - MTL::PixelFormat outputTextureFormat() const; - NS::UInteger inputWidth() const; - NS::UInteger inputHeight() const; - NS::UInteger outputWidth() const; - NS::UInteger outputHeight() const; - float inputContentMinScale() const; - float inputContentMaxScale() const; - - MTL::Fence* fence() const; - void setFence( MTL::Fence* pFence ); - }; - - class TemporalScaler : public NS::Referencing< TemporalScaler, TemporalScalerBase > - { - public: - void encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ); - }; +_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::alloc() +{ + return _MTLFX_msg_MTLFX__TemporalScalerDescriptorp_alloc((const void*)&OBJC_CLASS_$_MTLFXTemporalScalerDescriptor, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::init() const +{ + return _MTLFX_msg_MTLFX__TemporalScalerDescriptorp_init((const void*)this, nullptr); +} -_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::alloc() +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMinScale(MTL::Device* device) { - return NS::Object::alloc< TemporalScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ) ); + return _MTLFX_msg_float_supportedInputContentMinScaleForDevice__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXTemporalScalerDescriptor, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMaxScale(MTL::Device* device) +{ + return _MTLFX_msg_float_supportedInputContentMaxScaleForDevice__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXTemporalScalerDescriptor, nullptr, device); +} -_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::init() +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::supportsDevice(MTL::Device* device) { - return NS::Object::init< TemporalScalerDescriptor >(); + return _MTLFX_msg_bool_supportsDevice__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXTemporalScalerDescriptor, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::supportsMetal4FX(MTL::Device* device) +{ + return _MTLFX_msg_bool_supportsMetal4FX__MTL__Devicep((const void*)&OBJC_CLASS_$_MTLFXTemporalScalerDescriptor, nullptr, device); +} _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::colorTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_colorTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setColorTextureFormat( MTL::PixelFormat format ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setColorTextureFormat(MTL::PixelFormat colorTextureFormat) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTextureFormat_ ), format ); + _MTLFX_msg_v_setColorTextureFormat__MTL__PixelFormat((const void*)this, nullptr, colorTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::depthTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_depthTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setDepthTextureFormat( MTL::PixelFormat format ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setDepthTextureFormat(MTL::PixelFormat depthTextureFormat) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTextureFormat_ ), format ); + _MTLFX_msg_v_setDepthTextureFormat__MTL__PixelFormat((const void*)this, nullptr, depthTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::motionTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_motionTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setMotionTextureFormat( MTL::PixelFormat format ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setMotionTextureFormat(MTL::PixelFormat motionTextureFormat) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTextureFormat_ ), format ); + _MTLFX_msg_v_setMotionTextureFormat__MTL__PixelFormat((const void*)this, nullptr, motionTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::outputTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_outputTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat format ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputTextureFormat(MTL::PixelFormat outputTextureFormat) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTextureFormat_ ), format ); + _MTLFX_msg_v_setOutputTextureFormat__MTL__PixelFormat((const void*)this, nullptr, outputTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::inputWidth() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); + return _MTLFX_msg_NS__UInteger_inputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputWidth( NS::UInteger width ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputWidth(NS::UInteger inputWidth) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputWidth_ ), width ); + _MTLFX_msg_v_setInputWidth__NS__UInteger((const void*)this, nullptr, inputWidth); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::inputHeight() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); + return _MTLFX_msg_NS__UInteger_inputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputHeight( NS::UInteger height ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputHeight(NS::UInteger inputHeight) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputHeight_ ), height ); + _MTLFX_msg_v_setInputHeight__NS__UInteger((const void*)this, nullptr, inputHeight); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::outputWidth() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); + return _MTLFX_msg_NS__UInteger_outputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputWidth( NS::UInteger width ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputWidth(NS::UInteger outputWidth) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputWidth_ ), width ); + _MTLFX_msg_v_setOutputWidth__NS__UInteger((const void*)this, nullptr, outputWidth); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::outputHeight() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); + return _MTLFX_msg_NS__UInteger_outputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputHeight( NS::UInteger height ) -{ - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputHeight_ ), height ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isAutoExposureEnabled() const +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputHeight(NS::UInteger outputHeight) { - return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isAutoExposureEnabled ) ); + _MTLFX_msg_v_setOutputHeight__NS__UInteger((const void*)this, nullptr, outputHeight); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setAutoExposureEnabled( bool enabled ) +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::autoExposureEnabled() const { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setAutoExposureEnabled_ ), enabled ); + return _MTLFX_msg_bool_autoExposureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isInputContentPropertiesEnabled() const -{ - return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isInputContentPropertiesEnabled ) ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentPropertiesEnabled( bool enabled ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setAutoExposureEnabled(bool autoExposureEnabled) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentPropertiesEnabled_ ), enabled ); + _MTLFX_msg_v_setAutoExposureEnabled__bool((const void*)this, nullptr, autoExposureEnabled); } - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::requiresSynchronousInitialization() const { - return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( requiresSynchronousInitialization ) ); + return _MTLFX_msg_bool_requiresSynchronousInitialization((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setRequiresSynchronousInitialization(bool requiresSynchronousInitialization) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRequiresSynchronousInitialization_ ), requiresSynchronousInitialization ); + _MTLFX_msg_v_setRequiresSynchronousInitialization__bool((const void*)this, nullptr, requiresSynchronousInitialization); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isReactiveMaskTextureEnabled() const +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::inputContentPropertiesEnabled() const { - return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isReactiveMaskTextureEnabled ) ); + return _MTLFX_msg_bool_inputContentPropertiesEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setReactiveMaskTextureEnabled( bool enabled ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentPropertiesEnabled(bool inputContentPropertiesEnabled) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureEnabled_ ), enabled ); + _MTLFX_msg_v_setInputContentPropertiesEnabled__bool((const void*)this, nullptr, inputContentPropertiesEnabled); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::reactiveMaskTextureFormat() const +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMinScale() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTextureFormat ) ); + return _MTLFX_msg_float_inputContentMinScale((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMinScale(float inputContentMinScale) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureFormat_ ), pixelFormat ); + _MTLFX_msg_v_setInputContentMinScale__float((const void*)this, nullptr, inputContentMinScale); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMinScale() const +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMaxScale() const { - return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) ); + return _MTLFX_msg_float_inputContentMaxScale((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMinScale( float scale ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMaxScale(float inputContentMaxScale) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMinScale_ ), scale ); + _MTLFX_msg_v_setInputContentMaxScale__float((const void*)this, nullptr, inputContentMaxScale); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMaxScale() const +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::reactiveMaskTextureEnabled() const { - return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) ); + return _MTLFX_msg_bool_reactiveMaskTextureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMaxScale( float scale ) +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setReactiveMaskTextureEnabled(bool reactiveMaskTextureEnabled) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMaxScale_ ), scale ); + _MTLFX_msg_v_setReactiveMaskTextureEnabled__bool((const void*)this, nullptr, reactiveMaskTextureEnabled); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTLFX::TemporalScaler* MTLFX::TemporalScalerDescriptor::newTemporalScaler( const MTL::Device* pDevice ) const +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::reactiveMaskTextureFormat() const { - return Object::sendMessage< TemporalScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalScalerWithDevice_ ), pDevice ); + return _MTLFX_msg_MTL__PixelFormat_reactiveMaskTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTL4FX::TemporalScaler* MTLFX::TemporalScalerDescriptor::newTemporalScaler( const MTL::Device* pDevice, const MTL4::Compiler* pCompiler ) const +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setReactiveMaskTextureFormat(MTL::PixelFormat reactiveMaskTextureFormat) { - return Object::sendMessage< MTL4FX::TemporalScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalScalerWithDevice_compiler_ ), pDevice, pCompiler ); + _MTLFX_msg_v_setReactiveMaskTextureFormat__MTL__PixelFormat((const void*)this, nullptr, reactiveMaskTextureFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMinScale( const MTL::Device* pDevice ) +_MTLFX_INLINE MTLFX::TemporalScaler* MTLFX::TemporalScalerDescriptor::newTemporalScaler(MTL::Device* device) { - float scale = 1.0f; - - if ( nullptr != methodSignatureForSelector( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ) ) ) - { - scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ), pDevice ); - } - - return scale; + return _MTLFX_msg_MTLFX__TemporalScalerp_newTemporalScalerWithDevice__MTL__Devicep((const void*)this, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMaxScale( const MTL::Device* pDevice ) +_MTLFX_INLINE MTL4FX::TemporalScaler* MTLFX::TemporalScalerDescriptor::newTemporalScaler(MTL::Device* device, MTL4::Compiler* compiler) { - float scale = 1.0f; - - if ( nullptr != methodSignatureForSelector( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ) ) ) - { - scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ), pDevice ); - } - else if ( supportsDevice( pDevice ) ) - { - scale = 2.0f; - } - - return scale; + return _MTLFX_msg_MTL4FX__TemporalScalerp_newTemporalScalerWithDevice_compiler__MTL__Devicep_MTL4__Compilerp((const void*)this, nullptr, device, compiler); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::supportsDevice( const MTL::Device* pDevice ) +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isAutoExposureEnabled() { - return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsDevice_ ), pDevice ); + return _MTLFX_msg_bool_isAutoExposureEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::supportsMetal4FX( const MTL::Device* pDevice ) +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isInputContentPropertiesEnabled() { - return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsMetal4FX_ ), pDevice ); + return _MTLFX_msg_bool_isInputContentPropertiesEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isReactiveMaskTextureEnabled() +{ + return _MTLFX_msg_bool_isReactiveMaskTextureEnabled((const void*)this, nullptr); +} _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::colorTextureUsage() const { - return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_colorTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::depthTextureUsage() const { - return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( depthTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_depthTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::motionTextureUsage() const { - return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( motionTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_motionTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::reactiveTextureUsage() const +{ + return _MTLFX_msg_MTL__TextureUsage_reactiveTextureUsage((const void*)this, nullptr); +} _MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::outputTextureUsage() const { - return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) ); + return _MTLFX_msg_MTL__TextureUsage_outputTextureUsage((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputContentWidth() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentWidth ) ); + return _MTLFX_msg_NS__UInteger_inputContentWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setInputContentWidth( NS::UInteger width ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setInputContentWidth(NS::UInteger inputContentWidth) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentWidth_ ), width ); + _MTLFX_msg_v_setInputContentWidth__NS__UInteger((const void*)this, nullptr, inputContentWidth); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputContentHeight() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentHeight ) ); + return _MTLFX_msg_NS__UInteger_inputContentHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setInputContentHeight( NS::UInteger height ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setInputContentHeight(NS::UInteger inputContentHeight) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentHeight_ ), height ); + _MTLFX_msg_v_setInputContentHeight__NS__UInteger((const void*)this, nullptr, inputContentHeight); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::colorTexture() const { - return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) ); + return _MTLFX_msg_MTL__Texturep_colorTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setColorTexture( MTL::Texture* pTexture ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setColorTexture(MTL::Texture* colorTexture) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTexture_ ), pTexture ); + _MTLFX_msg_v_setColorTexture__MTL__Texturep((const void*)this, nullptr, colorTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::depthTexture() const { - return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( depthTexture ) ); + return _MTLFX_msg_MTL__Texturep_depthTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setDepthTexture( MTL::Texture* pTexture ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setDepthTexture(MTL::Texture* depthTexture) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTexture_ ), pTexture ); + _MTLFX_msg_v_setDepthTexture__MTL__Texturep((const void*)this, nullptr, depthTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::motionTexture() const { - return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( motionTexture ) ); + return _MTLFX_msg_MTL__Texturep_motionTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionTexture( MTL::Texture* pTexture ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionTexture(MTL::Texture* motionTexture) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTexture_ ), pTexture ); + _MTLFX_msg_v_setMotionTexture__MTL__Texturep((const void*)this, nullptr, motionTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::outputTexture() const { - return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) ); + return _MTLFX_msg_MTL__Texturep_outputTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setOutputTexture( MTL::Texture* pTexture ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setOutputTexture(MTL::Texture* outputTexture) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTexture_ ), pTexture ); + _MTLFX_msg_v_setOutputTexture__MTL__Texturep((const void*)this, nullptr, outputTexture); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::exposureTexture() const { - return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( exposureTexture ) ); + return _MTLFX_msg_MTL__Texturep_exposureTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setExposureTexture(MTL::Texture* exposureTexture) +{ + _MTLFX_msg_v_setExposureTexture__MTL__Texturep((const void*)this, nullptr, exposureTexture); +} -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setExposureTexture( MTL::Texture* pTexture ) +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::reactiveMaskTexture() const { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setExposureTexture_ ), pTexture ); + return _MTLFX_msg_MTL__Texturep_reactiveMaskTexture((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setReactiveMaskTexture(MTL::Texture* reactiveMaskTexture) +{ + _MTLFX_msg_v_setReactiveMaskTexture__MTL__Texturep((const void*)this, nullptr, reactiveMaskTexture); +} _MTLFX_INLINE float MTLFX::TemporalScalerBase::preExposure() const { - return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( preExposure ) ); + return _MTLFX_msg_float_preExposure((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setPreExposure( float preExposure ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setPreExposure(float preExposure) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setPreExposure_ ), preExposure ); + _MTLFX_msg_v_setPreExposure__float((const void*)this, nullptr, preExposure); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalScalerBase::jitterOffsetX() const { - return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetX ) ); + return _MTLFX_msg_float_jitterOffsetX((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setJitterOffsetX( float offset ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setJitterOffsetX(float jitterOffsetX) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetX_ ), offset ); + _MTLFX_msg_v_setJitterOffsetX__float((const void*)this, nullptr, jitterOffsetX); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalScalerBase::jitterOffsetY() const { - return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetY ) ); + return _MTLFX_msg_float_jitterOffsetY((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setJitterOffsetY( float offset ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setJitterOffsetY(float jitterOffsetY) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetY_ ), offset ); + _MTLFX_msg_v_setJitterOffsetY__float((const void*)this, nullptr, jitterOffsetY); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalScalerBase::motionVectorScaleX() const { - return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleX ) ); + return _MTLFX_msg_float_motionVectorScaleX((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionVectorScaleX( float scale ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionVectorScaleX(float motionVectorScaleX) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleX_ ), scale ); + _MTLFX_msg_v_setMotionVectorScaleX__float((const void*)this, nullptr, motionVectorScaleX); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalScalerBase::motionVectorScaleY() const { - return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleY ) ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionVectorScaleY( float scale ) -{ - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleY_ ), scale ); + return _MTLFX_msg_float_motionVectorScaleY((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::reactiveMaskTexture() const -{ - return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTexture ) ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture ) -{ - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTexture_ ), reactiveMaskTexture ); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::reactiveTextureUsage() const +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionVectorScaleY(float motionVectorScaleY) { - return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( reactiveTextureUsage ) ); + _MTLFX_msg_v_setMotionVectorScaleY__float((const void*)this, nullptr, motionVectorScaleY); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE bool MTLFX::TemporalScalerBase::reset() const { - return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( reset ) ); + return _MTLFX_msg_bool_reset((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setReset( bool reset ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setReset(bool reset) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReset_ ), reset ); + _MTLFX_msg_v_setReset__bool((const void*)this, nullptr, reset); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE bool MTLFX::TemporalScalerBase::isDepthReversed() const +_MTLFX_INLINE bool MTLFX::TemporalScalerBase::depthReversed() const { - return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDepthReversed ) ); + return _MTLFX_msg_bool_depthReversed((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setDepthReversed( bool depthReversed ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setDepthReversed(bool depthReversed) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthReversed_ ), depthReversed ); + _MTLFX_msg_v_setDepthReversed__bool((const void*)this, nullptr, depthReversed); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::colorTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_colorTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::depthTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_depthTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::motionTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_motionTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::reactiveMaskTextureFormat() const +{ + return _MTLFX_msg_MTL__PixelFormat_reactiveMaskTextureFormat((const void*)this, nullptr); +} _MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::outputTextureFormat() const { - return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); + return _MTLFX_msg_MTL__PixelFormat_outputTextureFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputWidth() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); + return _MTLFX_msg_NS__UInteger_inputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputHeight() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); + return _MTLFX_msg_NS__UInteger_inputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::outputWidth() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); + return _MTLFX_msg_NS__UInteger_outputWidth((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::outputHeight() const { - return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); + return _MTLFX_msg_NS__UInteger_outputHeight((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalScalerBase::inputContentMinScale() const { - return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) ); + return _MTLFX_msg_float_inputContentMinScale((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE float MTLFX::TemporalScalerBase::inputContentMaxScale() const { - return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) ); + return _MTLFX_msg_float_inputContentMaxScale((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _MTLFX_INLINE MTL::Fence* MTLFX::TemporalScalerBase::fence() const { - return Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) ); + return _MTLFX_msg_MTL__Fencep_fence((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScalerBase::setFence( MTL::Fence* pFence ) +_MTLFX_INLINE void MTLFX::TemporalScalerBase::setFence(MTL::Fence* fence) { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFence_ ), pFence ); + _MTLFX_msg_v_setFence__MTL__Fencep((const void*)this, nullptr, fence); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_MTLFX_INLINE void MTLFX::TemporalScaler::encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ) +_MTLFX_INLINE bool MTLFX::TemporalScalerBase::isDepthReversed() { - Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), pCommandBuffer ); + return _MTLFX_msg_bool_isDepthReversed((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_MTLFX_INLINE void MTLFX::TemporalScaler::encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer) +{ + _MTLFX_msg_v_encodeToCommandBuffer__MTL__CommandBufferp((const void*)this, nullptr, commandBuffer); +} diff --git a/thirdparty/metal-cpp/MetalFX/Metal4FX.hpp b/thirdparty/metal-cpp/MetalFX/Metal4FX.hpp new file mode 100644 index 000000000000..37ee63f49e96 --- /dev/null +++ b/thirdparty/metal-cpp/MetalFX/Metal4FX.hpp @@ -0,0 +1,7 @@ +#pragma once + +#include "MTL4FXDefines.hpp" +#include "MTL4FXFrameInterpolator.hpp" +#include "MTL4FXSpatialScaler.hpp" +#include "MTL4FXTemporalDenoisedScaler.hpp" +#include "MTL4FXTemporalScaler.hpp" diff --git a/thirdparty/metal-cpp/MetalFX/MetalFX.hpp b/thirdparty/metal-cpp/MetalFX/MetalFX.hpp index 20e647e840de..52ca0cfeeef0 100644 --- a/thirdparty/metal-cpp/MetalFX/MetalFX.hpp +++ b/thirdparty/metal-cpp/MetalFX/MetalFX.hpp @@ -1,35 +1,9 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// MetalFX/MetalFX.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - +#include "MTLFXDefines.hpp" +#include "MTLFXDefines.hpp" +#include "MTLFXFrameInterpolator.hpp" #include "MTLFXSpatialScaler.hpp" -#include "MTLFXTemporalScaler.hpp" #include "MTLFXTemporalDenoisedScaler.hpp" -#include "MTLFXFrameInterpolator.hpp" - -#include "MTL4FXSpatialScaler.hpp" -#include "MTL4FXTemporalScaler.hpp" -#include "MTL4FXTemporalDenoisedScaler.hpp" -#include "MTL4FXFrameInterpolator.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +#include "MTLFXTemporalScaler.hpp" +#include "Metal4FX.hpp" diff --git a/thirdparty/metal-cpp/QuartzCore/CABridge.hpp b/thirdparty/metal-cpp/QuartzCore/CABridge.hpp new file mode 100644 index 000000000000..28cc5af47ad0 --- /dev/null +++ b/thirdparty/metal-cpp/QuartzCore/CABridge.hpp @@ -0,0 +1,69 @@ +#pragma once + +// Consolidated extern "C" trampoline decls for this framework. +// One entry per (return, args, selector) — identical C++ signatures +// across multiple classes collapse to a single linker alias of +// `_objc_msgSend$`. Per-class headers include this file +// instead of declaring their own externs. + +#include "CADefines.hpp" +#include +#include "../Foundation/NSTypes.hpp" +#include "CAStructs.hpp" +#include + +namespace CA { + class Layer; + class MetalDrawable; + class MetalLayer; +} +namespace MTL { + class Device; + class ResidencySet; + class Texture; + enum PixelFormat : NS::UInteger; +} +namespace NS { + class String; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +#pragma clang diagnostic ignored "-Wunguarded-availability-new" + +extern "C" { +CA::Layer* _CA_msg_CA__Layerp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +CA::MetalLayer* _CA_msg_CA__MetalLayerp_alloc(const void*, SEL) __asm__("_objc_msgSend$" "alloc"); +bool _CA_msg_bool_allowsNextDrawableTimeout(const void*, SEL) __asm__("_objc_msgSend$" "allowsNextDrawableTimeout"); +CGColorSpaceRef _CA_msg_CGColorSpaceRef_colorspace(const void*, SEL) __asm__("_objc_msgSend$" "colorspace"); +CGFloat _CA_msg_CGFloat_contentsHeadroom(const void*, SEL) __asm__("_objc_msgSend$" "contentsHeadroom"); +MTL::Device* _CA_msg_MTL__Devicep_device(const void*, SEL) __asm__("_objc_msgSend$" "device"); +bool _CA_msg_bool_displaySyncEnabled(const void*, SEL) __asm__("_objc_msgSend$" "displaySyncEnabled"); +CGSize _CA_msg_CGSize_drawableSize(const void*, SEL) __asm__("_objc_msgSend$" "drawableSize"); +bool _CA_msg_bool_framebufferOnly(const void*, SEL) __asm__("_objc_msgSend$" "framebufferOnly"); +CA::Layer* _CA_msg_CA__Layerp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +CA::MetalLayer* _CA_msg_CA__MetalLayerp_init(const void*, SEL) __asm__("_objc_msgSend$" "init"); +CA::MetalLayer* _CA_msg_CA__MetalLayerp_layer(const void*, SEL) __asm__("_objc_msgSend$" "layer"); +NS::UInteger _CA_msg_NS__UInteger_maximumDrawableCount(const void*, SEL) __asm__("_objc_msgSend$" "maximumDrawableCount"); +CA::MetalDrawable* _CA_msg_CA__MetalDrawablep_nextDrawable(const void*, SEL) __asm__("_objc_msgSend$" "nextDrawable"); +bool _CA_msg_bool_opaque(const void*, SEL) __asm__("_objc_msgSend$" "opaque"); +MTL::PixelFormat _CA_msg_MTL__PixelFormat_pixelFormat(const void*, SEL) __asm__("_objc_msgSend$" "pixelFormat"); +NS::String* _CA_msg_NS__Stringp_preferredDynamicRange(const void*, SEL) __asm__("_objc_msgSend$" "preferredDynamicRange"); +MTL::ResidencySet* _CA_msg_MTL__ResidencySetp_residencySet(const void*, SEL) __asm__("_objc_msgSend$" "residencySet"); +void _CA_msg_v_setAllowsNextDrawableTimeout__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setAllowsNextDrawableTimeout:"); +void _CA_msg_v_setColorspace__CGColorSpaceRef(const void*, SEL, CGColorSpaceRef) __asm__("_objc_msgSend$" "setColorspace:"); +void _CA_msg_v_setContentsHeadroom__CGFloat(const void*, SEL, CGFloat) __asm__("_objc_msgSend$" "setContentsHeadroom:"); +void _CA_msg_v_setDevice__MTL__Devicep(const void*, SEL, MTL::Device*) __asm__("_objc_msgSend$" "setDevice:"); +void _CA_msg_v_setDisplaySyncEnabled__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setDisplaySyncEnabled:"); +void _CA_msg_v_setDrawableSize__CGSize(const void*, SEL, CGSize) __asm__("_objc_msgSend$" "setDrawableSize:"); +void _CA_msg_v_setFramebufferOnly__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setFramebufferOnly:"); +void _CA_msg_v_setMaximumDrawableCount__NS__UInteger(const void*, SEL, NS::UInteger) __asm__("_objc_msgSend$" "setMaximumDrawableCount:"); +void _CA_msg_v_setOpaque__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setOpaque:"); +void _CA_msg_v_setPixelFormat__MTL__PixelFormat(const void*, SEL, MTL::PixelFormat) __asm__("_objc_msgSend$" "setPixelFormat:"); +void _CA_msg_v_setPreferredDynamicRange__NS__Stringp(const void*, SEL, NS::String*) __asm__("_objc_msgSend$" "setPreferredDynamicRange:"); +void _CA_msg_v_setWantsExtendedDynamicRangeContent__bool(const void*, SEL, bool) __asm__("_objc_msgSend$" "setWantsExtendedDynamicRangeContent:"); +MTL::Texture* _CA_msg_MTL__Texturep_texture(const void*, SEL) __asm__("_objc_msgSend$" "texture"); +bool _CA_msg_bool_wantsExtendedDynamicRangeContent(const void*, SEL) __asm__("_objc_msgSend$" "wantsExtendedDynamicRangeContent"); +} // extern "C" + +#pragma clang diagnostic pop diff --git a/thirdparty/metal-cpp/QuartzCore/CALayer.hpp b/thirdparty/metal-cpp/QuartzCore/CALayer.hpp index d36726858e4a..afa142564834 100644 --- a/thirdparty/metal-cpp/QuartzCore/CALayer.hpp +++ b/thirdparty/metal-cpp/QuartzCore/CALayer.hpp @@ -1,79 +1,123 @@ #pragma once #include "CADefines.hpp" -#include "CAPrivate.hpp" +#include "CAStructs.hpp" +#include "CABridge.hpp" #include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" #include namespace CA { + +using LayerContentsGravity = NS::String*; +using LayerContentsFormat = NS::String*; +using LayerContentsFilter = NS::String*; +using LayerCornerCurve = NS::String*; +using ToneMapMode = NS::String*; using DynamicRange = NS::String*; +extern ToneMapMode const ToneMapModeAutomatic __asm__("_CAToneMapModeAutomatic"); +extern ToneMapMode const ToneMapModeNever __asm__("_CAToneMapModeNever"); +extern ToneMapMode const ToneMapModeIfSupported __asm__("_CAToneMapModeIfSupported"); +extern DynamicRange const DynamicRangeAutomatic __asm__("_CADynamicRangeAutomatic"); +extern DynamicRange const DynamicRangeStandard __asm__("_CADynamicRangeStandard"); +extern DynamicRange const DynamicRangeConstrainedHigh __asm__("_CADynamicRangeConstrainedHigh"); +extern DynamicRange const DynamicRangeHigh __asm__("_CADynamicRangeHigh"); +_CA_OPTIONS(unsigned int, AutoresizingMask) { + kCALayerNotSizable = 0, + kCALayerMinXMargin = 1U << 0, + kCALayerWidthSizable = 1U << 1, + kCALayerMaxXMargin = 1U << 2, + kCALayerMinYMargin = 1U << 3, + kCALayerHeightSizable = 1U << 4, + kCALayerMaxYMargin = 1U << 5, +}; -_CA_CONST(DynamicRange, DynamicRangeAutomatic); -_CA_CONST(DynamicRange, DynamicRangeStandard); -_CA_CONST(DynamicRange, DynamicRangeConstrainedHigh); -_CA_CONST(DynamicRange, DynamicRangeHigh); +_CA_OPTIONS(unsigned int, EdgeAntialiasingMask) { + kCALayerLeftEdge = 1U << 0, + kCALayerRightEdge = 1U << 1, + kCALayerBottomEdge = 1U << 2, + kCALayerTopEdge = 1U << 3, +}; +_CA_OPTIONS(NS::UInteger, CornerMask) { + kCALayerMinXMinYCorner = 1U << 0, + kCALayerMaxXMinYCorner = 1U << 1, + kCALayerMinXMaxYCorner = 1U << 2, + kCALayerMaxXMaxYCorner = 1U << 3, +}; -class Layer : public NS::Referencing + +class Layer : public NS::SecureCoding { public: - bool wantsExtendedDynamicRangeContent() const; - void setWantsExtendedDynamicRangeContent(bool wantsExtendedDynamicRangeContent); + static Layer* alloc(); + Layer* init() const; + + CGFloat contentsHeadroom() const; + bool opaque() const; CA::DynamicRange preferredDynamicRange() const; - void setPreferredDynamicRange(CA::DynamicRange preferredDynamicRange); - CGFloat contentsHeadroom() const; - void setContentsHeadroom(CGFloat contentsHeadroom); - bool opaque() const; - void setOpaque(bool opaque); + void setContentsHeadroom(CGFloat contentsHeadroom); + void setOpaque(bool opaque); + void setPreferredDynamicRange(CA::DynamicRange preferredDynamicRange); + void setWantsExtendedDynamicRangeContent(bool wantsExtendedDynamicRangeContent); + bool wantsExtendedDynamicRangeContent() const; }; } // namespace CA -// --- Inline implementations --- +// --- Class symbols + inline implementations --- + +extern "C" void *OBJC_CLASS_$_CALayer; + +_CA_INLINE CA::Layer* CA::Layer::alloc() +{ + return _CA_msg_CA__Layerp_alloc((const void*)&OBJC_CLASS_$_CALayer, nullptr); +} + +_CA_INLINE CA::Layer* CA::Layer::init() const +{ + return _CA_msg_CA__Layerp_init((const void*)this, nullptr); +} _CA_INLINE bool CA::Layer::wantsExtendedDynamicRangeContent() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(wantsExtendedDynamicRangeContent)); + return _CA_msg_bool_wantsExtendedDynamicRangeContent((const void*)this, nullptr); } _CA_INLINE void CA::Layer::setWantsExtendedDynamicRangeContent(bool wantsExtendedDynamicRangeContent) { - Object::sendMessage(this, _CA_PRIVATE_SEL(setWantsExtendedDynamicRangeContent_), wantsExtendedDynamicRangeContent); + _CA_msg_v_setWantsExtendedDynamicRangeContent__bool((const void*)this, nullptr, wantsExtendedDynamicRangeContent); } _CA_INLINE CA::DynamicRange CA::Layer::preferredDynamicRange() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(preferredDynamicRange)); + return _CA_msg_NS__Stringp_preferredDynamicRange((const void*)this, nullptr); } _CA_INLINE void CA::Layer::setPreferredDynamicRange(CA::DynamicRange preferredDynamicRange) { - Object::sendMessage(this, _CA_PRIVATE_SEL(setPreferredDynamicRange_), preferredDynamicRange); + _CA_msg_v_setPreferredDynamicRange__NS__Stringp((const void*)this, nullptr, preferredDynamicRange); } _CA_INLINE CGFloat CA::Layer::contentsHeadroom() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(contentsHeadroom)); + return _CA_msg_CGFloat_contentsHeadroom((const void*)this, nullptr); } _CA_INLINE void CA::Layer::setContentsHeadroom(CGFloat contentsHeadroom) { - Object::sendMessage(this, _CA_PRIVATE_SEL(setContentsHeadroom_), contentsHeadroom); + _CA_msg_v_setContentsHeadroom__CGFloat((const void*)this, nullptr, contentsHeadroom); } _CA_INLINE bool CA::Layer::opaque() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(opaque)); + return _CA_msg_bool_opaque((const void*)this, nullptr); } _CA_INLINE void CA::Layer::setOpaque(bool opaque) { - Object::sendMessage(this, _CA_PRIVATE_SEL(setOpaque_), opaque); + _CA_msg_v_setOpaque__bool((const void*)this, nullptr, opaque); } - -_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeAutomatic); -_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeStandard); -_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeConstrainedHigh); -_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeHigh); diff --git a/thirdparty/metal-cpp/QuartzCore/CAMetalDrawable.hpp b/thirdparty/metal-cpp/QuartzCore/CAMetalDrawable.hpp deleted file mode 100644 index 0057773a205e..000000000000 --- a/thirdparty/metal-cpp/QuartzCore/CAMetalDrawable.hpp +++ /dev/null @@ -1,57 +0,0 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// QuartzCore/CAMetalDrawable.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#pragma once - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include "../Metal/MTLDrawable.hpp" -#include "../Metal/MTLTexture.hpp" - -#include "CADefines.hpp" -#include "CAPrivate.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace CA -{ -class MetalDrawable : public NS::Referencing -{ -public: - class MetalLayer* layer() const; - MTL::Texture* texture() const; -}; -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_CA_INLINE CA::MetalLayer* CA::MetalDrawable::layer() const -{ - return Object::sendMessage(this, _CA_PRIVATE_SEL(layer)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_CA_INLINE MTL::Texture* CA::MetalDrawable::texture() const -{ - return Object::sendMessage(this, _CA_PRIVATE_SEL(texture)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/QuartzCore/CAMetalLayer.hpp b/thirdparty/metal-cpp/QuartzCore/CAMetalLayer.hpp index 8dfb0ae33b95..7d453ed68305 100644 --- a/thirdparty/metal-cpp/QuartzCore/CAMetalLayer.hpp +++ b/thirdparty/metal-cpp/QuartzCore/CAMetalLayer.hpp @@ -1,217 +1,188 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// QuartzCore/CAMetalDrawable.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include "../Metal/MTLPixelFormat.hpp" -#include "../Metal/MTLTexture.hpp" -#include "../Metal/MTLResidencySet.hpp" -#include "../Foundation/NSTypes.hpp" -#include -#include - #include "CADefines.hpp" -#include "CAMetalDrawable.hpp" -#include "CAPrivate.hpp" +#include "CAStructs.hpp" +#include "CABridge.hpp" +#include "../Foundation/NSObject.hpp" +#include "../Foundation/NSTypes.hpp" +#include "../Foundation/NSRange.hpp" +#include "../Metal/MTLDrawable.hpp" #include "CALayer.hpp" +#include -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +namespace MTL { + class Device; + class ResidencySet; + class Texture; + enum PixelFormat : NS::UInteger; +} namespace CA { -class MetalLayer : public NS::Referencing +class MetalDrawable; +class MetalLayer; + +class MetalDrawable : public NS::Referencing { public: - static class MetalLayer* layer(); + CA::MetalLayer* layer() const; + MTL::Texture* texture() const; - MTL::Device* device() const; - void setDevice(MTL::Device* device); - - MTL::PixelFormat pixelFormat() const; - void setPixelFormat(MTL::PixelFormat pixelFormat); - - bool framebufferOnly() const; - void setFramebufferOnly(bool framebufferOnly); +}; - CGSize drawableSize() const; - void setDrawableSize(CGSize drawableSize); +class MetalLayer : public NS::Referencing +{ +public: + static MetalLayer* alloc(); + MetalLayer* init() const; + + bool allowsNextDrawableTimeout() const; + CGColorSpaceRef colorspace() const; + MTL::Device* device() const; + bool displaySyncEnabled() const; + CGSize drawableSize() const; + bool framebufferOnly() const; + NS::UInteger maximumDrawableCount() const; + CA::MetalDrawable* nextDrawable(); + MTL::PixelFormat pixelFormat() const; + MTL::ResidencySet* residencySet() const; + void setAllowsNextDrawableTimeout(bool allowsNextDrawableTimeout); + void setColorspace(CGColorSpaceRef colorspace); + void setDevice(MTL::Device* device); + void setDisplaySyncEnabled(bool displaySyncEnabled); + void setDrawableSize(CGSize drawableSize); + void setFramebufferOnly(bool framebufferOnly); + void setMaximumDrawableCount(NS::UInteger maximumDrawableCount); + void setPixelFormat(MTL::PixelFormat pixelFormat); + void setWantsExtendedDynamicRangeContent(bool wantsExtendedDynamicRangeContent); + bool wantsExtendedDynamicRangeContent() const; - class MetalDrawable* nextDrawable(); +}; - NS::UInteger maximumDrawableCount() const; - void setMaximumDrawableCount(NS::UInteger maximumDrawableCount); +} // namespace CA - bool displaySyncEnabled() const; - void setDisplaySyncEnabled(bool displaySyncEnabled); +// --- Class symbols + inline implementations --- - CGColorSpaceRef colorspace() const; - void setColorspace(CGColorSpaceRef colorspace); +extern "C" void *OBJC_CLASS_$_CAMetalDrawable; +extern "C" void *OBJC_CLASS_$_CAMetalLayer; - bool allowsNextDrawableTimeout() const; - void setAllowsNextDrawableTimeout(bool allowsNextDrawableTimeout); +_CA_INLINE MTL::Texture* CA::MetalDrawable::texture() const +{ + return _CA_msg_MTL__Texturep_texture((const void*)this, nullptr); +} - MTL::ResidencySet* residencySet() const; -}; -} // namespace CA +_CA_INLINE CA::MetalLayer* CA::MetalDrawable::layer() const +{ + return _CA_msg_CA__MetalLayerp_layer((const void*)this, nullptr); +} -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -_CA_INLINE CA::MetalLayer* CA::MetalLayer::layer() +_CA_INLINE CA::MetalLayer* CA::MetalLayer::alloc() { - return Object::sendMessage(_CA_PRIVATE_CLS(CAMetalLayer), _CA_PRIVATE_SEL(layer)); + return _CA_msg_CA__MetalLayerp_alloc((const void*)&OBJC_CLASS_$_CAMetalLayer, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_CA_INLINE CA::MetalLayer* CA::MetalLayer::init() const +{ + return _CA_msg_CA__MetalLayerp_init((const void*)this, nullptr); +} _CA_INLINE MTL::Device* CA::MetalLayer::device() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(device)); + return _CA_msg_MTL__Devicep_device((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- _CA_INLINE void CA::MetalLayer::setDevice(MTL::Device* device) { - return Object::sendMessage(this, _CA_PRIVATE_SEL(setDevice_), device); + _CA_msg_v_setDevice__MTL__Devicep((const void*)this, nullptr, device); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _CA_INLINE MTL::PixelFormat CA::MetalLayer::pixelFormat() const { - return Object::sendMessage(this, - _CA_PRIVATE_SEL(pixelFormat)); + return _CA_msg_MTL__PixelFormat_pixelFormat((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _CA_INLINE void CA::MetalLayer::setPixelFormat(MTL::PixelFormat pixelFormat) { - return Object::sendMessage(this, _CA_PRIVATE_SEL(setPixelFormat_), - pixelFormat); + _CA_msg_v_setPixelFormat__MTL__PixelFormat((const void*)this, nullptr, pixelFormat); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _CA_INLINE bool CA::MetalLayer::framebufferOnly() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(framebufferOnly)); + return _CA_msg_bool_framebufferOnly((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _CA_INLINE void CA::MetalLayer::setFramebufferOnly(bool framebufferOnly) { - return Object::sendMessage(this, _CA_PRIVATE_SEL(setFramebufferOnly_), - framebufferOnly); + _CA_msg_v_setFramebufferOnly__bool((const void*)this, nullptr, framebufferOnly); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _CA_INLINE CGSize CA::MetalLayer::drawableSize() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(drawableSize)); + return _CA_msg_CGSize_drawableSize((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _CA_INLINE void CA::MetalLayer::setDrawableSize(CGSize drawableSize) { - return Object::sendMessage(this, _CA_PRIVATE_SEL(setDrawableSize_), - drawableSize); + _CA_msg_v_setDrawableSize__CGSize((const void*)this, nullptr, drawableSize); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_CA_INLINE CA::MetalDrawable* CA::MetalLayer::nextDrawable() -{ - return Object::sendMessage(this, - _CA_PRIVATE_SEL(nextDrawable)); -} - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _CA_INLINE NS::UInteger CA::MetalLayer::maximumDrawableCount() const { - return Object::sendMessage(this, - _CA_PRIVATE_SEL(maximumDrawableCount)); + return _CA_msg_NS__UInteger_maximumDrawableCount((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _CA_INLINE void CA::MetalLayer::setMaximumDrawableCount(NS::UInteger maximumDrawableCount) { - return Object::sendMessage(this, _CA_PRIVATE_SEL(setMaximumDrawableCount_), - maximumDrawableCount); + _CA_msg_v_setMaximumDrawableCount__NS__UInteger((const void*)this, nullptr, maximumDrawableCount); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_CA_INLINE bool CA::MetalLayer::displaySyncEnabled() const +_CA_INLINE CGColorSpaceRef CA::MetalLayer::colorspace() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(displaySyncEnabled)); + return _CA_msg_CGColorSpaceRef_colorspace((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_CA_INLINE void CA::MetalLayer::setDisplaySyncEnabled(bool displaySyncEnabled) +_CA_INLINE void CA::MetalLayer::setColorspace(CGColorSpaceRef colorspace) { - return Object::sendMessage(this, _CA_PRIVATE_SEL(setDisplaySyncEnabled_), - displaySyncEnabled); + _CA_msg_v_setColorspace__CGColorSpaceRef((const void*)this, nullptr, colorspace); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -_CA_INLINE CGColorSpaceRef CA::MetalLayer::colorspace() const +_CA_INLINE bool CA::MetalLayer::wantsExtendedDynamicRangeContent() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(colorspace)); + return _CA_msg_bool_wantsExtendedDynamicRangeContent((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_CA_INLINE void CA::MetalLayer::setWantsExtendedDynamicRangeContent(bool wantsExtendedDynamicRangeContent) +{ + _CA_msg_v_setWantsExtendedDynamicRangeContent__bool((const void*)this, nullptr, wantsExtendedDynamicRangeContent); +} -_CA_INLINE void CA::MetalLayer::setColorspace(CGColorSpaceRef colorspace) +_CA_INLINE bool CA::MetalLayer::displaySyncEnabled() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(setColorspace_), - colorspace); + return _CA_msg_bool_displaySyncEnabled((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- +_CA_INLINE void CA::MetalLayer::setDisplaySyncEnabled(bool displaySyncEnabled) +{ + _CA_msg_v_setDisplaySyncEnabled__bool((const void*)this, nullptr, displaySyncEnabled); +} _CA_INLINE bool CA::MetalLayer::allowsNextDrawableTimeout() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(allowsNextDrawableTimeout)); + return _CA_msg_bool_allowsNextDrawableTimeout((const void*)this, nullptr); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _CA_INLINE void CA::MetalLayer::setAllowsNextDrawableTimeout(bool allowsNextDrawableTimeout) { - return Object::sendMessage(this, _CA_PRIVATE_SEL(setAllowsNextDrawableTimeout_), - allowsNextDrawableTimeout); + _CA_msg_v_setAllowsNextDrawableTimeout__bool((const void*)this, nullptr, allowsNextDrawableTimeout); } -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - _CA_INLINE MTL::ResidencySet* CA::MetalLayer::residencySet() const { - return Object::sendMessage(this, _CA_PRIVATE_SEL(residencySet) ); + return _CA_msg_MTL__ResidencySetp_residencySet((const void*)this, nullptr); +} + +_CA_INLINE CA::MetalDrawable* CA::MetalLayer::nextDrawable() +{ + return _CA_msg_CA__MetalDrawablep_nextDrawable((const void*)this, nullptr); } diff --git a/thirdparty/metal-cpp/QuartzCore/CAPrivate.hpp b/thirdparty/metal-cpp/QuartzCore/CAPrivate.hpp deleted file mode 100644 index 8f8822151d3f..000000000000 --- a/thirdparty/metal-cpp/QuartzCore/CAPrivate.hpp +++ /dev/null @@ -1,201 +0,0 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// QuartzCore/CAPrivate.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#pragma once - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#include "CADefines.hpp" - -#include - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#define _CA_PRIVATE_CLS(symbol) (Private::Class::s_k##symbol) -#define _CA_PRIVATE_SEL(accessor) (Private::Selector::s_k##accessor) - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -#if defined(CA_PRIVATE_IMPLEMENTATION) - -#ifdef METALCPP_SYMBOL_VISIBILITY_HIDDEN -#define _CA_PRIVATE_VISIBILITY __attribute__((visibility("hidden"))) -#else -#define _CA_PRIVATE_VISIBILITY __attribute__((visibility("default"))) -#endif // METALCPP_SYMBOL_VISIBILITY_HIDDEN - -#define _CA_PRIVATE_IMPORT __attribute__((weak_import)) - -#ifdef __OBJC__ -#define _CA_PRIVATE_OBJC_LOOKUP_CLASS(symbol) ((__bridge void*)objc_lookUpClass(#symbol)) -#define _CA_PRIVATE_OBJC_GET_PROTOCOL(symbol) ((__bridge void*)objc_getProtocol(#symbol)) -#else -#define _CA_PRIVATE_OBJC_LOOKUP_CLASS(symbol) objc_lookUpClass(#symbol) -#define _CA_PRIVATE_OBJC_GET_PROTOCOL(symbol) objc_getProtocol(#symbol) -#endif // __OBJC__ - -#define _CA_PRIVATE_DEF_CLS(symbol) void* s_k##symbol _CA_PRIVATE_VISIBILITY = _CA_PRIVATE_OBJC_LOOKUP_CLASS(symbol) -#define _CA_PRIVATE_DEF_PRO(symbol) void* s_k##symbol _CA_PRIVATE_VISIBILITY = _CA_PRIVATE_OBJC_GET_PROTOCOL(symbol) -#define _CA_PRIVATE_DEF_SEL(accessor, symbol) SEL s_k##accessor _CA_PRIVATE_VISIBILITY = sel_registerName(symbol) - -#include - -namespace CA::Private -{ - template - inline _Type const LoadSymbol(const char* pSymbol) - { - const _Type* pAddress = static_cast<_Type*>(dlsym(RTLD_DEFAULT, pSymbol)); - - return pAddress ? *pAddress : nullptr; - } -} // CA::Private - -#if defined(__MAC_26_0) || defined(__IPHONE_26_0) || defined(__TVOS_26_0) - -#define _CA_PRIVATE_DEF_STR(type, symbol) \ - _CA_EXTERN type const CA##symbol _CA_PRIVATE_IMPORT; \ - type const CA::symbol = (nullptr != &CA##symbol) ? CA##symbol : nullptr - -#define _CA_PRIVATE_DEF_CONST(type, symbol) \ - _CA_EXTERN type const CA##symbol _CA_PRIVATE_IMPORT; \ - type const CA::symbol = (nullptr != &CA##symbol) ? CA##symbol : nullptr - -#else - -#define _CA_PRIVATE_DEF_STR(type, symbol) \ - _CA_EXTERN type const CA##symbol; \ - type const CA::symbol = CA::Private::LoadSymbol("CA" #symbol) - -#define _CA_PRIVATE_DEF_CONST(type, symbol) \ - _CA_EXTERN type const CA##symbol; \ - type const CA::symbol = CA::Private::LoadSymbol("CA" #symbol) - -#endif - -#else - -#define _CA_PRIVATE_DEF_CLS(symbol) extern void* s_k##symbol -#define _CA_PRIVATE_DEF_PRO(symbol) extern void* s_k##symbol -#define _CA_PRIVATE_DEF_SEL(accessor, symbol) extern SEL s_k##accessor -#define _CA_PRIVATE_DEF_STR(type, symbol) extern type const CA::symbol -#define _CA_PRIVATE_DEF_CONST(type, symbol) extern type const CA::symbol - -#endif // CA_PRIVATE_IMPLEMENTATION - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace CA -{ -namespace Private -{ - namespace Class - { - _CA_PRIVATE_DEF_CLS(CAMetalLayer); - _CA_PRIVATE_DEF_CLS(CALayer); - } // Class -} // Private -} // CA - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace CA -{ -namespace Private -{ - namespace Protocol - { - - _CA_PRIVATE_DEF_PRO(CAMetalDrawable); - - } // Protocol -} // Private -} // CA - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - -namespace CA -{ -namespace Private -{ - namespace Selector - { - _CA_PRIVATE_DEF_SEL(allowsNextDrawableTimeout, - "allowsNextDrawableTimeout"); - _CA_PRIVATE_DEF_SEL(colorspace, - "colorspace"); - _CA_PRIVATE_DEF_SEL(contentsHeadroom, - "contentsHeadroom"); - _CA_PRIVATE_DEF_SEL(device, - "device"); - _CA_PRIVATE_DEF_SEL(displaySyncEnabled, - "displaySyncEnabled"); - _CA_PRIVATE_DEF_SEL(drawableSize, - "drawableSize"); - _CA_PRIVATE_DEF_SEL(framebufferOnly, - "framebufferOnly"); - _CA_PRIVATE_DEF_SEL(layer, - "layer"); - _CA_PRIVATE_DEF_SEL(maximumDrawableCount, - "maximumDrawableCount"); - _CA_PRIVATE_DEF_SEL(nextDrawable, - "nextDrawable"); - _CA_PRIVATE_DEF_SEL(opaque, - "opaque"); - _CA_PRIVATE_DEF_SEL(pixelFormat, - "pixelFormat"); - _CA_PRIVATE_DEF_SEL(preferredDynamicRange, - "preferredDynamicRange"); - _CA_PRIVATE_DEF_SEL(residencySet, - "residencySet"); - _CA_PRIVATE_DEF_SEL(setAllowsNextDrawableTimeout_, - "setAllowsNextDrawableTimeout:"); - _CA_PRIVATE_DEF_SEL(setColorspace_, - "setColorspace:"); - _CA_PRIVATE_DEF_SEL(setContentsHeadroom_, - "setContentsHeadroom:"); - _CA_PRIVATE_DEF_SEL(setDevice_, - "setDevice:"); - _CA_PRIVATE_DEF_SEL(setDisplaySyncEnabled_, - "setDisplaySyncEnabled:"); - _CA_PRIVATE_DEF_SEL(setDrawableSize_, - "setDrawableSize:"); - _CA_PRIVATE_DEF_SEL(setFramebufferOnly_, - "setFramebufferOnly:"); - _CA_PRIVATE_DEF_SEL(setMaximumDrawableCount_, - "setMaximumDrawableCount:"); - _CA_PRIVATE_DEF_SEL(setOpaque_, - "setOpaque:"); - _CA_PRIVATE_DEF_SEL(setPixelFormat_, - "setPixelFormat:"); - _CA_PRIVATE_DEF_SEL(setPreferredDynamicRange_, - "setPreferredDynamicRange:"); - _CA_PRIVATE_DEF_SEL(setWantsExtendedDynamicRangeContent_, - "setWantsExtendedDynamicRangeContent:"); - _CA_PRIVATE_DEF_SEL(texture, - "texture"); - _CA_PRIVATE_DEF_SEL(wantsExtendedDynamicRangeContent, - "wantsExtendedDynamicRangeContent"); - - } // Class -} // Private -} // CA - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/QuartzCore/CAStructs.hpp b/thirdparty/metal-cpp/QuartzCore/CAStructs.hpp new file mode 100644 index 000000000000..a105f2da0b8e --- /dev/null +++ b/thirdparty/metal-cpp/QuartzCore/CAStructs.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "CADefines.hpp" +#include "../Foundation/NSTypes.hpp" + +namespace CA { + +} // CA + +#include "CADefines.hpp" + +namespace CA { + +using LayerContentsGravity = NS::String*; +using LayerContentsFormat = NS::String*; +using LayerContentsFilter = NS::String*; +using LayerCornerCurve = NS::String*; +using ToneMapMode = NS::String*; +using DynamicRange = NS::String*; + +} // CA diff --git a/thirdparty/metal-cpp/QuartzCore/QuartzCore.hpp b/thirdparty/metal-cpp/QuartzCore/QuartzCore.hpp index 01418e0c15b0..0247651cf84f 100644 --- a/thirdparty/metal-cpp/QuartzCore/QuartzCore.hpp +++ b/thirdparty/metal-cpp/QuartzCore/QuartzCore.hpp @@ -1,29 +1,7 @@ -//------------------------------------------------------------------------------------------------------------------------------------------------------------- -// -// QuartzCore/QuartzCore.hpp -// -// Copyright 2020-2024 Apple Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - #pragma once -//------------------------------------------------------------------------------------------------------------------------------------------------------------- - +#include "CADefines.hpp" +#include "CAStructs.hpp" +#include "CADefines.hpp" #include "CALayer.hpp" -#include "CAMetalDrawable.hpp" #include "CAMetalLayer.hpp" - -//------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/thirdparty/metal-cpp/README.md b/thirdparty/metal-cpp/README.md new file mode 100644 index 000000000000..d964a35aaae8 --- /dev/null +++ b/thirdparty/metal-cpp/README.md @@ -0,0 +1,34 @@ +# metal-cpp + +Drop-in replacement for `metal-cpp` that dispatches via linker-synthesized selector stubs (`_objc_msgSend$`) instead of the `sel_registerName` + `objc_msgSend` indirection used by Apple's upstream metal-cpp. Same public API surface so Godot's `drivers/metal/` can switch without source-level changes. + +## Benefits + +### API Availability warnings + +* The generated C++ classes and methods are annotated with `availability` attribtues, so you get compile-time warnings if you call an API that may not be present on the target OS version. + +### objc_msgSend stubs + +See: https://developer.apple.com/videos/play/wwdc2022/110363 + +* metal-cpp loses an Objective-C (m/mm) optimisation introduced in Xcode 14 where `objc_msgSend` call sites were transposed into a single `bl` to a linker-generated stub. This reduces code at the call site from 12 → 4–8 bytes on ARM64. +* This version reintroduces that, which now results in a tail call for better i-cache/branch behavior. +* No static initializer fan-out. Apple's metal-cpp emits `SEL s_k = sel_registerName("")`; per selector; dyld runs all of them at image load. Stubs are pre-resolved by dyld's existing ObjC fixup pass. +* Pre-dedup'd through the linker. All call sites for label across all classes funnel through one stub address — better i-cache, single relocation entry. + +### Binary footprint + +* No SEL globals. Each removed s_k is 8 B of .data + a relocation + an initializer call. We had hundreds. +* No per-class inline `Object::sendMessage(...)` instantiations. The bridge collapses (ret, args, sel) tuples to a single extern "C" decl: e.g. the 30+ classes with `label() -> NS::String*` share one declaration. Shrinks .o files, speeds link, dedups debug info, gives cleaner stack frames (`_objc_msgSend$label` instead of `NS::Object::sendMessage`). + + +## Requirements + +The Python environment must have `libclang` and `pyyaml` installed. The script is tested with Python 3.14. + +## Running + +```sh +python3 thirdparty/metal-cpp/tools/generate.py --metal-cpp --sdk macos +``` diff --git a/thirdparty/metal-cpp/metal_cpp.cpp b/thirdparty/metal-cpp/metal_cpp.cpp index 7d20dc7cceee..59b4cdaf5b40 100644 --- a/thirdparty/metal-cpp/metal_cpp.cpp +++ b/thirdparty/metal-cpp/metal_cpp.cpp @@ -28,12 +28,27 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +// Only NS_PRIVATE_IMPLEMENTATION is still meaningful — it flips +// Foundation/NSPrivate.hpp from `extern SEL s_k…` declarations to definitions +// so the SEL globals consumed by upstream NSObject.hpp's base ops (retain / +// release / autorelease / description / hash / isEqual:) get instantiated +// here. The Metal / MetalFX / QuartzCore framework wrappers dispatch through +// linker-synthesized `_objc_msgSend$` stubs and require no per-TU +// definitions, so their private-implementation macros are gone. #define NS_PRIVATE_IMPLEMENTATION -#define CA_PRIVATE_IMPLEMENTATION -#define MTL_PRIVATE_IMPLEMENTATION -#define MTLFX_PRIVATE_IMPLEMENTATION #include "Foundation/Foundation.hpp" #include "Metal/Metal.hpp" #include "MetalFX/MetalFX.hpp" #include "QuartzCore/QuartzCore.hpp" + +// Definition of MTL::CreateSystemDefaultDevice — kept here so the system +// `MTLCreateSystemDefaultDevice` extern (which carries an ARC-relevant +// `NS_RETURNS_RETAINED` attribute in Apple's MTLDevice.h) is never visible +// in headers that .mm translation units transitively include. +extern "C" MTL::Device* MTLCreateSystemDefaultDevice(); + +MTL::Device* MTL::CreateSystemDefaultDevice() +{ + return ::MTLCreateSystemDefaultDevice(); +} diff --git a/thirdparty/metal-cpp/patches/0001-add-missing-apis.patch b/thirdparty/metal-cpp/patches/0001-add-missing-apis.patch deleted file mode 100644 index cd737664ade4..000000000000 --- a/thirdparty/metal-cpp/patches/0001-add-missing-apis.patch +++ /dev/null @@ -1,338 +0,0 @@ -diff -ruN original/Foundation/NSData.hpp patched/Foundation/NSData.hpp ---- original/Foundation/NSData.hpp 2026-02-18 06:41:30 -+++ patched/Foundation/NSData.hpp 2026-02-18 06:41:30 -@@ -34,6 +34,7 @@ - public: - void* mutableBytes() const; - UInteger length() const; -+ const void * bytes() const; - }; - } - -@@ -49,6 +50,11 @@ - _NS_INLINE NS::UInteger NS::Data::length() const - { - return Object::sendMessage(this, _NS_PRIVATE_SEL(length)); -+} -+ -+_NS_INLINE const void * NS::Data::bytes() const -+{ -+ return Object::sendMessage(this, _NS_PRIVATE_SEL(bytes)); - } - - //------------------------------------------------------------------------------------------------------------------------------------------------------------- -diff -ruN original/Foundation/NSDefines.hpp patched/Foundation/NSDefines.hpp ---- original/Foundation/NSDefines.hpp 2026-02-18 06:41:30 -+++ patched/Foundation/NSDefines.hpp 2026-02-18 06:41:30 -@@ -22,6 +22,16 @@ - - //------------------------------------------------------------------------------------------------------------------------------------------------------------- - -+// Forward declarations to avoid conflicts with Godot types (String, Object, Error) -+namespace NS { -+class Array; -+class Dictionary; -+class Error; -+class Object; -+class String; -+class URL; -+} // namespace NS -+ - #define _NS_WEAK_IMPORT __attribute__((weak_import)) - #ifdef METALCPP_SYMBOL_VISIBILITY_HIDDEN - #define _NS_EXPORT __attribute__((visibility("hidden"))) -diff -ruN original/Foundation/NSObject.hpp patched/Foundation/NSObject.hpp ---- original/Foundation/NSObject.hpp 2026-02-18 06:41:30 -+++ patched/Foundation/NSObject.hpp 2026-02-18 06:41:30 -@@ -68,6 +68,12 @@ - class String* description() const; - class String* debugDescription() const; - -+ template -+ static _Ret sendMessage(const void* pObj, SEL selector, _Args... args); -+ -+ template -+ static _Ret sendMessageSafe(const void* pObj, SEL selector, _Args... args); -+ - protected: - friend class Referencing; - -@@ -84,10 +90,6 @@ - static bool respondsToSelector(const void* pObj, SEL selector); - template - static constexpr bool doesRequireMsgSendStret(); -- template -- static _Ret sendMessage(const void* pObj, SEL selector, _Args... args); -- template -- static _Ret sendMessageSafe(const void* pObj, SEL selector, _Args... args); - - private: - Object() = delete; -diff -ruN original/Foundation/NSPrivate.hpp patched/Foundation/NSPrivate.hpp ---- original/Foundation/NSPrivate.hpp 2026-02-18 06:41:30 -+++ patched/Foundation/NSPrivate.hpp 2026-02-18 06:41:30 -@@ -184,6 +184,8 @@ - "bundleWithPath:"); - _NS_PRIVATE_DEF_SEL(bundleWithURL_, - "bundleWithURL:"); -+ _NS_PRIVATE_DEF_SEL(bytes, -+ "bytes"); - _NS_PRIVATE_DEF_SEL(caseInsensitiveCompare_, - "caseInsensitiveCompare:"); - _NS_PRIVATE_DEF_SEL(characterAtIndex_, -@@ -268,6 +270,8 @@ - "initFileURLWithPath:"); - _NS_PRIVATE_DEF_SEL(initWithBool_, - "initWithBool:"); -+ _NS_PRIVATE_DEF_SEL(initWithBytes_length_encoding_, -+ "initWithBytes:length:encoding:"); - _NS_PRIVATE_DEF_SEL(initWithBytes_objCType_, - "initWithBytes:objCType:"); - _NS_PRIVATE_DEF_SEL(initWithBytesNoCopy_length_encoding_freeWhenDone_, -diff -ruN original/Foundation/NSString.hpp patched/Foundation/NSString.hpp ---- original/Foundation/NSString.hpp 2026-02-18 06:41:30 -+++ patched/Foundation/NSString.hpp 2026-02-18 06:41:30 -@@ -104,6 +104,7 @@ - - String* stringByAppendingString(const String* pString) const; - ComparisonResult caseInsensitiveCompare(const String* pString) const; -+ NS::String* init(const void * bytes, NS::UInteger len, NS::StringEncoding encoding); - }; - - /// Create an NS::String* from a string literal. -@@ -250,6 +251,11 @@ - _NS_INLINE NS::ComparisonResult NS::String::caseInsensitiveCompare(const String* pString) const - { - return Object::sendMessage(this, _NS_PRIVATE_SEL(caseInsensitiveCompare_), pString); -+} -+ -+_NS_INLINE NS::String* NS::String::init(const void * bytes, NS::UInteger len, NS::StringEncoding encoding) -+{ -+ return Object::sendMessage(this, _NS_PRIVATE_SEL(initWithBytes_length_encoding_), bytes, len, encoding); - } - - //------------------------------------------------------------------------------------------------------------------------------------------------------------- -diff -ruN original/QuartzCore/CALayer.hpp patched/QuartzCore/CALayer.hpp ---- original/QuartzCore/CALayer.hpp 1970-01-01 11:00:00 -+++ patched/QuartzCore/CALayer.hpp 2026-02-18 06:41:30 -@@ -0,0 +1,79 @@ -+#pragma once -+ -+#include "CADefines.hpp" -+#include "CAPrivate.hpp" -+#include "../Foundation/NSObject.hpp" -+#include -+ -+namespace CA -+{ -+using DynamicRange = NS::String*; -+ -+_CA_CONST(DynamicRange, DynamicRangeAutomatic); -+_CA_CONST(DynamicRange, DynamicRangeStandard); -+_CA_CONST(DynamicRange, DynamicRangeConstrainedHigh); -+_CA_CONST(DynamicRange, DynamicRangeHigh); -+ -+ -+class Layer : public NS::Referencing -+{ -+public: -+ bool wantsExtendedDynamicRangeContent() const; -+ void setWantsExtendedDynamicRangeContent(bool wantsExtendedDynamicRangeContent); -+ CA::DynamicRange preferredDynamicRange() const; -+ void setPreferredDynamicRange(CA::DynamicRange preferredDynamicRange); -+ CGFloat contentsHeadroom() const; -+ void setContentsHeadroom(CGFloat contentsHeadroom); -+ bool opaque() const; -+ void setOpaque(bool opaque); -+ -+}; -+ -+} // namespace CA -+ -+// --- Inline implementations --- -+ -+_CA_INLINE bool CA::Layer::wantsExtendedDynamicRangeContent() const -+{ -+ return Object::sendMessage(this, _CA_PRIVATE_SEL(wantsExtendedDynamicRangeContent)); -+} -+ -+_CA_INLINE void CA::Layer::setWantsExtendedDynamicRangeContent(bool wantsExtendedDynamicRangeContent) -+{ -+ Object::sendMessage(this, _CA_PRIVATE_SEL(setWantsExtendedDynamicRangeContent_), wantsExtendedDynamicRangeContent); -+} -+ -+_CA_INLINE CA::DynamicRange CA::Layer::preferredDynamicRange() const -+{ -+ return Object::sendMessage(this, _CA_PRIVATE_SEL(preferredDynamicRange)); -+} -+ -+_CA_INLINE void CA::Layer::setPreferredDynamicRange(CA::DynamicRange preferredDynamicRange) -+{ -+ Object::sendMessage(this, _CA_PRIVATE_SEL(setPreferredDynamicRange_), preferredDynamicRange); -+} -+ -+_CA_INLINE CGFloat CA::Layer::contentsHeadroom() const -+{ -+ return Object::sendMessage(this, _CA_PRIVATE_SEL(contentsHeadroom)); -+} -+ -+_CA_INLINE void CA::Layer::setContentsHeadroom(CGFloat contentsHeadroom) -+{ -+ Object::sendMessage(this, _CA_PRIVATE_SEL(setContentsHeadroom_), contentsHeadroom); -+} -+ -+_CA_INLINE bool CA::Layer::opaque() const -+{ -+ return Object::sendMessage(this, _CA_PRIVATE_SEL(opaque)); -+} -+ -+_CA_INLINE void CA::Layer::setOpaque(bool opaque) -+{ -+ Object::sendMessage(this, _CA_PRIVATE_SEL(setOpaque_), opaque); -+} -+ -+_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeAutomatic); -+_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeStandard); -+_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeConstrainedHigh); -+_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeHigh); -diff -ruN original/QuartzCore/CAMetalLayer.hpp patched/QuartzCore/CAMetalLayer.hpp ---- original/QuartzCore/CAMetalLayer.hpp 2026-02-18 06:41:30 -+++ patched/QuartzCore/CAMetalLayer.hpp 2026-02-18 06:41:31 -@@ -32,13 +32,14 @@ - #include "CADefines.hpp" - #include "CAMetalDrawable.hpp" - #include "CAPrivate.hpp" -+#include "CALayer.hpp" - - //------------------------------------------------------------------------------------------------------------------------------------------------------------- - - namespace CA - { - --class MetalLayer : public NS::Referencing -+class MetalLayer : public NS::Referencing - { - public: - static class MetalLayer* layer(); -diff -ruN original/QuartzCore/CAPrivate.hpp patched/QuartzCore/CAPrivate.hpp ---- original/QuartzCore/CAPrivate.hpp 2026-02-18 06:41:30 -+++ patched/QuartzCore/CAPrivate.hpp 2026-02-18 06:41:31 -@@ -54,16 +54,49 @@ - #define _CA_PRIVATE_DEF_CLS(symbol) void* s_k##symbol _CA_PRIVATE_VISIBILITY = _CA_PRIVATE_OBJC_LOOKUP_CLASS(symbol) - #define _CA_PRIVATE_DEF_PRO(symbol) void* s_k##symbol _CA_PRIVATE_VISIBILITY = _CA_PRIVATE_OBJC_GET_PROTOCOL(symbol) - #define _CA_PRIVATE_DEF_SEL(accessor, symbol) SEL s_k##accessor _CA_PRIVATE_VISIBILITY = sel_registerName(symbol) -+ -+#include -+ -+namespace CA::Private -+{ -+ template -+ inline _Type const LoadSymbol(const char* pSymbol) -+ { -+ const _Type* pAddress = static_cast<_Type*>(dlsym(RTLD_DEFAULT, pSymbol)); -+ -+ return pAddress ? *pAddress : nullptr; -+ } -+} // CA::Private -+ -+#if defined(__MAC_26_0) || defined(__IPHONE_26_0) || defined(__TVOS_26_0) -+ - #define _CA_PRIVATE_DEF_STR(type, symbol) \ - _CA_EXTERN type const CA##symbol _CA_PRIVATE_IMPORT; \ - type const CA::symbol = (nullptr != &CA##symbol) ? CA##symbol : nullptr - -+#define _CA_PRIVATE_DEF_CONST(type, symbol) \ -+ _CA_EXTERN type const CA##symbol _CA_PRIVATE_IMPORT; \ -+ type const CA::symbol = (nullptr != &CA##symbol) ? CA##symbol : nullptr -+ - #else - -+#define _CA_PRIVATE_DEF_STR(type, symbol) \ -+ _CA_EXTERN type const CA##symbol; \ -+ type const CA::symbol = CA::Private::LoadSymbol("CA" #symbol) -+ -+#define _CA_PRIVATE_DEF_CONST(type, symbol) \ -+ _CA_EXTERN type const CA##symbol; \ -+ type const CA::symbol = CA::Private::LoadSymbol("CA" #symbol) -+ -+#endif -+ -+#else -+ - #define _CA_PRIVATE_DEF_CLS(symbol) extern void* s_k##symbol - #define _CA_PRIVATE_DEF_PRO(symbol) extern void* s_k##symbol - #define _CA_PRIVATE_DEF_SEL(accessor, symbol) extern SEL s_k##accessor - #define _CA_PRIVATE_DEF_STR(type, symbol) extern type const CA::symbol -+#define _CA_PRIVATE_DEF_CONST(type, symbol) extern type const CA::symbol - - #endif // CA_PRIVATE_IMPLEMENTATION - -@@ -76,6 +109,7 @@ - namespace Class - { - _CA_PRIVATE_DEF_CLS(CAMetalLayer); -+ _CA_PRIVATE_DEF_CLS(CALayer); - } // Class - } // Private - } // CA -@@ -107,6 +141,8 @@ - "allowsNextDrawableTimeout"); - _CA_PRIVATE_DEF_SEL(colorspace, - "colorspace"); -+ _CA_PRIVATE_DEF_SEL(contentsHeadroom, -+ "contentsHeadroom"); - _CA_PRIVATE_DEF_SEL(device, - "device"); - _CA_PRIVATE_DEF_SEL(displaySyncEnabled, -@@ -121,14 +157,20 @@ - "maximumDrawableCount"); - _CA_PRIVATE_DEF_SEL(nextDrawable, - "nextDrawable"); -+ _CA_PRIVATE_DEF_SEL(opaque, -+ "opaque"); - _CA_PRIVATE_DEF_SEL(pixelFormat, - "pixelFormat"); -+ _CA_PRIVATE_DEF_SEL(preferredDynamicRange, -+ "preferredDynamicRange"); - _CA_PRIVATE_DEF_SEL(residencySet, - "residencySet"); - _CA_PRIVATE_DEF_SEL(setAllowsNextDrawableTimeout_, - "setAllowsNextDrawableTimeout:"); - _CA_PRIVATE_DEF_SEL(setColorspace_, - "setColorspace:"); -+ _CA_PRIVATE_DEF_SEL(setContentsHeadroom_, -+ "setContentsHeadroom:"); - _CA_PRIVATE_DEF_SEL(setDevice_, - "setDevice:"); - _CA_PRIVATE_DEF_SEL(setDisplaySyncEnabled_, -@@ -139,10 +181,19 @@ - "setFramebufferOnly:"); - _CA_PRIVATE_DEF_SEL(setMaximumDrawableCount_, - "setMaximumDrawableCount:"); -+ _CA_PRIVATE_DEF_SEL(setOpaque_, -+ "setOpaque:"); - _CA_PRIVATE_DEF_SEL(setPixelFormat_, - "setPixelFormat:"); -+ _CA_PRIVATE_DEF_SEL(setPreferredDynamicRange_, -+ "setPreferredDynamicRange:"); -+ _CA_PRIVATE_DEF_SEL(setWantsExtendedDynamicRangeContent_, -+ "setWantsExtendedDynamicRangeContent:"); - _CA_PRIVATE_DEF_SEL(texture, - "texture"); -+ _CA_PRIVATE_DEF_SEL(wantsExtendedDynamicRangeContent, -+ "wantsExtendedDynamicRangeContent"); -+ - } // Class - } // Private - } // CA -diff -ruN original/QuartzCore/QuartzCore.hpp patched/QuartzCore/QuartzCore.hpp ---- original/QuartzCore/QuartzCore.hpp 2026-02-18 06:41:30 -+++ patched/QuartzCore/QuartzCore.hpp 2026-02-18 06:41:31 -@@ -22,6 +22,7 @@ - - //------------------------------------------------------------------------------------------------------------------------------------------------------------- - -+#include "CALayer.hpp" - #include "CAMetalDrawable.hpp" - #include "CAMetalLayer.hpp" - diff --git a/thirdparty/metal-cpp/tools/config.schema.json b/thirdparty/metal-cpp/tools/config.schema.json new file mode 100644 index 000000000000..89c33da52702 --- /dev/null +++ b/thirdparty/metal-cpp/tools/config.schema.json @@ -0,0 +1,230 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://godotengine.org/schemas/metal-cpp-config.json", + "title": "metal-cpp generator configuration", + "description": "Schema for config.yaml. Drives generate.py, which parses Apple-framework headers via libclang and emits metal-cpp-shaped C++ wrappers.", + "type": "object", + "additionalProperties": false, + "required": ["sdks", "frameworks"], + "properties": { + "sdks": { + "type": "array", + "description": "Apple SDKs to generate against. Each entry is parsed in turn; the `--sdk ` CLI flag can restrict generation to a single entry.", + "minItems": 1, + "items": { "$ref": "#/$defs/sdk" } + }, + "frameworks": { + "type": "array", + "description": "Apple frameworks to wrap. Processed in declaration order; cross-framework class references resolve to whatever is already registered, so put base namespaces (Foundation, then Metal) before dependents.", + "minItems": 1, + "items": { "$ref": "#/$defs/framework" } + } + }, + + "$defs": { + "sdk": { + "type": "object", + "additionalProperties": false, + "required": ["name", "xcrun_sdk"], + "properties": { + "name": { + "type": "string", + "description": "Logical SDK identifier (e.g. `macos`, `iphoneos`, `visionos`). Filterable via the `--sdk` CLI flag. Must be unique across the sdks list.", + "pattern": "^[a-z][a-z0-9_]*$" + }, + "xcrun_sdk": { + "type": "string", + "description": "Argument passed to `xcrun --sdk --show-sdk-path` to locate the SDK on disk. Apple's canonical names: `macosx`, `iphoneos`, `iphonesimulator`, `xros`, `xrsimulator`, `appletvos`, `appletvsimulator`, `watchos`, `watchsimulator`." + } + } + }, + + "framework": { + "type": "object", + "description": "Apple framework wrapper definition. Two flavors: ObjC frameworks (default) parse @interface / @protocol via libclang; C-API frameworks (`api_notes: true`) parse `.apinotes` + C function prototypes.", + "additionalProperties": false, + "required": ["name", "namespace", "prefix", "sdks"], + "properties": { + "name": { + "type": "string", + "description": "Framework directory name on disk under `/System/Library/Frameworks/`. Also the output subdirectory name unless overridden by `output_subdir`. For virtual frameworks (Metal4, Metal4FX) this is a logical name and `sdk_framework` points at the actual on-disk framework.", + "pattern": "^[A-Z][A-Za-z0-9]+$" + }, + "namespace": { + "type": "string", + "description": "C++ namespace emitted for this framework's classes/enums/blocks/structs (e.g. `NS`, `MTL`, `MTL4`, `MTLFX`, `MTL4FX`, `CA`).", + "pattern": "^[A-Z][A-Za-z0-9]*$" + }, + "prefix": { + "type": "string", + "description": "C-style prefix used by Apple in selector and class-name macros (`MTL`, `MTL4`, `CA`, ...). Drives `__INLINE`, `__ENUM`, `__PACKED`, etc. in the emitted code.", + "pattern": "^[A-Z][A-Za-z0-9]*$" + }, + "strip_prefix": { + "type": "string", + "description": "Prefix stripped from Apple's ObjC names when generating C++ names (`MTLDevice` → `Device` with `strip_prefix: MTL`). Usually identical to `prefix`. Defaults to empty (no stripping).", + "default": "" + }, + "sdks": { + "type": "array", + "description": "Subset of top-level `sdks[].name` entries this framework should be parsed against. Frameworks that don't ship for a given SDK should omit it here.", + "minItems": 1, + "items": { "type": "string" } + }, + "headers": { + "type": "array", + "description": "SDK header filenames (relative to `/Headers/`) to parse. Each header yields a matching `
.hpp` next to other generated files. Order matters: type-defining headers (`MTLTypes.h`, `MTLPixelFormat.h`, ...) should come first so cross-header references in later headers resolve.", + "items": { "type": "string", "pattern": "^[A-Za-z0-9_]+\\.h$" } + }, + "include": { "$ref": "#/$defs/includeFilter" }, + "exclude": { "$ref": "#/$defs/excludeFilter" }, + "class_overrides": { + "type": "object", + "description": "Per-class / per-struct / per-protocol override knobs, keyed by the ObjC name (`MTLRenderCommandEncoder`, `MTLSize`, `NSString`, ...). See `classOverride` schema for the available fields.", + "additionalProperties": { "$ref": "#/$defs/classOverride" } + }, + "keep_upstream": { + "type": "array", + "description": "Bare hpp basenames (no `.hpp` extension) that should be copied verbatim from `<--metal-cpp>//.hpp` (Apple's checkout supplied via `generate.py --metal-cpp`) into the generated tree. Used for hand-written infrastructure the generator can't emit: SEL/class macros (`NSPrivate`, `MTLPrivate`), CRTP bases (`NSObject`), SIMD-typed structs (`MTLAccelerationStructureTypes`), template containers (`NSDictionary`, `NSEnumerator`), etc. Listed files are also added to the framework umbrella include list.", + "items": { "type": "string" } + }, + "sdk_framework": { + "type": "string", + "description": "SDK framework directory to read headers from when it differs from `name`. Used by virtual frameworks that re-namespace a subset of another framework's headers (`Metal4`/`Metal4FX` both have `sdk_framework: Metal`/`MetalFX` and pick up the `MTL4*.h` / `MTL4FX*.h` headers in a separate namespace).", + "default": "" + }, + "output_subdir": { + "type": "string", + "description": "Directory under `metal-cpp/` to write generated files into, if different from `name`. Defaults to `name`. Set when a virtual framework should share a directory with its host framework (`Metal4` writes into `Metal/`).", + "default": "" + }, + "extra_umbrella_includes": { + "type": "array", + "description": "Extra `#include` lines appended to the framework's umbrella `.hpp`. Used to surface sibling virtual frameworks (`Metal.hpp` pulls in `Metal4.hpp`) and hand-written supplementary headers (`MetalFX.hpp` pulls in `Metal4FX.hpp`).", + "items": { "type": "string" } + }, + "api_notes": { + "type": "boolean", + "description": "When true, treat this as a C-API framework: parse the `.apinotes` YAML alongside C function signatures from `headers`. Used for CoreGraphics-style APIs. ObjC frameworks (the default) ignore apinotes here and consume them per-framework for SwiftName-derived method renames.", + "default": false + }, + "shared": { + "type": "boolean", + "description": "When true, the framework is generated once across all SDK passes rather than re-generated per SDK. Use for frameworks whose surface is platform-invariant (e.g. QuartzCore).", + "default": false + } + } + }, + + "includeFilter": { + "type": "object", + "description": "Inclusion filter. When present, only members matching the listed regex patterns are kept. Omitting a sub-key means \"keep nothing of this kind\".", + "additionalProperties": false, + "properties": { + "classes": { + "type": "array", + "description": "Regex patterns matched against ObjC class/protocol names. Use `[\".*\"]` to keep all (the typical setting).", + "items": { "type": "string", "format": "regex" } + }, + "methods": { + "type": "array", + "description": "Regex patterns matched against either the ObjC selector or the generator-computed C++ method name.", + "items": { "type": "string", "format": "regex" } + }, + "properties": { + "type": "array", + "description": "Regex patterns matched against ObjC property names.", + "items": { "type": "string", "format": "regex" } + }, + "globals": { + "type": "array", + "description": "C-API framework only (`api_notes: true`). Regex patterns matched against apinotes global names.", + "items": { "type": "string", "format": "regex" } + } + } + }, + + "excludeFilter": { + "type": "object", + "description": "Exclusion filter. Applied after include filters; anything matched here is dropped. Use case-insensitive regexes (`(?i)deprecated`) to skip whole categories of methods.", + "additionalProperties": false, + "properties": { + "classes": { + "type": "array", + "description": "Framework-level only. Regex patterns matched against ObjC class/protocol names — anything matching is dropped before per-class filtering runs. Use to skip whole classes (`NSBundleResourceRequest`) without restructuring the framework's `include.classes` allow-list.", + "items": { "type": "string", "format": "regex" } + }, + "methods": { + "type": "array", + "description": "Regex patterns matched against the ObjC selector. Common entry: `[\"(?i)deprecated\"]` to drop everything Apple marked deprecated in the selector text or attribute.", + "items": { "type": "string", "format": "regex" } + }, + "properties": { + "type": "array", + "description": "Regex patterns matched against ObjC property names.", + "items": { "type": "string", "format": "regex" } + } + } + }, + + "perClassMemberFilter": { + "type": "object", + "description": "Per-class member filter. `members:` is the only key — a flat allow/deny list keyed by ObjC selector (for methods) or property name (for properties). `methods`/`properties`/`classes`/`globals` from the framework-level filter don't apply at this scope.", + "additionalProperties": false, + "properties": { + "members": { + "type": "array", + "description": "Regex patterns (or plain literal selectors / property names) matched against `m.selector` for each method and `p.name` for each property. Use literals for surgical allow-lists (`setBlendColorRed:green:blue:alpha:`) and regex when you want a wildcard (`set.*`).", + "items": { "type": "string", "format": "regex" } + } + } + }, + + "classOverride": { + "type": "object", + "description": "Per-class/struct/protocol override. Different keys apply to different ObjC kinds — ObjC classes accept `include`/`exclude`/`rename`/`prepend`/`append`; structs accept `skip`/`packed`/`cpp_name`/`members`. The generator silently ignores unrelated keys for an entity (e.g. `packed` on a class) so it's safe to mix freely if multiple ObjC names happen to alias to the same C++ key.", + "additionalProperties": false, + "properties": { + "include": { + "$ref": "#/$defs/perClassMemberFilter", + "description": "ObjC-class-only. Per-class include filter — when present, only members named in `members:` pass through." + }, + "exclude": { + "$ref": "#/$defs/perClassMemberFilter", + "description": "ObjC-class-only. Per-class exclude filter — drops members named in `members:`. Applied after `include:` and after the framework-level filters." + }, + "rename": { + "type": "object", + "description": "ObjC-class-only. Map from ObjC selector (e.g. `setBlendColorRed:green:blue:alpha:`) to a custom C++ method name. Used to override the generator's heuristic / apinotes-derived name when upstream metal-cpp picked something else (`encodeWaitForEvent:value:` → `encodeWait`).", + "additionalProperties": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" } + }, + "prepend": { + "type": "string", + "description": "ObjC-class-only. Raw C++ source injected at the top of the generated class body, before the auto-emitted `alloc()`/`init()`. Use multi-line YAML scalars (`|`) to keep formatting." + }, + "append": { + "type": "string", + "description": "ObjC-class-only. Raw C++ source injected at the bottom of the generated class body. Useful for class-scoped macros (`MTLSTR`) or hand-written conveniences." + }, + "skip": { + "type": "boolean", + "description": "Struct-only. Register the type with the resolver so cross-references resolve, but don't emit a definition. Use for structs whose canonical definition lives in a kept-upstream header (e.g. `MTLPackedFloat3` lives in `MTLAccelerationStructureTypes.hpp`).", + "default": false + }, + "packed": { + "type": "boolean", + "description": "Struct-only. Emit the struct with the `__PACKED` macro to match upstream metal-cpp's layout for SDK structs marked `_MTL_PACKED` (the SDK headers don't carry `__attribute__((packed))` directly).", + "default": false + }, + "cpp_name": { + "type": "string", + "description": "Struct-only. Explicit fully-qualified C++ name to register for a skipped struct, overriding the default prefix-strip. Useful when an SDK struct lives in a sibling namespace upstream (`MTL4BufferRange` lives in `MTL4::` even though the SDK name starts with `MTL`)." + }, + "members": { + "type": "string", + "description": "Struct-only. Raw C++ source injected at the top of the generated struct body, before the field declarations. Use for hand-written constructors and `Make`/`Default` factories that mirror upstream metal-cpp's convenience helpers (`MTL::Size::Make`, `MTL::Region::Make3D`)." + } + } + } + } +} diff --git a/thirdparty/metal-cpp/tools/config.yaml b/thirdparty/metal-cpp/tools/config.yaml new file mode 100644 index 000000000000..e78a5ca13921 --- /dev/null +++ b/thirdparty/metal-cpp/tools/config.yaml @@ -0,0 +1,940 @@ +# yaml-language-server: $schema=./config.schema.json + +sdks: + - name: macos + xcrun_sdk: macosx + - name: iphoneos + xcrun_sdk: iphoneos + - name: tvos + xcrun_sdk: appletvos + - name: visionos + xcrun_sdk: xros + +frameworks: + # ── Foundation ───────────────────────────────────────────────────────── + - name: Foundation + namespace: NS + prefix: NS + strip_prefix: NS + # Generate once from the first applicable SDK (macos). Multi-SDK + # would otherwise let visionos overwrite macos output, losing methods + # whose `API_AVAILABLE(...)` omits visionos (libclang excludes them + # from the AST when parsing against the visionOS SDK). + shared: true + sdks: [macos, iphoneos, tvos, visionos] + include: + classes: + - NSArray + - NSAutoreleasePool + - NSBundle + - NSCondition + - NSCopying + - NSData + - NSDate + - NSDictionary + - NSEnumerator + - NSError + - NSFastEnumeration + - NSLocking + - NSNotification + - NSNotificationCenter + - NSNumber + - NSObject + - NSProcessInfo + - NSReferencing + - NSSecureCoding + - NSSet + - NSString + - NSURL + - NSValue + exclude: + methods: ["(?i)deprecated"] + classes: + # On-demand-resource API; pulls in a chain of NSBundle internals not + # used by Godot. Upstream metal-cpp doesn't wrap it either. + - NSBundleResourceRequest + # Mutable collection variants are unused by the driver and upstream + # metal-cpp doesn't wrap them; skip to keep the surface small. + - NSMutableArray + - NSMutableData + - NSMutableDictionary + - NSMutableSet + # Hand-written infrastructure copied verbatim from upstream metal-cpp. + keep_upstream: + - NSDefines # _NS_EXPORT, _NS_INLINE, _NS_ENUM, _NS_PACKED, ... + - NSObjCRuntime # NS::Integer / NS::UInteger / NS::ComparisonResult + - NSRange # NS::Range struct with hand-written helpers + - NSSharedPtr # NS::SharedPtr / NS::TransferPtr / NS::RetainPtr + - NSTypes # NS::TimeInterval, NS::OperatingSystemVersion + # NSObject (CRTP root) and NSEnumerator (templated container) are + # both emitted by the generator — see generate_nsobject_header / + # generate_nsenumerator_header. They route through the same + # `_objc_msgSend$` stub trampolines as every other wrapper. + headers: + - NSArray.h + - NSAutoreleasePool.h + - NSBundle.h + - NSData.h + - NSDate.h + - NSDictionary.h + - NSError.h + - NSLock.h + - NSNotification.h + - NSNumber.h + - NSValue.h # actually owns @interface NSNumber : NSValue + - NSObject.h + - NSProcessInfo.h + - NSSet.h + - NSString.h + - NSURL.h + class_overrides: + # Upstream metal-cpp keeps the `WithPath` qualifier on NSURL init + # selectors (no SwiftName entry to drive the rename); heuristic strips it. + NSURL: + rename: + "initFileURLWithPath:": initFileURLWithPath + include: + members: + - fileSystemRepresentation + - 'fileURLWithPath:' + - 'initFileURLWithPath:' + - 'initWithString:' + NSString: + include: + members: + - UTF8String + - 'cStringUsingEncoding:' + - 'caseInsensitiveCompare:' + - 'characterAtIndex:' + - fileSystemRepresentation + - 'initWithBytes:length:encoding:' + - 'initWithBytesNoCopy:length:encoding:freeWhenDone:' + - 'initWithCString:encoding:' + - 'initWithString:' + - 'isEqualToString:' + - length + - 'lengthOfBytesUsingEncoding:' + - 'maximumLengthOfBytesUsingEncoding:' + - 'rangeOfString:options:' + - string + - 'stringByAppendingString:' + - 'stringWithCString:encoding:' + - 'stringWithString:' + append: | + /// Create an NS::String* from a string literal. + #define MTLSTR(literal) (NS::String*)__builtin___CFStringMakeConstantString("" literal "") + + template + [[deprecated("please use MTLSTR(str)")]] constexpr const String* MakeConstantString(const char (&str)[_StringLen]) + { + return reinterpret_cast(__CFStringMakeConstantString(str)); + } + # Packed structs — match upstream's `_NS_PACKED` emission. The SDK + # doesn't carry __attribute__((packed)) on these, so libclang can't + # discover them automatically. + # Already defined in kept-upstream NSTypes.hpp; register so cross-refs + # resolve, but skip emission so we don't duplicate. + NSOperatingSystemVersion: {skip: true} + # NSFastEnumerationState lives in upstream's NSEnumerator.hpp, but our + # generator replaces that hpp, so the struct must be emitted here. + NSFastEnumerationState: {packed: true} + NSArray: + include: + members: + - array + - 'arrayWithObject:' + - 'arrayWithObjects:count:' + - count + - 'initWithCoder:' + - 'initWithObjects:count:' + - 'objectAtIndex:' + - objectEnumerator + NSBundle: + include: + members: + - 'URLForAuxiliaryExecutable:' + - allBundles + - allFrameworks + - alloc + - appStoreReceiptURL + - builtInPlugInsPath + - builtInPlugInsURL + - bundleIdentifier + - bundlePath + - bundleURL + - 'bundleWithPath:' + - 'bundleWithURL:' + - executablePath + - executableURL + - infoDictionary + - 'initWithPath:' + - 'initWithURL:' + - isLoaded + - load + - 'loadAndReturnError:' + - localizedInfoDictionary + - 'localizedStringForKey:value:table:' + - mainBundle + - 'objectForInfoDictionaryKey:' + - 'pathForAuxiliaryExecutable:' + - 'preflightAndReturnError:' + - privateFrameworksPath + - privateFrameworksURL + - resourcePath + - resourceURL + - sharedFrameworksPath + - sharedFrameworksURL + - sharedSupportPath + - sharedSupportURL + - unload + NSCondition: + exclude: + members: + - name + NSData: + include: + members: + - bytes + - length + - mutableBytes + NSDate: + include: + members: + - 'dateWithTimeIntervalSinceNow:' + NSDictionary: + include: + members: + - count + - dictionary + - 'dictionaryWithObject:forKey:' + - 'dictionaryWithObjects:forKeys:count:' + - 'initWithCoder:' + - 'initWithObjects:forKeys:count:' + - keyEnumerator + - 'objectForKey:' + NSError: + include: + members: + - code + - domain + - 'errorWithDomain:code:userInfo:' + - 'initWithDomain:code:userInfo:' + - localizedDescription + - localizedFailureReason + - localizedRecoveryOptions + - localizedRecoverySuggestion + - userInfo + NSFastEnumeration: + include: + members: + - allObjects + - 'countByEnumeratingWithState:objects:count:' + - nextObject + NSNotification: + include: + members: + - name + - object + - userInfo + NSNotificationCenter: + include: + members: + - 'addObserverName:object:queue:block:' + - defaultCenter + - 'removeObserver:' + NSNumber: + exclude: + members: + - 'initWithInteger:' + - 'initWithUnsignedInteger:' + - 'numberWithInteger:' + - 'numberWithUnsignedInteger:' + NSObject: + include: + members: + - alloc + - debugDescription + - description + - hash + - init + - 'isEqual:' + - 'methodSignatureForSelector:' + - 'respondsToSelector:' + NSProcessInfo: + exclude: + members: + - iOSAppOnMac + - iOSAppOnVision + - isiOSAppOnVision + - operatingSystemName + NSSet: + include: + members: + - count + - 'initWithCoder:' + - 'initWithObjects:count:' + - objectEnumerator + NSValue: + include: + members: + - 'getValue:size:' + - 'initWithBytes:objCType:' + - 'initWithCoder:' + - 'isEqualToValue:' + - objCType + - pointerValue + - 'valueWithBytes:objCType:' + - 'valueWithPointer:' + - name: Metal + namespace: MTL + prefix: MTL + strip_prefix: MTL + shared: true + sdks: [macos, iphoneos, tvos, visionos] + # Match upstream metal-cpp: Metal.hpp also surfaces MTL4 contents, which + # live in Metal/ alongside MTL classes but in the MTL4:: namespace. + # MTLDeviceExtras.hpp is a hand-written supplement that adds the + # MTL::CreateSystemDefaultDevice free function. + extra_umbrella_includes: [Metal4.hpp, MTLDeviceExtras.hpp] + include: + classes: + - MTLAccelerationStructure + - MTLAccelerationStructureBoundingBoxGeometryDescriptor + - MTLAccelerationStructureCommandEncoder + - MTLAccelerationStructureCurveGeometryDescriptor + - MTLAccelerationStructureDescriptor + - MTLAccelerationStructureGeometryDescriptor + - MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor + - MTLAccelerationStructureMotionCurveGeometryDescriptor + - MTLAccelerationStructureMotionTriangleGeometryDescriptor + - MTLAccelerationStructurePassDescriptor + - MTLAccelerationStructurePassSampleBufferAttachmentDescriptor + - MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray + - MTLAccelerationStructureTriangleGeometryDescriptor + - MTLAllocation + - MTLArchitecture + - MTLArgument + - MTLArgumentDescriptor + - MTLArgumentEncoder + - MTLArrayType + - MTLAttribute + - MTLAttributeDescriptor + - MTLAttributeDescriptorArray + - MTLBinaryArchive + - MTLBinaryArchiveDescriptor + - MTLBinding + - MTLBlitCommandEncoder + - MTLBlitPassDescriptor + - MTLBlitPassSampleBufferAttachmentDescriptor + - MTLBlitPassSampleBufferAttachmentDescriptorArray + - MTLBuffer + - MTLBufferBinding + - MTLBufferLayoutDescriptor + - MTLBufferLayoutDescriptorArray + - MTLCaptureDescriptor + - MTLCaptureManager + - MTLCaptureScope + - MTLCommandBuffer + - MTLCommandBufferDescriptor + - MTLCommandBufferEncoderInfo + - MTLCommandEncoder + - MTLCommandQueue + - MTLCommandQueueDescriptor + - MTLCompileOptions + - MTLComputeCommandEncoder + - MTLComputePassDescriptor + - MTLComputePassSampleBufferAttachmentDescriptor + - MTLComputePassSampleBufferAttachmentDescriptorArray + - MTLComputePipelineDescriptor + - MTLComputePipelineReflection + - MTLComputePipelineState + - MTLCounter + - MTLCounterSampleBuffer + - MTLCounterSampleBufferDescriptor + - MTLCounterSet + - MTLDepthStencilDescriptor + - MTLDepthStencilState + - MTLDevice + - MTLDrawable + - MTLDynamicLibrary + - MTLEvent + - MTLFence + - MTLFunction + - MTLFunctionConstant + - MTLFunctionConstantValues + - MTLFunctionDescriptor + - MTLFunctionHandle + - MTLFunctionLog + - MTLFunctionLogDebugLocation + - MTLFunctionReflection + - MTLFunctionStitchingAttribute + - MTLFunctionStitchingAttributeAlwaysInline + - MTLFunctionStitchingFunctionNode + - MTLFunctionStitchingGraph + - MTLFunctionStitchingInputNode + - MTLFunctionStitchingNode + - MTLHeap + - MTLHeapDescriptor + - MTLIOCommandBuffer + - MTLIOCommandQueue + - MTLIOCommandQueueDescriptor + - MTLIOFileHandle + - MTLIOScratchBuffer + - MTLIOScratchBufferAllocator + - MTLIndirectCommandBuffer + - MTLIndirectCommandBufferDescriptor + - MTLIndirectComputeCommand + - MTLIndirectInstanceAccelerationStructureDescriptor + - MTLIndirectRenderCommand + - MTLInstanceAccelerationStructureDescriptor + - MTLIntersectionFunctionDescriptor + - MTLIntersectionFunctionTable + - MTLIntersectionFunctionTableDescriptor + - MTLLibrary + - MTLLinkedFunctions + - MTLLogContainer + - MTLLogState + - MTLLogStateDescriptor + - MTLLogicalToPhysicalColorAttachmentMap + - MTLMeshRenderPipelineDescriptor + - MTLMotionKeyframeData + - MTLObjectPayloadBinding + - MTLParallelRenderCommandEncoder + - MTLPipelineBufferDescriptor + - MTLPipelineBufferDescriptorArray + - MTLPointerType + - MTLPrimitiveAccelerationStructureDescriptor + - MTLRasterizationRateLayerArray + - MTLRasterizationRateLayerDescriptor + - MTLRasterizationRateMap + - MTLRasterizationRateMapDescriptor + - MTLRasterizationRateSampleArray + - MTLRenderCommandEncoder + - MTLRenderPassAttachmentDescriptor + - MTLRenderPassColorAttachmentDescriptor + - MTLRenderPassColorAttachmentDescriptorArray + - MTLRenderPassDepthAttachmentDescriptor + - MTLRenderPassDescriptor + - MTLRenderPassSampleBufferAttachmentDescriptor + - MTLRenderPassSampleBufferAttachmentDescriptorArray + - MTLRenderPassStencilAttachmentDescriptor + - MTLRenderPipelineColorAttachmentDescriptor + - MTLRenderPipelineColorAttachmentDescriptorArray + - MTLRenderPipelineDescriptor + - MTLRenderPipelineFunctionsDescriptor + - MTLRenderPipelineReflection + - MTLRenderPipelineState + - MTLResidencySet + - MTLResidencySetDescriptor + - MTLResource + - MTLResourceStateCommandEncoder + - MTLResourceStatePassDescriptor + - MTLResourceStatePassSampleBufferAttachmentDescriptor + - MTLResourceStatePassSampleBufferAttachmentDescriptorArray + - MTLResourceViewPool + - MTLResourceViewPoolDescriptor + - MTLSamplerDescriptor + - MTLSamplerState + - MTLSharedEvent + - MTLSharedEventHandle + - MTLSharedEventListener + - MTLSharedTextureHandle + - MTLStageInputOutputDescriptor + - MTLStencilDescriptor + - MTLStitchedLibraryDescriptor + - MTLStructMember + - MTLStructType + - MTLTensor + - MTLTensorBinding + - MTLTensorDescriptor + - MTLTensorExtents + - MTLTensorReferenceType + - MTLTexture + - MTLTextureBinding + - MTLTextureDescriptor + - MTLTextureReferenceType + - MTLTextureViewDescriptor + - MTLTextureViewPool + - MTLThreadgroupBinding + - MTLTileRenderPipelineColorAttachmentDescriptor + - MTLTileRenderPipelineColorAttachmentDescriptorArray + - MTLTileRenderPipelineDescriptor + - MTLType + - MTLVertexAttribute + - MTLVertexAttributeDescriptor + - MTLVertexAttributeDescriptorArray + - MTLVertexBufferLayoutDescriptor + - MTLVertexBufferLayoutDescriptorArray + - MTLVertexDescriptor + - MTLVisibleFunctionTable + - MTLVisibleFunctionTableDescriptor + exclude: + methods: ["(?i)deprecated"] + keep_upstream: + - MTLDefines # _MTL_INLINE / _MTL_ENUM / _MTL_PACKED + - MTLGPUAddress # GPUAddress typedef + # Constructors / operator[] over anonymous-union SIMD layouts the + # parser can't introspect (MTL::PackedFloat3, PackedFloat4x3, + # AxisAlignedBoundingBox, PackedFloatQuaternion). + - MTLAccelerationStructureTypes + # Only here because MTLAccelerationStructureTypes.hpp `#include`s it. + # Otherwise unused — generated wrappers dispatch via _objc_msgSend$. + - MTLPrivate + headers: + # Type / pixel-format / enum headers parsed first so enums register + # before the headers that reference them. + - MTLTypes.h + - MTLPixelFormat.h + - MTLDataType.h + - MTLStageInputOutputDescriptor.h + - MTLArgument.h + - MTLResource.h + - MTLDepthStencil.h + - MTLSampler.h + - MTLRenderPass.h + - MTLRenderPipeline.h + - MTLAccelerationStructure.h + - MTLAccelerationStructureCommandEncoder.h + - MTLAccelerationStructureTypes.h + - MTLAllocation.h + - MTLArgument.h + - MTLArgumentEncoder.h + - MTLBinaryArchive.h + - MTLBlitCommandEncoder.h + - MTLBlitPass.h + - MTLBuffer.h + - MTLCaptureManager.h + - MTLCaptureScope.h + - MTLCommandBuffer.h + - MTLCommandEncoder.h + - MTLCommandQueue.h + - MTLComputeCommandEncoder.h + - MTLComputePass.h + - MTLComputePipeline.h + - MTLCounters.h + - MTLDataType.h + - MTLDepthStencil.h + - MTLDevice.h + - MTLDeviceCertification.h + - MTLDrawable.h + - MTLDynamicLibrary.h + - MTLEvent.h + - MTLFence.h + - MTLFunctionConstantValues.h + - MTLFunctionDescriptor.h + - MTLFunctionHandle.h + - MTLFunctionLog.h + - MTLFunctionStitching.h + - MTLHeap.h + - MTLIOCommandBuffer.h + - MTLIOCommandQueue.h + - MTLIOCompressor.h + - MTLIndirectCommandBuffer.h + - MTLIndirectCommandEncoder.h + - MTLIntersectionFunctionTable.h + - MTLLibrary.h + - MTLLinkedFunctions.h + - MTLLogState.h + - MTLParallelRenderCommandEncoder.h + - MTLPipeline.h + - MTLPixelFormat.h + - MTLRasterizationRate.h + - MTLRenderCommandEncoder.h + - MTLRenderPass.h + - MTLRenderPipeline.h + - MTLResidencySet.h + - MTLResource.h + - MTLResourceStateCommandEncoder.h + - MTLResourceStatePass.h + - MTLResourceViewPool.h + - MTLSampler.h + - MTLStageInputOutputDescriptor.h + - MTLTensor.h + - MTLTexture.h + - MTLTextureViewPool.h + - MTLVertexDescriptor.h + - MTLVisibleFunctionTable.h + class_overrides: + # Apple-style selector groupings where the first word echoes the + # first arg (`setBlendColorRed:green:blue:alpha:` — Red/green/blue/ + # alpha is a color quartet). Upstream metal-cpp drops the Red. + # `setStencilFrontReferenceValue:backReferenceValue:` is the same + # pattern — front/back is a value pair — and upstream collapses to + # the plural noun. Apinotes carries `setBlendColor` already. + # `barrierAfterQueueStages:beforeStages:` is one of several MTL4 + # barrier variants on MTLCommandEncoder (`barrierAfterStages`, + # `barrierAfterEncoderStages`, ...). Apinotes maps it to plain + # `barrier`, which collides at the call site with the bare `barrier` + # selector and obscures which variant is being called. Keep the + # descriptive form. + MTLCommandEncoder: + rename: + "barrierAfterQueueStages:beforeStages:": barrierAfterQueueStages + MTLRenderCommandEncoder: + rename: + "setBlendColorRed:green:blue:alpha:": setBlendColor + "setStencilFrontReferenceValue:backReferenceValue:": setStencilReferenceValues + # `encodeWaitForEvent:value:` — apinotes' SwiftName matches the + # selector verbatim, but upstream metal-cpp shortens to `encodeWait`. + MTLCommandBuffer: + rename: + "encodeWaitForEvent:value:": encodeWait + # Two `presentDrawable:...` overloads have the same C++ signature + # (Drawable*, CFTimeInterval); without distinct names the + # signature-dedup pass drops one. Names match upstream metal-cpp. + "presentDrawable:atTime:": presentDrawableAtTime + "presentDrawable:afterMinimumDuration:": presentDrawableAfterMinimumDuration + # Heuristic over-strips `For` on these selectors; apinotes has + # no SwiftName entry so it can't restore them. Match upstream. + MTLDevice: + rename: + "minimumLinearTextureAlignmentForPixelFormat:": minimumLinearTextureAlignmentForPixelFormat + "minimumTextureBufferAlignmentForPixelFormat:": minimumTextureBufferAlignmentForPixelFormat + # These live in upstream's hand-written MTLAccelerationStructureTypes.hpp + # which we keep verbatim — it carries C++ constructors / operator + # overloads the SDK headers expose only as anonymous-union magic the + # parser can't reach. Register so resolution works; skip emission. + exclude: + members: + - barycentricCoordsSupported + - programmableSamplePositionsSupported + - rasterOrderGroupsSupported + - supportsPlacementSparse + MTLPackedFloat3: {skip: true} + MTLPackedFloat4x3: {skip: true} + MTLAxisAlignedBoundingBox: {skip: true} + MTLPackedFloatQuaternion: {skip: true} + MTLComponentTransform: {skip: true} + # Upstream MTLAccelerationStructureTypes.hpp puts BufferRange in MTL4:: + # (not MTL::) — pin the resolved cpp name so refs match. + MTL4BufferRange: {skip: true, cpp_name: "MTL4::BufferRange"} + # Packed structs — every upstream Metal struct ending in `_MTL_PACKED;`. + # The SDK doesn't carry __attribute__((packed)), so we declare it here. + MTL4UpdateSparseTextureMappingOperation: {packed: true} + MTL4CopySparseTextureMappingOperation: {packed: true} + MTL4UpdateSparseBufferMappingOperation: {packed: true} + MTL4CopySparseBufferMappingOperation: {packed: true} + MTL4TimestampHeapEntry: {packed: true} + # MTL4BufferRange — see skip entry above; upstream owns it. + MTLAccelerationStructureInstanceDescriptor: {packed: true} + MTLAccelerationStructureUserIDInstanceDescriptor: {packed: true} + MTLAccelerationStructureMotionInstanceDescriptor: {packed: true} + MTLIndirectAccelerationStructureInstanceDescriptor: {packed: true} + MTLIndirectAccelerationStructureMotionInstanceDescriptor: {packed: true} + # MTLPackedFloat3 / 4x3 / Quaternion / AxisAlignedBoundingBox / + # ComponentTransform are declared with `skip: true` above — + # kept-upstream definitions own them. + MTLDispatchThreadgroupsIndirectArguments: {packed: true} + MTLDispatchThreadsIndirectArguments: {packed: true} + MTLStageInRegionIndirectArguments: {packed: true} + MTLCounterResultTimestamp: {packed: true} + MTLCounterResultStageUtilization: {packed: true} + MTLCounterResultStatistic: {packed: true} + MTLAccelerationStructureSizes: {packed: true} + MTLSizeAndAlign: {packed: true} + MTLIndirectCommandBufferExecutionRange: {packed: true} + MTLIntersectionFunctionBufferArguments: {packed: true} + MTLScissorRect: {packed: true} + MTLViewport: {packed: true} + MTLDrawPrimitivesIndirectArguments: {packed: true} + MTLDrawIndexedPrimitivesIndirectArguments: {packed: true} + MTLVertexAmplificationViewMapping: {packed: true} + MTLDrawPatchIndirectArguments: {packed: true} + MTLQuadTessellationFactorsHalf: {packed: true} + MTLTriangleTessellationFactorsHalf: {packed: true} + MTLMapIndirectArguments: {packed: true} + # Upstream metal-cpp ships constructors + `Make`/`Default` factories on + # these struct types; the SDK only exposes plain C structs so we inject + # the convenience members here. + MTLTextureSwizzleChannels: + packed: true + members: | + TextureSwizzleChannels() = default; + TextureSwizzleChannels(MTL::TextureSwizzle r, MTL::TextureSwizzle g, MTL::TextureSwizzle b, MTL::TextureSwizzle a) + : red(r), green(g), blue(b), alpha(a) {} + static TextureSwizzleChannels Default() { return TextureSwizzleChannels(); } + static TextureSwizzleChannels Make(MTL::TextureSwizzle r, MTL::TextureSwizzle g, MTL::TextureSwizzle b, MTL::TextureSwizzle a) { + return TextureSwizzleChannels(r, g, b, a); + } + MTLOrigin: + packed: true + members: | + Origin() = default; + Origin(NS::UInteger x_, NS::UInteger y_, NS::UInteger z_) : x(x_), y(y_), z(z_) {} + static Origin Make(NS::UInteger x_, NS::UInteger y_, NS::UInteger z_) { return Origin(x_, y_, z_); } + MTLSize: + packed: true + members: | + Size() = default; + Size(NS::UInteger w, NS::UInteger h, NS::UInteger d) : width(w), height(h), depth(d) {} + static Size Make(NS::UInteger w, NS::UInteger h, NS::UInteger d) { return Size(w, h, d); } + MTLRegion: + packed: true + members: | + Region() = default; + Region(NS::UInteger x, NS::UInteger width) : origin(x, 0, 0), size(width, 1, 1) {} + Region(NS::UInteger x, NS::UInteger y, NS::UInteger width, NS::UInteger height) : origin(x, y, 0), size(width, height, 1) {} + Region(NS::UInteger x, NS::UInteger y, NS::UInteger z, NS::UInteger width, NS::UInteger height, NS::UInteger depth) + : origin(x, y, z), size(width, height, depth) {} + static Region Make1D(NS::UInteger x, NS::UInteger width) { return Region(x, width); } + static Region Make2D(NS::UInteger x, NS::UInteger y, NS::UInteger width, NS::UInteger height) { return Region(x, y, width, height); } + static Region Make3D(NS::UInteger x, NS::UInteger y, NS::UInteger z, NS::UInteger width, NS::UInteger height, NS::UInteger depth) { + return Region(x, y, z, width, height, depth); + } + MTLSamplePosition: + packed: true + members: | + SamplePosition() = default; + SamplePosition(float x_, float y_) : x(x_), y(y_) {} + static SamplePosition Make(float x_, float y_) { return SamplePosition(x_, y_); } + MTLResourceID: {packed: true} + MTLClearColor: + packed: true + members: | + ClearColor() = default; + ClearColor(double r, double g, double b, double a) : red(r), green(g), blue(b), alpha(a) {} + static ClearColor Make(double r, double g, double b, double a) { return ClearColor(r, g, b, a); } + + # ── Metal4 (virtual framework sharing Metal/ but in MTL4:: namespace) ── + MTLCaptureManager: + exclude: + members: + - init + MTLCaptureScope: + exclude: + members: + - mtl4CommandQueue + MTLFunctionReflection: + include: + members: + - bindings + MTLRasterizationRateLayerDescriptor: + exclude: + members: + - init + MTLSharedEventListener: + exclude: + members: + - init + - name: Metal4 + namespace: MTL4 + prefix: MTL4 + strip_prefix: MTL4 + shared: true + sdk_framework: Metal # SDK headers come from Metal.framework + output_subdir: Metal # ...but write into metal-cpp/Metal/ + sdks: [macos, iphoneos, tvos, visionos] + include: + classes: + - MTL4AccelerationStructureBoundingBoxGeometryDescriptor + - MTL4AccelerationStructureCurveGeometryDescriptor + - MTL4AccelerationStructureDescriptor + - MTL4AccelerationStructureGeometryDescriptor + - MTL4AccelerationStructureMotionBoundingBoxGeometryDescriptor + - MTL4AccelerationStructureMotionCurveGeometryDescriptor + - MTL4AccelerationStructureMotionTriangleGeometryDescriptor + - MTL4AccelerationStructureTriangleGeometryDescriptor + - MTL4Archive + - MTL4ArgumentTable + - MTL4ArgumentTableDescriptor + - MTL4BinaryFunction + - MTL4BinaryFunctionDescriptor + - MTL4CommandAllocator + - MTL4CommandAllocatorDescriptor + - MTL4CommandBuffer + - MTL4CommandBufferOptions + - MTL4CommandEncoder + - MTL4CommandQueue + - MTL4CommandQueueDescriptor + - MTL4CommitFeedback + - MTL4CommitOptions + - MTL4Compiler + - MTL4CompilerDescriptor + - MTL4CompilerTask + - MTL4CompilerTaskOptions + - MTL4ComputeCommandEncoder + - MTL4ComputePipelineDescriptor + - MTL4CounterHeap + - MTL4CounterHeapDescriptor + - MTL4FunctionDescriptor + - MTL4IndirectInstanceAccelerationStructureDescriptor + - MTL4InstanceAccelerationStructureDescriptor + - MTL4LibraryDescriptor + - MTL4LibraryFunctionDescriptor + - MTL4MachineLearningCommandEncoder + - MTL4MachineLearningPipelineDescriptor + - MTL4MachineLearningPipelineReflection + - MTL4MachineLearningPipelineState + - MTL4MeshRenderPipelineDescriptor + - MTL4PipelineDataSetSerializer + - MTL4PipelineDataSetSerializerDescriptor + - MTL4PipelineDescriptor + - MTL4PipelineOptions + - MTL4PipelineStageDynamicLinkingDescriptor + - MTL4PrimitiveAccelerationStructureDescriptor + - MTL4RenderCommandEncoder + - MTL4RenderPassDescriptor + - MTL4RenderPipelineBinaryFunctionsDescriptor + - MTL4RenderPipelineColorAttachmentDescriptor + - MTL4RenderPipelineColorAttachmentDescriptorArray + - MTL4RenderPipelineDescriptor + - MTL4RenderPipelineDynamicLinkingDescriptor + - MTL4SpecializedFunctionDescriptor + - MTL4StaticLinkingDescriptor + - MTL4StitchedFunctionDescriptor + - MTL4TileRenderPipelineDescriptor + exclude: + methods: ["(?i)deprecated"] + class_overrides: + MTL4RenderCommandEncoder: + rename: + "setBlendColorRed:green:blue:alpha:": setBlendColor + "setStencilFrontReferenceValue:backReferenceValue:": setStencilReferenceValues + # Upstream MTL4::CommandQueue collapses both `waitForEvent:value:` and + # `waitForDrawable:` to `wait` (overloaded). Apinotes' SwiftName keeps + # the full selector verbatim. + MTL4CommandQueue: + rename: + "waitForEvent:value:": wait + "waitForDrawable:": wait + # Owned by upstream MTLAccelerationStructureTypes.hpp (in MTL4 namespace). + MTL4BufferRange: {skip: true} + # Packed structs that need _MTL4_PACKED. + MTL4UpdateSparseTextureMappingOperation: {packed: true} + MTL4CopySparseTextureMappingOperation: {packed: true} + MTL4UpdateSparseBufferMappingOperation: {packed: true} + MTL4CopySparseBufferMappingOperation: {packed: true} + MTL4TimestampHeapEntry: {packed: true} + headers: + - MTL4AccelerationStructure.h + - MTL4Archive.h + - MTL4ArgumentTable.h + - MTL4BinaryFunction.h + - MTL4BinaryFunctionDescriptor.h + - MTL4BufferRange.h + - MTL4CommandAllocator.h + - MTL4CommandBuffer.h + - MTL4CommandEncoder.h + - MTL4CommandQueue.h + - MTL4CommitFeedback.h + - MTL4Compiler.h + - MTL4CompilerTask.h + - MTL4ComputeCommandEncoder.h + - MTL4ComputePipeline.h + - MTL4Counters.h + - MTL4FunctionDescriptor.h + - MTL4LibraryDescriptor.h + - MTL4LibraryFunctionDescriptor.h + - MTL4LinkingDescriptor.h + - MTL4MachineLearningCommandEncoder.h + - MTL4MachineLearningPipeline.h + - MTL4MeshRenderPipeline.h + - MTL4PipelineDataSetSerializer.h + - MTL4PipelineState.h + - MTL4RenderCommandEncoder.h + - MTL4RenderPass.h + - MTL4RenderPipeline.h + - MTL4SpecializedFunctionDescriptor.h + - MTL4StitchedFunctionDescriptor.h + - MTL4TileRenderPipeline.h + + # ── MetalFX ──────────────────────────────────────────────────────────── + - name: MetalFX + namespace: MTLFX + prefix: MTLFX + strip_prefix: MTLFX + shared: true + sdks: [macos, iphoneos, tvos, visionos] + # MetalFX.hpp also surfaces the MTL4FX:: virtual framework so a single + # client include exposes both namespaces (mirrors Metal.hpp pulling in + # Metal4.hpp). + extra_umbrella_includes: [Metal4FX.hpp] + include: + classes: + - MTLFXFrameInterpolatableScaler + - MTLFXFrameInterpolator + - MTLFXFrameInterpolatorBase + - MTLFXFrameInterpolatorDescriptor + - MTLFXSpatialScaler + - MTLFXSpatialScalerBase + - MTLFXSpatialScalerDescriptor + - MTLFXTemporalDenoisedScaler + - MTLFXTemporalDenoisedScalerBase + - MTLFXTemporalDenoisedScalerDescriptor + - MTLFXTemporalScaler + - MTLFXTemporalScalerBase + - MTLFXTemporalScalerDescriptor + exclude: + methods: ["(?i)deprecated"] + keep_upstream: + - MTLFXDefines + headers: + - MTLFXSpatialScaler.h + - MTLFXTemporalScaler.h + - MTLFXFrameInterpolator.h + - MTLFXTemporalDenoisedScaler.h + + # ── Metal4FX (virtual framework sharing MetalFX/ but in MTL4FX:: namespace) ── + class_overrides: {} + - name: Metal4FX + namespace: MTL4FX + prefix: MTL4FX + strip_prefix: MTL4FX + shared: true + sdk_framework: MetalFX # SDK headers come from MetalFX.framework + output_subdir: MetalFX # ...but write into metal-cpp/MetalFX/ + sdks: [macos, iphoneos, tvos, visionos] + include: + classes: + - MTL4FXFrameInterpolator + - MTL4FXSpatialScaler + - MTL4FXTemporalDenoisedScaler + - MTL4FXTemporalScaler + exclude: + methods: ["(?i)deprecated"] + headers: + - MTL4FXSpatialScaler.h + - MTL4FXTemporalScaler.h + - MTL4FXFrameInterpolator.h + - MTL4FXTemporalDenoisedScaler.h + + # ── QuartzCore ───────────────────────────────────────────────────────── + class_overrides: {} + - name: QuartzCore + namespace: CA + prefix: CA + strip_prefix: CA + shared: true + sdks: [macos, iphoneos, tvos, visionos] + include: + classes: + - CALayer + - CAMetalDrawable + - CAMetalLayer + exclude: + methods: ["(?i)deprecated"] + keep_upstream: + - CADefines + headers: + - CAEDRMetadata.h + - CALayer.h + - CAMetalLayer.h + class_overrides: + CALayer: + include: + members: + - contentsHeadroom + - opaque + - preferredDynamicRange + - 'setContentsHeadroom:' + - 'setOpaque:' + - 'setPreferredDynamicRange:' + - 'setWantsExtendedDynamicRangeContent:' + - wantsExtendedDynamicRangeContent + CAMetalLayer: + exclude: + members: + - EDRMetadata + - developerHUDProperties + - preferredDevice + - presentsWithTransaction diff --git a/thirdparty/metal-cpp/tools/generate.py b/thirdparty/metal-cpp/tools/generate.py new file mode 100644 index 000000000000..e4d1ec131bc5 --- /dev/null +++ b/thirdparty/metal-cpp/tools/generate.py @@ -0,0 +1,854 @@ +#!/usr/bin/env python3 +"""Generate metal-cpp style C++ wrappers for Objective-C frameworks. + +Parses ObjC framework headers using libclang and generates C++ wrappers +following the same patterns as Apple's metal-cpp (sendMessage, selector +registration, inline implementations). + +Usage: + python generate.py --metal-cpp PATH # all SDKs + python generate.py --metal-cpp PATH --sdk macos # single SDK + python generate.py --metal-cpp PATH --strict # fail on unresolvable types + +`--metal-cpp` points at Apple's metal-cpp checkout; the hand-written hpps +listed under each framework's `keep_upstream:` are copied verbatim from +there into the generated tree. +""" + +from __future__ import annotations + +import argparse +import logging +import os +import re +import shutil +import subprocess +import sys +from dataclasses import dataclass, field +from pathlib import Path +from typing import Optional + +import yaml + +from metalcpp_common import ( # noqa: F401 – re-exported for backwards compat + BUILTIN_TYPE_MAP, + PASSTHROUGH_TYPES, + SYSTEM_HEADER_FOR_TYPE, + Availability, + CodeGenerator, + FrameworkData, + ObjCClass, + ObjCEnum, + ObjCEnumValue, + ObjCMethod, + ObjCParam, + ObjCParser, + ObjCProperty, + TypeResolver, + parse_apinotes_renames, + strip_objc_prefix, + strip_objc_prefix_aggressive, +) + +log = logging.getLogger(__name__) + + +# ── Parallel parse workers ──────────────────────────────────────────────── +# libclang holds the GIL while parsing, so threads serialize. ProcessPool +# spawns one worker per CPU; each builds its own `ObjCParser` once and reuses +# it across header parses (avoiding the ~100ms libclang Index setup per call). +_WORKER_PARSER: Optional[ObjCParser] = None + + +def _parse_worker_init(sdk_path: str) -> None: + """ProcessPoolExecutor initializer — one ObjCParser per worker.""" + global _WORKER_PARSER + _WORKER_PARSER = ObjCParser(Path(sdk_path)) + + +def _parse_worker(header_path: str) -> "FrameworkData": + """Parse one header in the worker process; returns the picklable + FrameworkData. ObjCParser owns libclang resources that aren't picklable, + so we set it once via the initializer and never cross the process + boundary with it.""" + assert _WORKER_PARSER is not None, "worker not initialized" + return _WORKER_PARSER.parse_header(Path(header_path)) + +TOOL_DIR = Path(__file__).resolve().parent +ROOT_DIR = TOOL_DIR.parent # thirdparty/metal-cpp/ + + +# ── Filtering ───────────────────────────────────────────────────────────── + +def matches_any(name: str, patterns: list[str]) -> bool: + """Check if name matches any of the given regex patterns.""" + return any(re.fullmatch(p, name) for p in patterns) + + +def _override_for(fw: "FrameworkConfig", name: str) -> dict: + """Look up a class_overrides entry for `name`, falling back to its + canonical (underscore-stripped) form. Returns `{}` when no entry exists.""" + return (fw.class_overrides.get(name) + or fw.class_overrides.get(name.lstrip("_")) + or {}) + + +def filter_class( + cls: ObjCClass, + fw_exclude: dict, + class_override: Optional[dict], + apinotes_renames: Optional[dict[str, str]] = None, +) -> Optional[ObjCClass]: + """Apply include/exclude filters to a class. Returns filtered copy or None. + + `apinotes_renames` is the `{selector: cpp_name}` map for this class derived + from the SDK's `.apinotes` SwiftName entries. Applied before any + `class_override["rename"]`, so config overrides win. + """ + props = list(cls.properties) + methods = list(cls.methods) + + if class_override: + inc = class_override.get("include", {}) + exc = class_override.get("exclude", {}) + + # Per-class `members:` is a single allow-list keyed by ObjC selector + # (for methods) or property name (for properties) — the SDK-stable + # identifier in both cases. When present, anything not in the list + # is dropped. A property also matches if its setter-form selector + # (`set:`) is in the list — covers Apple's `@property + # (getter=isFoo) BOOL foo;` form, where the getter selector differs + # from the property name and only the setter form is hand-known. + def _prop_matches(p, allow): + if matches_any(p.name, allow): + return True + return matches_any(f"set{p.name[0].upper()}{p.name[1:]}:", allow) + + if inc and "members" in inc: + allow = inc["members"] + props = [p for p in props if _prop_matches(p, allow)] + methods = [m for m in methods if matches_any(m.selector, allow)] + + if exc_members := exc.get("members"): + props = [p for p in props if not _prop_matches(p, exc_members)] + methods = [m for m in methods if not matches_any(m.selector, exc_members)] + + # Framework-level excludes + if exc_m := fw_exclude.get("methods"): + methods = [m for m in methods if not matches_any(m.selector, exc_m)] + if exc_p := fw_exclude.get("properties"): + props = [p for p in props if not matches_any(p.name, exc_p)] + + # Even empty classes get emitted — subclasses inherit them, and the + # umbrella header expects every .hpp the resolver knows about + # to exist on disk. + + # Per-method renames. Apinotes SwiftName entries provide canonical short + # names (`setBlendColorRed:green:blue:alpha:` → `setBlendColor`); the + # config `rename:` map wins on conflict so we can override Apple's + # SwiftName when upstream metal-cpp diverged (e.g. `encodeWait`). + renames: dict[str, str] = {} + if apinotes_renames: + renames.update(apinotes_renames) + renames.update((class_override or {}).get("rename", {}) or {}) + if renames: + for m in methods: + if m.selector in renames: + m.cpp_name_override = renames[m.selector] + + return ObjCClass( + name=cls.name, + superclass=cls.superclass, + properties=props, + methods=methods, + protocols=cls.protocols, + is_protocol=cls.is_protocol, + availability=cls.availability, + ) + + +# ── Configuration ───────────────────────────────────────────────────────── + +@dataclass +class SDKConfig: + name: str + xcrun_sdk: str + + +@dataclass +class FrameworkConfig: + name: str + namespace: str + prefix: str + strip_prefix: str + sdks: list[str] + headers: list[str] + include: dict + exclude: dict + class_overrides: dict + # Hand-written hpps copied verbatim from upstream metal-cpp. These are + # infrastructure / hard-to-generate files (NSDefines, NSObject base + # class, MTLAccelerationStructureTypes' SIMD constructors). Listed as + # bare names without `.hpp`. + keep_upstream: list[str] = field(default_factory=list) + # SDK framework directory if it differs from `name` — e.g. a virtual + # framework "Metal4" that pulls MTL4*.h files out of Metal.framework but + # emits them in a separate `MTL4::` namespace. + sdk_framework: str = "" + # Output directory if it differs from `name`. Used by virtual frameworks + # that share an on-disk directory with another (Metal4 sits inside + # Metal/ alongside the MTL classes — matches upstream metal-cpp). + output_subdir: str = "" + # Extra umbrella includes prepended to this framework's .hpp. Lets + # a base framework's umbrella pull in a sibling's (Metal.hpp → + # Metal4.hpp) so client code only includes one umbrella. + extra_umbrella_includes: list[str] = field(default_factory=list) + shared: bool = False + + +def load_config(config_path: Path) -> tuple[list[SDKConfig], list[FrameworkConfig]]: + with open(config_path) as f: + cfg = yaml.safe_load(f) + + sdks = [SDKConfig(**s) for s in cfg["sdks"]] + + frameworks = [] + for fw in cfg["frameworks"]: + frameworks.append(FrameworkConfig( + name=fw["name"], + namespace=fw["namespace"], + prefix=fw["prefix"], + strip_prefix=fw.get("strip_prefix", ""), + sdks=fw["sdks"], + headers=fw["headers"], + include=fw.get("include", {}), + exclude=fw.get("exclude", {}), + class_overrides=fw.get("class_overrides", {}), + keep_upstream=fw.get("keep_upstream", []), + sdk_framework=fw.get("sdk_framework", ""), + output_subdir=fw.get("output_subdir", ""), + extra_umbrella_includes=fw.get("extra_umbrella_includes", []), + shared=fw.get("shared", False), + )) + + return sdks, frameworks + + +def get_sdk_path(xcrun_sdk: str) -> Path: + result = subprocess.run( + ["xcrun", "--sdk", xcrun_sdk, "--show-sdk-path"], + capture_output=True, text=True, check=True, + ) + return Path(result.stdout.strip()) + + +# ── Parsed ObjC framework index ─────────────────────────────────────────── + +ParsedFrameworkData = list[tuple[str, FrameworkData]] + + +def framework_headers_dir(fw: FrameworkConfig, sdk_path: Path) -> Path: + sdk_fw_name = fw.sdk_framework or fw.name + return ( + sdk_path / "System" / "Library" / "Frameworks" + / f"{sdk_fw_name}.framework" / "Headers" + ) + + +def parse_objc_framework_headers( + fw: FrameworkConfig, + sdk_path: Path, +) -> ParsedFrameworkData: + """Parse every configured ObjC header for a framework once. + + The returned data feeds both the SDK-wide symbol index and the later + emitter. This keeps cross-framework type discovery based on libclang's + view of the headers rather than a regex pre-scan. + """ + fw_headers_dir = framework_headers_dir(fw, sdk_path) + header_jobs: list[tuple[str, Path]] = [] + for header_name in fw.headers: + hp = fw_headers_dir / header_name + if not hp.exists(): + log.warning(" Header not found: %s", hp) + continue + header_jobs.append((header_name, hp)) + + import concurrent.futures as _cf + n_workers = max(1, min(len(header_jobs), os.cpu_count() or 1)) + parsed_data: list[FrameworkData] + if n_workers > 1 and len(header_jobs) > 1: + with _cf.ProcessPoolExecutor( + max_workers=n_workers, + initializer=_parse_worker_init, + initargs=(str(sdk_path),), + ) as ex: + parsed_data = list(ex.map( + _parse_worker, + [str(hp) for _, hp in header_jobs], + )) + else: + objc_parser = ObjCParser(sdk_path) + parsed_data = [objc_parser.parse_header(hp) for _, hp in header_jobs] + + parsed: ParsedFrameworkData = [] + for (header_name, _), data in zip(header_jobs, parsed_data): + log.info(" Parsed: %s", header_name) + parsed.append((header_name, data)) + return parsed + + +def register_objc_declarations( + fw: FrameworkConfig, + parsed: ParsedFrameworkData, + resolver: TypeResolver, +) -> None: + """Register classes, enums, blocks, structs, and simple aliases from + already-parsed framework data. + + This is the SDK-wide symbol-index pass. It runs for every ObjC framework + before any header is emitted, so generated signatures can resolve + cross-framework and later-framework references without regex scanning. + """ + for header_name, data in parsed: + source_base = header_name.removesuffix(".h") + cpp_name = strip_objc_prefix(source_base, fw.strip_prefix) + resolver.register(source_base, f"{fw.namespace}::{cpp_name}", + kind="class", framework_prefix=fw.prefix) + + for enum in data.enums: + if not enum.name: + continue + cpp_name = strip_objc_prefix(enum.name, fw.strip_prefix) + cpp_qual = f"{fw.namespace}::{cpp_name}" + resolver.register(enum.name, cpp_qual, + kind="enum", framework_prefix=fw.prefix) + resolver.cpp_to_source[cpp_qual] = source_base + underlying = (resolver.resolve(enum.underlying_type) + if enum.underlying_type else "NS::UInteger") + resolver.enum_underlying[cpp_qual] = underlying + resolver.enum_is_options[cpp_qual] = enum.is_options + + for block in data.blocks: + cpp_name = strip_objc_prefix(block.name, fw.strip_prefix) + resolver.register(block.name, f"{fw.namespace}::{cpp_name}", + kind="block", framework_prefix=fw.prefix) + + for s in data.structs: + override = _override_for(fw, s.name) + if override.get("cpp_name"): + cpp_qual = override["cpp_name"] + else: + cpp_name = strip_objc_prefix_aggressive(s.name.lstrip("_"), fw.strip_prefix) + cpp_qual = f"{fw.namespace}::{cpp_name}" + resolver.register(s.name, cpp_qual, + kind="struct", framework_prefix=fw.prefix) + + for alias_name, underlying in data.primitive_aliases: + alias_cpp = strip_objc_prefix(alias_name, fw.strip_prefix) + alias_cpp_qual = f"{fw.namespace}::{alias_cpp}" + if resolver.kinds.get(alias_cpp_qual) == "enum": + continue + resolved_underlying = resolver.resolve(underlying) + if resolved_underlying.startswith("void"): + continue + resolver.register(alias_name, alias_cpp_qual, + kind="typedef", framework_prefix=fw.prefix) + resolver.alias_underlying[alias_cpp_qual] = resolved_underlying + + for cls in data.classes: + cpp_name = strip_objc_prefix(cls.name, fw.strip_prefix) + resolver.register(cls.name, f"{fw.namespace}::{cpp_name}", + kind="class", framework_prefix=fw.prefix) + resolver.class_to_source[cls.name] = source_base + + +def register_objc_aliases( + fw: FrameworkConfig, + parsed: ParsedFrameworkData, + resolver: TypeResolver, +) -> None: + """Register aliases whose target may live in another header/framework. + + This runs after `register_objc_declarations` has populated base classes + and structs for the whole SDK. + """ + for _, data in parsed: + for alias_name, target_name in data.struct_aliases: + target_cpp_qual = resolver.type_map.get(target_name) + if not target_cpp_qual: + continue + alias_cpp = strip_objc_prefix(alias_name, fw.strip_prefix) + alias_cpp_qual = f"{fw.namespace}::{alias_cpp}" + resolver.register(alias_name, alias_cpp_qual, + kind="typedef", framework_prefix=fw.prefix) + resolver.alias_underlying[alias_cpp_qual] = target_cpp_qual + + for alias_name, target_class in data.class_pointer_aliases: + target_cpp_qual = resolver.type_map.get(target_class) + if not target_cpp_qual: + continue + target_base = target_cpp_qual.rstrip("*").strip() + target_with_ptr = f"{target_base}*" + alias_cpp = strip_objc_prefix(alias_name, fw.strip_prefix) + alias_cpp_qual = f"{fw.namespace}::{alias_cpp}" + resolver.register(alias_name, alias_cpp_qual, + kind="typedef", framework_prefix=fw.prefix) + resolver.alias_underlying[alias_cpp_qual] = target_with_ptr + + +def _ver_tuple(v: str) -> Optional[tuple[int, ...]]: + try: + return tuple(int(x) for x in v.split(".")) + except ValueError: + return None + + +def _introduced_earlier(child: Availability, parent: Availability) -> bool: + """True iff `child` is introduced strictly earlier than `parent` on at + least one shared platform.""" + if not child.platforms or not parent.platforms: + return False + for plat, (c_intro, _, _, c_unavail) in child.platforms.items(): + if c_unavail or not c_intro: + continue + p_entry = parent.platforms.get(plat) + if not p_entry: + continue + p_intro, _, _, p_unavail = p_entry + if p_unavail or not p_intro: + continue + c_tup, p_tup = _ver_tuple(c_intro), _ver_tuple(p_intro) + if c_tup is None or p_tup is None: + continue + if c_tup < p_tup: + return True + return False + + +def suppress_late_base_availability( + parsed_objc: dict[str, ParsedFrameworkData], +) -> None: + """When a class C has a subclass introduced on an earlier OS than C + itself (Apple's pattern of retro-fitting a new base onto a long-lived + protocol — e.g. `MTLAllocation` added in macOS 15 as a base for + `MTLRenderPipelineState` from macOS 10.11), clear C's class-level + availability. + + The C++ language limitation: there's no syntax for "this subclass + inherits from this base only when the OS is new enough." Inheritance + is fully resolved at the subclass's declaration site, so the older + subclass's declaration unconditionally references the newer base — + which then trips -Wunguarded-availability-new because the deployment + target is older than the base's `introduced=`. ObjC's protocol- + conformance model resolves this at runtime; C++ can't. The only + workable answer is to drop the type-declaration availability on the + base. C's own methods keep their per-decl availability, so calls to + base methods on older OSes still get the correct warning.""" + by_name: dict[str, ObjCClass] = {} + for parsed in parsed_objc.values(): + for _, data in parsed: + for cls in data.classes: + by_name[cls.name] = cls + for parent in by_name.values(): + kids = [c for c in by_name.values() if c.superclass == parent.name] + if any(_introduced_earlier(k.availability, parent.availability) + for k in kids): + parent.availability = Availability() + + +def collect_generator_declarations( + fw: FrameworkConfig, + parsed: ParsedFrameworkData, + resolver: TypeResolver, + gen: CodeGenerator, +) -> None: + """Populate a framework generator from parsed data already registered in + the SDK-wide resolver.""" + packed_overrides = { + name for name, ovr in fw.class_overrides.items() + if isinstance(ovr, dict) and ovr.get("packed") + } + + for header_name, data in parsed: + source_base = header_name.removesuffix(".h") + + for enum in data.enums: + gen.collect_enum(enum) + + for block in data.blocks: + gen.collect_block(block) + + for s in data.structs: + override = _override_for(fw, s.name) + if override.get("skip"): + continue + if s.name in packed_overrides or s.name.lstrip("_") in packed_overrides: + s.packed = True + if extra := override.get("members"): + s.extra_members = extra + gen.collect_struct(s) + + for alias_name, target_name in data.struct_aliases: + target_cpp_qual = resolver.type_map.get(target_name) + if not target_cpp_qual: + continue + alias_cpp = strip_objc_prefix(alias_name, fw.strip_prefix) + gen.collect_struct_alias(alias_cpp, target_cpp_qual) + + for alias_name, target_class in data.class_pointer_aliases: + target_cpp_qual = resolver.type_map.get(target_class) + if not target_cpp_qual: + continue + target_base = target_cpp_qual.rstrip("*").strip() + alias_cpp = strip_objc_prefix(alias_name, fw.strip_prefix) + gen.collect_struct_alias(alias_cpp, f"{target_base}*") + + for alias_name, underlying in data.primitive_aliases: + alias_cpp = strip_objc_prefix(alias_name, fw.strip_prefix) + alias_cpp_qual = f"{fw.namespace}::{alias_cpp}" + if resolver.kinds.get(alias_cpp_qual) != "typedef": + continue + resolved_underlying = resolver.alias_underlying.get(alias_cpp_qual) + if not resolved_underlying: + resolved_underlying = resolver.resolve(underlying) + if resolved_underlying.startswith("void"): + continue + gen.collect_struct_alias(alias_cpp, resolved_underlying) + + for cls in data.classes: + gen.class_to_source[cls.name] = source_base + + +# ── Framework processing ────────────────────────────────────────────────── + +def process_objc_framework( + fw: FrameworkConfig, + sdk_path: Path, + parsed: ParsedFrameworkData, + fw_output: Path, + resolver: TypeResolver, + output_dir: Path, + metal_cpp_dir: Path, + dir_expected: dict[Path, set[str]], + emit_availability_types: bool = False, + emit_availability_members: bool = False, +) -> None: + """Process an ObjC framework: parse headers and overwrite per-class hpps in + a metal-cpp-shaped tree. Hand-written hpps listed under `keep_upstream:` + are copied verbatim from `metal_cpp_dir//` so generated wrappers can + reuse them. + """ + expected = dir_expected.setdefault(fw_output, set()) + expected.add(f"{fw.name}.hpp") # umbrella + expected.add(f"{fw.prefix}Defines.hpp") + # Hand-written supplements pulled into the umbrella (e.g. + # `MTLDeviceExtras.hpp`). The user maintains these; the sweep must + # not touch them. + for extra in fw.extra_umbrella_includes: + expected.add(extra) + + # Copy upstream-preserved infrastructure / hand-written hpps. + if fw.keep_upstream: + src_dir = metal_cpp_dir / fw.name + for name in fw.keep_upstream: + src = src_dir / f"{name}.hpp" + if not src.exists(): + log.warning(" keep_upstream miss: %s", src) + continue + shutil.copyfile(src, fw_output / src.name) + expected.add(src.name) + log.info(" keep: %s", src.name) + + gen = CodeGenerator( + namespace=fw.namespace, + prefix=fw.prefix, + strip_prefix=fw.strip_prefix, + resolver=resolver, + ) + gen.emit_availability_types = emit_availability_types + gen.emit_availability_members = emit_availability_members + + # Seed the umbrella with the upstream-kept files so a single + # `.hpp` include surfaces NS::SharedPtr / NS::TransferPtr / + # NS::Range etc. without the user having to know which header owns them. + for name in fw.keep_upstream: + gen.generated_headers.append(f"{name}.hpp") + # Also tell

Structs.hpp which upstream files to chain so a generated + # class that uses a skipped struct (MTL::BufferRange, MTL::PackedFloat3) + # only needs to include

Structs.hpp. + gen.keep_upstream = list(fw.keep_upstream) + gen.extra_umbrella_includes = list(fw.extra_umbrella_includes) + gen.output_subdir = fw.output_subdir or fw.name + + # Optional .apinotes file ships next to the SDK headers and + # carries Apple's canonical Swift-style short names (the same source Apple + # uses to expose `setBlendColor` for `setBlendColorRed:green:blue:alpha:`). + # Honor renames from the framework whose headers we're parsing rather than + # the framework name itself — a virtual framework (Metal4) shares + # Metal.apinotes. + sdk_fw_name = fw.sdk_framework or fw.name + apinotes_path = ( + sdk_path / "System" / "Library" / "Frameworks" + / f"{sdk_fw_name}.framework" / "Headers" / f"{sdk_fw_name}.apinotes" + ) + apinotes_renames: dict[str, dict[str, str]] = ( + parse_apinotes_renames(apinotes_path) if apinotes_path.exists() else {} + ) + if apinotes_renames: + log.info(" apinotes renames: %d classes", + len(apinotes_renames)) + + collect_generator_declarations(fw, parsed, resolver, gen) + + # Write per-framework Enums.hpp + Blocks.hpp before classes (class + # headers include both). + # Emit a generated Defines.hpp when no upstream-kept one exists + # — virtual frameworks like Metal4 share Metal/ but need their own + # macro aliases (_MTL4_INLINE, _MTL4_ENUM, ...). + if fw.prefix not in {n for n in fw.keep_upstream if n.endswith("Defines")} and \ + f"{fw.prefix}Defines" not in fw.keep_upstream: + defines_path = fw_output / f"{fw.prefix}Defines.hpp" + if not defines_path.exists(): + defines_path.write_text(gen.generate_defines()) + log.info(" -> %s", defines_path.relative_to(output_dir)) + # Skip — and delete any stale copy of — empty aggregates. Some frameworks + # (MTL4FX, CA) have no blocks/structs at all; emitting a header with + # only `#pragma once` and an empty namespace is dead weight. + # Enums no longer have a per-framework aggregate — each enum is + # emitted into the per-source-header hpp that declared it (see the + # `generate_class_header(... enums=data.enums)` call below). + for kind, has, emit in ( + ("Blocks", gen.has_blocks, gen.generate_blocks), + ("Structs", gen.has_structs, gen.generate_structs), + ): + path = fw_output / f"{fw.prefix}{kind}.hpp" + if has: + path.write_text(emit()) + expected.add(path.name) + log.info(" -> %s", path.relative_to(output_dir)) + elif path.exists(): + path.unlink() + + # Foundation: emit the CRTP root (NS::Object + Referencing/Copying/ + # SecureCoding templates) and the templated NS::Enumerator container + # ourselves rather than copying Apple's `_NS_PRIVATE_SEL`-driven + # versions. The generated forms route through the same + # `_objc_msgSend$` stub trampolines every other wrapper uses; + # `sendMessage` / `sendMessageSafe` are kept as escape hatches. + if fw.prefix == "NS": + for name, emit in ( + ("NSObject.hpp", gen.generate_nsobject_header), + ("NSEnumerator.hpp", gen.generate_nsenumerator_header), + ): + path = fw_output / name + path.write_text(emit()) + gen.generated_headers.append(name) + expected.add(name) + log.info(" -> %s", path.relative_to(output_dir)) + + def _write_umbrella(): + umbrella_path = fw_output / f"{fw.name}.hpp" + umbrella_path.write_text(gen.generate_umbrella(fw.name)) + log.info(" -> %s", umbrella_path.relative_to(output_dir)) + + # Pass 2: emit class headers. + # Skip protocols/classes that collide with upstream NSObject.hpp's CRTP + # bases (NSCopying, NSSecureCoding, etc.) — those are the dispatch + # templates we inherit from. + UPSTREAM_RESERVED = { + "NSObject", "NSCopying", "NSSecureCoding", "NSMutableCopying", + "NSCoding", "NSFastEnumeration", "NSLocking", "NSDiscardableContent", + } + # Group filtered classes by their source SDK header so each output .hpp + # mirrors upstream's layout (MTLEvent.h → MTLEvent.hpp containing every + # @interface / @protocol the SDK packed in there). + for header_name, data in parsed: + group: list[tuple[ObjCClass, Optional[dict]]] = [] + for cls in data.classes: + if cls.name in UPSTREAM_RESERVED: + continue + inc_classes = fw.include.get("classes", [".*"]) + if not matches_any(cls.name, inc_classes): + continue + exc_classes = fw.exclude.get("classes", []) + if exc_classes and matches_any(cls.name, exc_classes): + continue + override = fw.class_overrides.get(cls.name) + filtered = filter_class( + cls, fw.exclude, override, + apinotes_renames=apinotes_renames.get(cls.name), + ) + if not filtered: + continue + log.info(" Class: %s (%d props, %d methods)", + filtered.name, + len(filtered.properties), + len(filtered.methods)) + gen.collect_selectors(filtered) + group.append((filtered, override)) + + # Emit a per-source-header `.hpp` whenever the SDK header + # contributed anything we surface: a class, an extern global, a + # string-typedef alias, or an enum (the new per-header enum + # emission means enum-only SDK headers like `MTLDataType.h` now + # produce their own `.hpp`). + if (not group and not data.constants and not data.string_typedefs + and not data.enums): + continue + + out_name = header_name.removesuffix(".h") + ".hpp" + header_content = gen.generate_class_header( + group, header_basename=out_name.removesuffix(".hpp"), + constants=data.constants, string_typedefs=data.string_typedefs, + enums=data.enums) + out_path = fw_output / out_name + out_path.write_text(header_content) + gen.generated_headers.append(out_name) + expected.add(out_name) + log.info(" -> %s", out_path.relative_to(output_dir)) + + # Bridge: every per-class header `#include`s `

Bridge.hpp`, which + # collapses identical (return, args, selector) trampolines into one + # extern "C" decl. Emitted after every class header so the registry + # has seen every signature it needs to declare. + bridge_path = fw_output / f"{fw.prefix}Bridge.hpp" + bridge_path.write_text(gen.generate_bridge_header()) + expected.add(bridge_path.name) + calls = gen._bridge_call_count + uniq = len(gen._bridge_entries) + ratio = (calls / uniq) if uniq else 0.0 + log.info(" -> %s (%d call sites → %d trampolines, %.1fx dedup)", + bridge_path.relative_to(output_dir), calls, uniq, ratio) + + _write_umbrella() + + +# ── Main ────────────────────────────────────────────────────────────────── + +def main() -> None: + parser = argparse.ArgumentParser( + description="Generate metal-cpp style C++ wrappers for ObjC frameworks") + parser.add_argument("--sdk", help="Generate for a single SDK (e.g. macos)") + parser.add_argument("--strict", action="store_true", + help="Fail on unresolvable types") + parser.add_argument("--config", type=Path, default=TOOL_DIR / "config.yaml") + parser.add_argument("--output", type=Path, default=ROOT_DIR, + help="Output directory for generated files (metal-cpp root)") + parser.add_argument("--metal-cpp", type=Path, required=True, + help="Path to Apple's metal-cpp checkout. Files " + "listed under each framework's `keep_upstream:` " + "are copied verbatim from this tree.") + parser.add_argument("--api-availability-types", + action=argparse.BooleanOptionalAction, default=False, + help="Emit `API_AVAILABLE(...)` on type declarations " + "(classes, enums, structs). Default: off.") + parser.add_argument("--api-availability-members", + action=argparse.BooleanOptionalAction, default=False, + help="Emit `API_AVAILABLE(...)` on type members " + "(methods, properties, enum values). Default: off.") + parser.add_argument("-v", "--verbose", action="store_true") + args = parser.parse_args() + + logging.basicConfig( + level=logging.DEBUG if args.verbose else logging.INFO, + format="%(levelname)s: %(message)s", + ) + + output_dir = args.output.resolve() + metal_cpp_dir = args.metal_cpp.resolve() + + sdks, frameworks = load_config(args.config) + + if args.sdk: + sdks = [s for s in sdks if s.name == args.sdk] + if not sdks: + log.error("Unknown SDK: %s", args.sdk) + sys.exit(1) + + processed_shared: set[str] = set() + # Per-output-dir expected file set, collected across every framework + # emission. After the SDK loop, anything in the dir that's not in this + # set is a stale leftover (typically files that used to be in + # `keep_upstream:` and got removed) and gets unlinked. + dir_expected: dict[Path, set[str]] = {} + + for sdk in sdks: + # Skip SDKs whose every applicable framework was already emitted by + # an earlier SDK (everything is `shared: true`). Pass 1 type + # registration would still run otherwise — re-parsing every header + # for no emission gain. + applicable = [fw for fw in frameworks if sdk.name in fw.sdks] + if applicable and all(fw.shared and fw.name in processed_shared + for fw in applicable): + log.info("Skipping SDK %s: all applicable frameworks already emitted", sdk.name) + continue + + log.info("Processing SDK: %s", sdk.name) + sdk_path = get_sdk_path(sdk.xcrun_sdk) + log.info(" SDK path: %s", sdk_path) + + resolver = TypeResolver() + + # Pass 1: parse ObjC headers for every applicable framework once, + # then build a SDK-wide type index from that libclang data before any + # framework emits. Cross-framework references (e.g. Metal methods + # naming Metal4 classes/enums) resolve without relying on regex header + # scans or framework ordering. + parsed_objc: dict[str, ParsedFrameworkData] = {} + for fw in applicable: + log.info(" Parsing framework: %s", fw.name) + parsed_objc[fw.name] = parse_objc_framework_headers(fw, sdk_path) + + for fw in applicable: + register_objc_declarations(fw, parsed_objc[fw.name], resolver) + for fw in applicable: + register_objc_aliases(fw, parsed_objc[fw.name], resolver) + suppress_late_base_availability(parsed_objc) + + for fw in applicable: + log.info(" Framework: %s", fw.name) + + # Flat layout: // + fw_output = output_dir / (fw.output_subdir or fw.name) + fw_output.mkdir(parents=True, exist_ok=True) + + if not (fw.shared and fw.name in processed_shared): + process_objc_framework( + fw, sdk_path, parsed_objc[fw.name], + fw_output, resolver, + output_dir, metal_cpp_dir, + dir_expected, + emit_availability_types=args.api_availability_types, + emit_availability_members=args.api_availability_members, + ) + if fw.shared: + processed_shared.add(fw.name) + + # Report unresolvable types + if resolver.unresolved: + log.warning(" Unresolvable types in %s:", sdk.name) + for typ, ctx in resolver.unresolved: + log.warning(" %s (in %s)", typ, ctx) + if args.strict: + log.error("Strict mode: failing due to unresolvable types") + sys.exit(1) + + # Sweep stale files. Any `.hpp` in an output directory that isn't part + # of the current expected set is a leftover from a previous run (e.g. + # a class removed from `headers:` or a file moved out of + # `keep_upstream:`). Removing it now prevents includes from drifting + # apart from what the generator owns. + for out_dir, names in dir_expected.items(): + if not out_dir.is_dir(): + continue + for path in out_dir.glob("*.hpp"): + if path.name not in names: + log.info(" sweep stale: %s", path.relative_to(output_dir)) + path.unlink() + + log.info("Done.") + + +if __name__ == "__main__": + main() diff --git a/thirdparty/metal-cpp/tools/metalcpp_common.py b/thirdparty/metal-cpp/tools/metalcpp_common.py new file mode 100644 index 000000000000..0214f5440fda --- /dev/null +++ b/thirdparty/metal-cpp/tools/metalcpp_common.py @@ -0,0 +1,3558 @@ +"""Shared types, parsing, and code generation for metal-cpp tooling. + +Contains ObjC header parsing (libclang), type resolution, data classes, +and C++ code generation following the metal-cpp patterns used by Apple. +Used by generate.py to produce the full metal-cpp tree from SDK headers. +""" + +from __future__ import annotations + +import ctypes +import logging +import re +from dataclasses import dataclass, field +from pathlib import Path +from typing import Optional + +import clang.cindex as _cc +from clang.cindex import CursorKind, Index, TranslationUnit, TypeKind + +log = logging.getLogger(__name__) + +# ── Availability extraction via ctypes ──────────────────────────────────── +# The Python libclang binding doesn't expose clang_getCursorPlatformAvailability; +# we call it directly. Layout matches the CXPlatformAvailability struct from +# Index.h. + +# Raw CXString — same memory layout as cc._CXString but without the __del__ +# that calls clang_disposeString. Using the binding's _CXString inside a +# Structure causes Python to dispose the strings out of order vs the +# clang_disposeCXPlatformAvailability call, which can double-free. + +class _CXStringRaw(ctypes.Structure): + _fields_ = [("spelling", ctypes.c_char_p), + ("free", ctypes.c_int)] + + +class _CXVersion(ctypes.Structure): + _fields_ = [("Major", ctypes.c_int), + ("Minor", ctypes.c_int), + ("Subminor", ctypes.c_int)] + + +class _CXPlatformAvailability(ctypes.Structure): + _fields_ = [("Platform", _CXStringRaw), + ("Introduced", _CXVersion), + ("Deprecated", _CXVersion), + ("Obsoleted", _CXVersion), + ("Unavailable", ctypes.c_int), + ("Message", _CXStringRaw)] + + +_cc.conf.lib.clang_getCursorPlatformAvailability.argtypes = [ + _cc.Cursor, + ctypes.POINTER(ctypes.c_int), + ctypes.POINTER(_CXStringRaw), + ctypes.POINTER(ctypes.c_int), + ctypes.POINTER(_CXStringRaw), + ctypes.POINTER(_CXPlatformAvailability), + ctypes.c_int, +] +_cc.conf.lib.clang_getCursorPlatformAvailability.restype = ctypes.c_int +_cc.conf.lib.clang_disposeCXPlatformAvailability.argtypes = [ctypes.POINTER(_CXPlatformAvailability)] +_cc.conf.lib.clang_disposeCXPlatformAvailability.restype = None + +# SDK platform name → C++ attribute platform name. The clang attribute uses +# the same identifiers as the SDK's API_AVAILABLE macro. +_PLAT_ALIAS = { + "ios": "ios", + "ios_app_extension": "ios", + "macos": "macos", + "macos_app_extension": "macos", + "macosx": "macos", + "tvos": "tvos", + "watchos": "watchos", + "visionos": "visionos", +} + + +@dataclass +class Availability: + """Per-platform availability. Each entry is + (introduced, deprecated, obsoleted, unavailable). + `unavailable=True` (or all-None versions) means the API isn't available + on that platform — Apple's `API_AVAILABLE(macos(...))` expands to + unavailable attributes for every other platform.""" + platforms: dict[str, tuple[Optional[str], Optional[str], Optional[str], bool]] = field(default_factory=dict) + unavailable: bool = False + + +def _ver(v: _CXVersion) -> Optional[str]: + if v.Major < 0: + return None + parts = [str(v.Major)] + if v.Minor >= 0: + parts.append(str(v.Minor)) + if v.Subminor > 0: + parts.append(str(v.Subminor)) + return ".".join(parts) + + +def cursor_availability(cursor) -> Availability: + """Pull platform availability for a cursor. Returns empty Availability + when the cursor has no annotations.""" + arr = (_CXPlatformAvailability * 8)() + always_dep = ctypes.c_int() + dep_msg = _CXStringRaw() + always_unavail = ctypes.c_int() + unavail_msg = _CXStringRaw() + n = _cc.conf.lib.clang_getCursorPlatformAvailability( + cursor, + ctypes.byref(always_dep), ctypes.byref(dep_msg), + ctypes.byref(always_unavail), ctypes.byref(unavail_msg), + arr, 8, + ) + av = Availability(unavailable=bool(always_unavail.value)) + try: + for j in range(n): + plat_raw = arr[j].Platform.spelling.decode("utf-8") if arr[j].Platform.spelling else "" + plat = _PLAT_ALIAS.get(plat_raw, plat_raw) + if not plat: + continue + intro = _ver(arr[j].Introduced) + dep = _ver(arr[j].Deprecated) + obs = _ver(arr[j].Obsoleted) + unavail = bool(arr[j].Unavailable) + # Apple's API_AVAILABLE(macos(...)) makes libclang report every + # other platform with all-None versions — that's the "excluded" + # signal. Treat it as unavailable. + if not unavail and intro is None and dep is None and obs is None: + unavail = True + av.platforms[plat] = (intro, dep, obs, unavail) + finally: + # libclang owns the CXString backing buffers for entries 0..n-1; free + # via the proper dispose function. We don't dispose the standalone + # dep_msg / unavail_msg CXStrings here — those use the binding's + # type marshaling and a separate dispose path, and we don't read them. + for j in range(n): + _cc.conf.lib.clang_disposeCXPlatformAvailability(ctypes.byref(arr[j])) + return av + + +# Standard Apple platforms relevant to Metal-consuming code. Any platform in +# this set that's NOT explicitly introduced for a given API is treated as +# unavailable — matching Apple's `API_AVAILABLE(...)` semantics, where +# unmentioned platforms are excluded rather than inherited. +# `maccatalyst` is intentionally omitted: it has no `__API_AVAILABLE_PLATFORM_*` +# entry in ``, so the macro expansion fails to parse. The iOS +# version bound already covers Mac Catalyst targets in practice. +_STANDARD_PLATFORMS = ("ios", "macos", "tvos", "visionos") + + +def format_availability(av: Availability) -> str: + """Render an Availability as Apple `` macros — + `API_AVAILABLE(macos(10.13), ios(11.0))`, `API_UNAVAILABLE(tvos)`, + `API_DEPRECATED("", macos(10.13, 12.0))`. Empty when there's nothing + to emit. + + Only platforms libclang explicitly enumerated for the cursor are emitted. + Apple's convention: when a declaration has its own API_AVAILABLE, libclang + enumerates every platform (with all-None for excluded ones, surfaced here + as `unavailable`). When a declaration inherits from its enclosing context + (no own attribute), libclang reports only the platforms the parent + mentioned — missing platforms inherit too (e.g. visionOS inheriting iOS + availability for CAMetalLayer.colorspace), so we must NOT synthesize + `unavailable` for them.""" + if av.unavailable: + return "__attribute__((unavailable))" + if not av.platforms: + return "" + introduced: list[str] = [] + deprecated: list[str] = [] + unavail: list[str] = [] + for plat in sorted(av.platforms): + if plat not in _STANDARD_PLATFORMS: + continue + intro, dep, obs, plat_unavail = av.platforms[plat] + if plat_unavail: + unavail.append(plat) + continue + # `obsoleted` is rarer than `deprecated` and stricter (removed, + # not just discouraged). Fold it into API_DEPRECATED's end-version + # slot — `` has no obsoleted-specific macro. + end_ver = dep or obs + if intro and end_ver: + deprecated.append(f"{plat}({intro}, {end_ver})") + elif intro: + introduced.append(f"{plat}({intro})") + parts: list[str] = [] + if introduced: + parts.append(f"API_AVAILABLE({', '.join(introduced)})") + if deprecated: + parts.append(f'API_DEPRECATED("", {", ".join(deprecated)})') + if unavail: + parts.append(f"API_UNAVAILABLE({', '.join(unavail)})") + return " ".join(parts) + +# ── Built-in type map (types already in metal-cpp) ─────────────────────── + +BUILTIN_TYPE_MAP: dict[str, str] = { + # Foundation + "NSObject": "NS::Object", + "NSString": "NS::String", + "NSError": "NS::Error", + "NSArray": "NS::Array", + "NSDictionary": "NS::Dictionary", + "NSNumber": "NS::Number", + "NSURL": "NS::URL", + "NSBundle": "NS::Bundle", + "NSData": "NS::Data", + "NSValue": "NS::Value", + "NSSet": "NS::Set", + "NSUInteger": "NS::UInteger", + "NSInteger": "NS::Integer", + "NSTimeInterval": "NS::TimeInterval", + "BOOL": "bool", + "NSRect": "CGRect", + "NSSize": "CGSize", + "NSPoint": "CGPoint", + # Common Foundation typedefs + "NSStringEncoding": "NS::UInteger", + "unichar": "unsigned short", + "NSComparator": "void*", + "NSComparisonResult": "long", + "NSRange": "NS::Range", + "NSErrorDomain": "NS::String*", + "NSErrorUserInfoKey": "NS::String*", + "NSNotificationName": "NS::String*", + "NSExceptionName": "NS::String*", + "NSRunLoopMode": "NS::String*", + # Metal + "MTLDevice": "MTL::Device", + "MTLTexture": "MTL::Texture", + "MTLBuffer": "MTL::Buffer", + "MTLLibrary": "MTL::Library", + "MTLCommandQueue": "MTL::CommandQueue", + "MTLCommandBuffer": "MTL::CommandBuffer", + "MTLRenderPipelineState": "MTL::RenderPipelineState", + "MTLComputePipelineState": "MTL::ComputePipelineState", + "MTLPixelFormat": "MTL::PixelFormat", + "MTLResourceOptions": "MTL::ResourceOptions", + "MTLResidencySet": "MTL::ResidencySet", + "MTLGPUAddress": "MTL::GPUAddress", + # QuartzCore + "CAMetalLayer": "CA::MetalLayer", + "CAMetalDrawable": "CA::MetalDrawable", +} + +# Types that pass through unchanged (C, CoreFoundation, etc.) +PASSTHROUGH_TYPES: set[str] = { + "void", + "bool", + "float", + "double", + "char", + "short", + "int", + "long", + "unsigned char", + "unsigned short", + "unsigned int", + "unsigned long", + "long long", + "unsigned long long", + "int8_t", + "int16_t", + "int32_t", + "int64_t", + "uint8_t", + "uint16_t", + "uint32_t", + "uint64_t", + "size_t", + "ssize_t", + "ptrdiff_t", + "CGRect", + "CGSize", + "CGPoint", + "CGFloat", + "CGColorSpaceRef", + "CGDirectDisplayID", + "CGColorRef", + "CGAffineTransform", + "CFStringRef", + "CFTypeRef", + "CFTimeInterval", + "dispatch_queue_t", + "dispatch_data_t", + "IOSurfaceRef", + "SEL", + "Class", +} + +# Resolved type → system header needed +SYSTEM_HEADER_FOR_TYPE: dict[str, str] = { + "CGRect": "CoreGraphics/CoreGraphics.h", + "CGSize": "CoreGraphics/CoreGraphics.h", + "CGPoint": "CoreGraphics/CoreGraphics.h", + "CGFloat": "CoreGraphics/CoreGraphics.h", + "CGColorSpaceRef": "CoreGraphics/CoreGraphics.h", + "CGDirectDisplayID": "CoreGraphics/CoreGraphics.h", + "CGColorRef": "CoreGraphics/CoreGraphics.h", + "CGAffineTransform": "CoreGraphics/CoreGraphics.h", + "IOSurfaceRef": "IOSurface/IOSurfaceRef.h", +} + + +# ── Shared helpers ──────────────────────────────────────────────────────── + + +def setter_name(prop_name: str) -> str: + """ObjC property name → setter name (e.g. 'foo' → 'setFoo').""" + return f"set{prop_name[0].upper()}{prop_name[1:]}" + + +def cpp_method_name_from_first_segment(first: str) -> str: + """Apply upstream metal-cpp's acronym-prefix lower-casing rule to a + method or property name: `UTF8String` → `utf8String`. Leaves + camelcase-into-camelcase names like `URLWithString` alone (upstream + keeps them as-is).""" + if not first or not first[0].isupper(): + return first + m = re.match(r"^([A-Z]{2,})(?=\d)", first) + if m: + run = m.group(1) + return run.lower() + first[len(run):] + return first + + +def selector_accessor(selector: str) -> str: + """ObjC selector → Private.hpp accessor (colons become underscores).""" + return selector.replace(":", "_") + + +def strip_objc_prefix(name: str, strip_prefix: str) -> str: + """Strip ObjC prefix to get C++ name (e.g. 'CAMetalLayer' → 'MetalLayer'). + + Skips stripping when the result would start with a digit — that happens + for Apple's MTL4* class line (MTL4CommandQueue, MTL4ComputePipeline, ...). + Those keep the full name and live as MTL::MTL4CommandQueue in C++. + """ + if strip_prefix and name.startswith(strip_prefix): + stripped = name[len(strip_prefix) :] + if stripped and not stripped[0].isdigit(): + return stripped + return name + + +def strip_objc_prefix_aggressive(name: str, strip_prefix: str) -> str: + """Stripping for structs, which match upstream metal-cpp's convention of + dropping both the prefix AND any version digits ('MTL4BufferRange' → + 'BufferRange'). Classes keep the digits to avoid collisions with their + versionless counterparts (MTL4CommandQueue vs MTLCommandQueue protocol).""" + if not strip_prefix or not name.startswith(strip_prefix): + return name + rest = name[len(strip_prefix):] + # Eat trailing digits (handles MTL4Foo, NS5Foo, etc.) + while rest and rest[0].isdigit(): + rest = rest[1:] + if rest and rest[0].isupper(): + return rest + return name + + +def resolve_type( + resolver: TypeResolver, + objc_type: str, + namespace: str, + cpp_class_name: str, +) -> str: + """Resolve an ObjC type, handling instancetype → concrete class pointer.""" + cpp = resolver.resolve(objc_type, cpp_class_name) + if cpp == "__instancetype__": + return f"{namespace}::{cpp_class_name}*" + return cpp + + +# ── Data classes ────────────────────────────────────────────────────────── + + +@dataclass +class ObjCProperty: + name: str + objc_type: str + is_readonly: bool + is_class_property: bool = False + availability: Availability = field(default_factory=Availability) + + +@dataclass +class ObjCParam: + name: str + objc_type: str + + +@dataclass +class ObjCMethod: + selector: str + return_type: str + params: list[ObjCParam] = field(default_factory=list) + is_class_method: bool = False + availability: Availability = field(default_factory=Availability) + # When non-empty, the C++ method name to emit instead of the value + # computed from the selector. Used by class_overrides..rename + # to handle Apple-specific selector groupings (e.g. + # `setBlendColorRed:green:blue:alpha:` → `setBlendColor`). + cpp_name_override: str = "" + + @property + def sel_accessor(self) -> str: + """Selector accessor for _PRIVATE_DEF_SEL: colons replaced with underscores.""" + return selector_accessor(self.selector) + + @property + def cpp_name(self) -> str: + if self.cpp_name_override: + return self.cpp_name_override + return self._compute_cpp_name() + + def _compute_cpp_name(self) -> str: + """C++ method name. Two upstream-metal-cpp conventions applied: + 1. Strip trailing `With` from the first selector segment, + but only when the selector takes args (`commandBufferWithDescriptor:` + → `commandBuffer`, `commandBufferWithUnretainedReferences` → + unchanged — the latter has no args and would collide with the + no-arg `commandBuffer()` overload). + 2. Lowercase a leading run of capital letters (acronym prefix) + when it's followed by a lowercase letter — `UTF8String` → + `utf8String`, `URLString` → `urlString`. Names like + `URLWithString` keep the prefix because the run is followed + by an uppercase letter.""" + first = self.selector.split(":")[0] + if not first: + return first + has_args = ":" in self.selector + # Step 1: preposition-strip (lower-case selectors only, with args). + # Apple's selector convention attaches descriptive prepositions to + # the first segment that the actual args make redundant in C++: + # commandBufferWithDescriptor: → commandBuffer + # objectAtIndexedSubscript: → object + # encodeWaitForEvent:value: → encodeWait + # maximumLengthOfBytesUsingEncoding: → maximumLengthOfBytes + # The strip is gated on the selector having at least one arg, so + # `commandBufferWithUnretainedReferences` (no args) stays put. + if has_args and first[0].islower(): + m = re.search(r"(?:With|At|For|Using)[A-Z]", first) + if m and m.start() > 0: + first = first[:m.start()] + # Step 2: acronym-prefix lowercase (`UTF8String` → `utf8String`). + return cpp_method_name_from_first_segment(first) + + +@dataclass +class ObjCEnumValue: + name: str + value: Optional[int] + # Original source-form initializer (`(1ULL << 40)`, `Foo | Bar`, ...). + # Preserved verbatim from the SDK header so the emitted enum keeps the + # hand-readable expressions Apple used — falling back to the evaluated + # integer only when there's no explicit `= `. + value_expr: Optional[str] = None + availability: Availability = field(default_factory=Availability) + + +@dataclass +class ObjCEnum: + name: str + underlying_type: str + values: list[ObjCEnumValue] = field(default_factory=list) + # True when declared via `NS_OPTIONS` / `CF_OPTIONS` — should emit as + # `_

_OPTIONS(...)` so bitwise operators work without casts. + is_options: bool = False + availability: Availability = field(default_factory=Availability) + + +@dataclass +class ObjCBlockTypedef: + """`typedef void (^MTLFooHandler)(...)` — emitted as both the raw block + alias and an std::function-taking ergonomic overload.""" + name: str # "MTLIOCommandBufferHandler" + return_type: str # "void" + arg_types: list[str] # ["id"] + + +@dataclass +class ObjCStructField: + name: str + objc_type: str + # For C fixed-size arrays (`uint16_t edge[4]`), the element type goes + # into `objc_type` ("uint16_t") and the dimension comes out here. In + # C++ the dimension must trail the field name (`uint16_t edge[4];`), + # not the type (`uint16_t[4] edge;` doesn't parse). + array_size: Optional[int] = None + + +@dataclass +class ObjCStruct: + """Plain C struct exposed in an Obj-C framework header (e.g. + MTL4BufferRange). Emitted as a regular C++ struct, with the framework + prefix stripped from the C++ name (NSOperatingSystemVersion → NS:: + OperatingSystemVersion to match upstream metal-cpp).""" + name: str + fields: list[ObjCStructField] = field(default_factory=list) + packed: bool = False # True ⇒ emit with __PACKED + # Extra C++ members (constructors, static factories) injected verbatim + # at the top of the struct body. Matches upstream metal-cpp's hand-written + # convenience helpers (`MTL::Size::Make`, `MTL::Region::Make3D`, ...). + extra_members: str = "" + availability: Availability = field(default_factory=Availability) + + +@dataclass +class ObjCClass: + name: str + superclass: str = "NSObject" + properties: list[ObjCProperty] = field(default_factory=list) + methods: list[ObjCMethod] = field(default_factory=list) + protocols: list[str] = field(default_factory=list) + # True when this came from `@protocol Foo` rather than `@interface Foo`. + # Protocols are uninstantiable: there's no `+alloc` and the Metal/ + # Foundation runtime hands them to you via factory methods on a concrete + # object (`MTL::Device::newBuffer(...)`). Suppress the auto-emitted + # `alloc()`/`init()` cluster for them. + is_protocol: bool = False + availability: Availability = field(default_factory=Availability) + + +@dataclass +class ObjCConstant: + """An `extern const ` global declared in an SDK header + (e.g. `extern CADynamicRange const CADynamicRangeHigh`). Surfaced in the + framework namespace via a `__asm__`-label binding to the system C symbol + so call sites can use `CA::DynamicRangeHigh` without redeclaring Apple's + `CADynamicRangeHigh` extern (which would clash under ObjC ARC in `.mm` + files that pull in Apple's headers transitively).""" + c_name: str # `CADynamicRangeHigh` + cpp_name: str # `DynamicRangeHigh` + cpp_type: str # `CA::DynamicRange` or `NS::String*` + + +@dataclass +class FrameworkData: + """Parsed data for one framework from one SDK.""" + + classes: list[ObjCClass] = field(default_factory=list) + enums: list[ObjCEnum] = field(default_factory=list) + blocks: list[ObjCBlockTypedef] = field(default_factory=list) + structs: list[ObjCStruct] = field(default_factory=list) + constants: list[ObjCConstant] = field(default_factory=list) + # ObjC typedefs of the form `typedef * ` — surfaced as + # `using = *;` so constants and members can name the + # Swift-friendly enum-style alias (`CA::DynamicRange`). + string_typedefs: list[tuple[str, str]] = field(default_factory=list) # (name, resolved_cpp_type) + # `typedef MTLSamplePosition MTLCoordinate2D;` — alias for an existing + # struct/record. Without this, the resolver only knows MTLSamplePosition + # and treats the alias as an unresolvable type. Captured as + # (alias_name, target_objc_name) so framework registration can route + # the alias to the same C++ type as the target. + struct_aliases: list[tuple[str, str]] = field(default_factory=list) + # `typedef MTLRenderPipelineReflection * MTLAutoreleasedRenderPipelineReflection;` + # — typedef whose underlying is a class pointer. Stored as + # (alias_name, target_class_objc_name) so the alias surfaces as + # `using AutoreleasedRenderPipelineReflection = MTL::RenderPipelineReflection*;`. + class_pointer_aliases: list[tuple[str, str]] = field(default_factory=list) + # `typedef uint64_t MTLTimestamp;` — typedef whose underlying is a + # primitive/builtin type. Stored as (alias_name, underlying_spelling) + # so the alias surfaces as `using Timestamp = uint64_t;`. + primitive_aliases: list[tuple[str, str]] = field(default_factory=list) + + +# ── Type resolution ─────────────────────────────────────────────────────── + + +class TypeResolver: + """Maps ObjC type spellings to C++ types.""" + + def __init__(self) -> None: + self.type_map: dict[str, str] = dict(BUILTIN_TYPE_MAP) + self.unresolved: list[tuple[str, str]] = [] # (type, context) + # Per-cpp-qualified-name kind: "class" | "enum" | "block" | "struct" + # | "typedef". Used by the forward-decl scanner so it doesn't emit + # `class MTL::PixelFormat;` when PixelFormat is in fact an enum. + self.kinds: dict[str, str] = {} + # Pre-seed kinds for the BUILTIN_TYPE_MAP entries that are typedefs + # / structs / values rather than classes — so the forward-decl + # scanner doesn't emit `class UInteger;` etc. + for _cpp in BUILTIN_TYPE_MAP.values(): + bare = _cpp.rstrip("*").strip() + self.kinds[bare] = "typedef" + # Per-cpp-qualified-name framework prefix, so the scanner can request + # cross-framework Enums.hpp / Blocks.hpp / Structs.hpp. + self.frameworks: dict[str, str] = {} # cpp name → fw prefix + # ObjC class name → SDK header basename (no .h). Shared across all + # frameworks so a class that extends a type defined in a sibling + # framework (CA::MetalDrawable extending MTL::Drawable) can locate + # the parent's header for its #include line. + self.class_to_source: dict[str, str] = {} + # C++ qualified name → SDK header basename (no .h). Drives per- + # source-header enum includes — when a class references + # `MTL::IndexType`, the emitter consults this map to pick the + # specific `/MTLArgument.hpp` include rather than a per- + # framework aggregate. + self.cpp_to_source: dict[str, str] = {} + # Enum cpp qualified name → resolved underlying type (e.g. + # `NS::UInteger`). Lets the scanner emit a C++11 opaque enum + # forward decl (`enum Foo : NS::UInteger;`) for cross-file enum + # references — avoids pulling the whole declaring hpp through and + # the include cycles that creates. + self.enum_underlying: dict[str, str] = {} + # Enum cpp qualified name → True for OPTIONS-style enums + # (`_

_OPTIONS` expands to a `using = ;` plus + # an unnamed `enum : `). Forward-declaring those as + # `enum Foo : Underlying;` would clash with the type alias — + # they're instead forward-declared as `using Foo = Underlying;`. + self.enum_is_options: dict[str, bool] = {} + # String-typedef aliases keyed by their qualified C++ name + # (`NS::ErrorDomain` → `NS::String*`). Lets emitters that can't + # see the per-header `using` definition (notably `

Bridge.hpp`) + # rewrite signatures to the underlying type so they don't depend + # on the alias being declared earlier in the include chain. + self.alias_underlying: dict[str, str] = {} + + def register(self, objc_name: str, cpp_type: str, kind: str = "class", + framework_prefix: str = "") -> None: + """Register a generated type mapping. `kind` distinguishes class + from non-class names so emission can pick the right declaration + form. `framework_prefix` keys into per-framework support headers + like MTLEnums.hpp.""" + self.type_map[objc_name] = cpp_type + bare = cpp_type.rstrip("*").strip() + self.kinds[bare] = kind + if framework_prefix: + self.frameworks[bare] = framework_prefix + + def resolve(self, objc_type: str, context: str = "") -> str: + """Resolve an ObjC type string to its C++ equivalent. + + Returns 'void*' and logs a warning for unresolvable types. + Returns '__instancetype__' for instancetype (caller handles). + """ + s = self._normalize(objc_type, strip_generics=False) + + # `NSEnumerator *` (or any inner type) collapses to the + # kept-upstream `NS::Enumerator*` — matches upstream + # metal-cpp's choice to type-erase the element type at the wrapper + # boundary. Done before the generic-strip pass so template arity + # stays on the C++ side. + if re.match(r"^NSEnumerator\s*<[^<>]*>\s*\*?$", s): + return "NS::Enumerator*" + + # `id` and `id const *` — recognized BEFORE + # `_strip_generics` runs, since that pass now also collapses the + # nested `id` form (so `NSArray> *` reduces to + # `NSArray *`) and would otherwise erase the protocol info needed + # here. + m = re.match(r"^id<(\w+)>$", s) + if m: + proto = m.group(1) + cpp = self.type_map.get(proto) + if cpp: + return f"{cpp}*" + return self._unresolved(objc_type, context) + + m = re.match(r"^id<(\w+)>\s*const\s*\*$", s) + if m: + proto = m.group(1) + cpp = self.type_map.get(proto) + if cpp: + return f"const {cpp}* const *" + return self._unresolved(objc_type, context) + + s = self._strip_generics(s) + + # instancetype → handled by caller with the concrete class + if s == "instancetype": + return "__instancetype__" + + # `id *` / `const id *` — typeless object-pointer arrays. Apple + # collection factories take these as `(const ObjectType _Nonnull [])`, + # which clang decays to `ObjectType const *` (then ObjectType → id). + # Upstream metal-cpp exposes them as `const NS::Object* const *`. + if re.fullmatch(r"id\s*\*|const\s+id\s*\*|id\s+const\s*\*", s): + return "const NS::Object* const *" + + # Plain `id` → `NS::Object*` (matches upstream metal-cpp). After + # `_strip_generics`, `ObjectType`/`KeyType`/`ValueType` collapse to + # `id`, so collection factories like `NSArray::array(NS::Object*)` + # and bare-`id` properties (`MTLCaptureDescriptor.captureObject`) + # both land here. + if s == "id": + return "NS::Object*" + + # ObjC object pointer-to-pointer: ` *const *` / + # ` * const *` — common in factories that take a C array of + # typed objects. Emit `const * const *` to match upstream. + m = re.match(r"^(\w+)\s*\*\s*const\s*\*$", s) + if m: + cls = m.group(1) + cpp = self.type_map.get(cls) + if cpp: + base = cpp.rstrip("*").strip() + return f"const {base}* const *" + + # `ClassName * *` — writable pointer-to-pointer (the Cocoa out-error + # idiom: `(NSError **)error`). Distinct from the `* const *` array + # case above; emitted plainly as `**` so callers pass + # `&myError` to populate it. + m = re.match(r"^(\w+)\s*\*\s*\*$", s) + if m: + cls = m.group(1) + cpp = self.type_map.get(cls) + if cpp: + base = cpp.rstrip("*").strip() + return f"{base}**" + + # `ClassName * const` — Apple's `extern Type const Name` globals + # canonicalize to this (const-qualified pointer to an ObjC class). + # Emit `* const` so the variable's symbol matches a system + # ` const` extern at link time. + m = re.match(r"^(\w+)\s*\*\s*const$", s) + if m: + cls = m.group(1) + cpp = self.type_map.get(cls) + if cpp: + base = cpp.rstrip("*").strip() + return f"{base}* const" + + # `const ` — the non-canonical spelling of the same + # globals (typedef-named, const-qualified). The typedef is itself + # a pointer-typed alias, so append `const` to whatever the resolver + # produces for the bare name. + m = re.match(r"^const\s+(\w+)$", s) + if m: + cls = m.group(1) + cpp = self.type_map.get(cls) + if cpp: + return f"{cpp} const" + + # ObjC object pointer: ClassName * + m = re.match(r"^(\w+)\s*\*$", s) + if m: + cls = m.group(1) + cpp = self.type_map.get(cls) + if cpp: + # Some typedefs already include the pointer in their mapped + # form (e.g. NSErrorDomain → NS::String*); don't double it. + return cpp if cpp.endswith("*") else f"{cpp}*" + if cls in PASSTHROUGH_TYPES or cls in ("void", "char", "unsigned"): + return s + return self._unresolved(objc_type, context) + + # Direct lookup (typedef or basic type) + if s in self.type_map: + return self.type_map[s] + if s in PASSTHROUGH_TYPES: + return s + + # Pointer to passthrough: void *, const char *, etc. + if s.endswith("*"): + base = s[:-1].strip() + if base in PASSTHROUGH_TYPES: + return s + # Const-qualified pointer: re-resolve the unqualified base, then + # reattach const + *. Falls back to void* if base can't be resolved. + if base.startswith("const "): + inner = base[6:].strip() + if inner in self.type_map: + return f"const {self.type_map[inner]} *" + if inner in PASSTHROUGH_TYPES: + return s + return self._unresolved(objc_type, context) + + return self._unresolved(objc_type, context) + + def _normalize(self, s: str, strip_generics: bool = True) -> str: + """Strip nullability/ownership qualifiers, ObjC generic type params, + and extra whitespace. `NSDictionary *` → + `NSDictionary *` — upstream metal-cpp drops generic params and exposes + the type-erased class, recovering element types via template methods. + Pass `strip_generics=False` to keep the `<...>` for callers that want + to pattern-match on parameterized types (e.g. `NSEnumerator`).""" + s = re.sub( + r"\b(__nullable|__nonnull|_Nullable|_Nonnull|" + r"__kindof|__autoreleasing|__unsafe_unretained|__weak|__strong)\b", + "", + s, + ) + if strip_generics: + s = self._strip_generics(s) + return re.sub(r"\s+", " ", s).strip() + + def _strip_generics(self, s: str) -> str: + """`Class` → `Class`; `ObjectType`/`KeyType`/`ValueType` → `id`. + Split out of `_normalize` so resolve() can pattern-match against + parameterized types before this drops them.""" + prev = None + while prev != s: + prev = s + # Strip inner `id` → `id` first, so nested forms like + # `NSArray> *` collapse to `NSArray *` and + # then to `NSArray *` on the next pass. The outer class-stripping + # regex requires `[A-Z]\w*`, so `id<...>` would otherwise stick. + s = re.sub(r"\bid\s*<[^<>]*>", "id", s) + s = re.sub(r"\b([A-Z]\w*)\s*<[^<>]*>", r"\1", s) + s = re.sub(r"\b(ObjectType|KeyType|ValueType)\b", "id", s) + return re.sub(r"\s+", " ", s).strip() + + def _unresolved(self, objc_type: str, context: str) -> str: + log.warning("Unresolvable type: '%s' (in %s)", objc_type, context or "?") + self.unresolved.append((objc_type, context)) + return "void*" + + +# ── ObjC header parsing ────────────────────────────────────────────────── + + +def _parse_block_typedef(name: str, spelling: str) -> Optional[ObjCBlockTypedef]: + """Parse `void (^)(arg1, arg2)` (libclang block-pointer spelling). + Returns None if the spelling doesn't look like a block.""" + m = re.match(r"^(.+?)\s*\(\^[^)]*\)\((.*)\)\s*$", spelling) + if not m: + return None + ret = m.group(1).strip() + raw_args = m.group(2).strip() + args = [a.strip() for a in raw_args.split(",")] if raw_args else [] + # Empty-arg blocks come back as ["void"] or [""]; normalize. + if args == ["void"] or args == [""]: + args = [] + return ObjCBlockTypedef(name=name, return_type=ret, arg_types=args) + + +# ObjC generic-parameter identifier → upstream-style C++ template name. +_GENERIC_PARAM_RETURNS: dict[str, str] = { + "ObjectType": "_Object", + "KeyType": "_KeyType", + "ValueType": "_ValueType", +} + +# libclang TypeKinds for `typedef ;` detection. Used +# to filter typedefs that wrap a builtin scalar (`typedef uint64_t +# MTLTimestamp`) from those that wrap a class pointer / struct / enum. +_PRIMITIVE_TYPE_KINDS = frozenset({ + TypeKind.BOOL, TypeKind.CHAR_S, TypeKind.CHAR_U, TypeKind.SCHAR, + TypeKind.UCHAR, TypeKind.WCHAR, TypeKind.CHAR16, TypeKind.CHAR32, + TypeKind.SHORT, TypeKind.USHORT, TypeKind.INT, TypeKind.UINT, + TypeKind.LONG, TypeKind.ULONG, TypeKind.LONGLONG, TypeKind.ULONGLONG, + TypeKind.FLOAT, TypeKind.DOUBLE, TypeKind.LONGDOUBLE, +}) + + +def _generic_return_info(objc_type: str) -> Optional[tuple[str, str]]: + """Return `(template_param, cpp_return_type)` when `objc_type` is a + generic-parameter return that upstream metal-cpp emits as a templated + accessor, else None. Two shapes are recognized: + + * Bare generic param (`ObjectType`/`KeyType`/`ValueType`) — emitted as + `template _X* foo(...)`. + * `NSEnumerator *` — emitted as + `template Enumerator<_X>* foo(...)`. Matches + upstream's `Dictionary::keyEnumerator<_KeyType>()` form. + """ + s = re.sub( + r"\b(_Nullable|_Nonnull|_Null_unspecified|" + r"__autoreleasing|__strong|__weak|__unsafe_unretained)\b", + "", objc_type) + s = re.sub(r"\s+", " ", s).strip() + if s in _GENERIC_PARAM_RETURNS: + t = _GENERIC_PARAM_RETURNS[s] + return (t, f"{t}*") + m = re.match(r"^NSEnumerator\s*<\s*(\w+)\s*>\s*\*$", s) + if m and m.group(1) in _GENERIC_PARAM_RETURNS: + t = _GENERIC_PARAM_RETURNS[m.group(1)] + return (t, f"Enumerator<{t}>*") + return None + + +def _is_generic_return(objc_type: str) -> bool: + """True when a method's ObjC return type is a generic parameter — see + `_generic_return_info` for the recognized shapes.""" + return _generic_return_info(objc_type) is not None + + +def _enum_value_expr(cursor) -> Optional[str]: + """Source text of an enum constant's initializer expression, or None + when the constant has no explicit `= `. Lets emitted enums keep + Apple's hand-written forms (`(1ULL << 40)`, `Foo | Bar`) instead of + the libclang-evaluated integer.""" + try: + ext = cursor.extent + f = ext.start.file + if f is None: + return None + length = ext.end.offset - ext.start.offset + if length <= 0: + return None + with open(f.name, "rb") as fp: + fp.seek(ext.start.offset) + src = fp.read(length).decode("utf-8", errors="replace") + except (OSError, AttributeError, ValueError): + return None + eq = src.find("=") + if eq < 0: + return None + return src[eq + 1:].strip() + + +def _synth_block_name(method_cpp_name: str) -> str: + """Synthesize a block typedef name from a method's cpp name. Mirrors + upstream metal-cpp's naming (`addLogHandler` → `LogHandlerBlock`). + Strips trailing 'Block' before appending so we don't end up with + 'EnumerateByteRangesUsingBlockBlock'.""" + name = method_cpp_name + for prefix in ("add", "set", "with", "register", "remove", "insert"): + rest = name[len(prefix):] + if name.startswith(prefix) and rest and rest[0].isupper(): + name = rest + break + else: + name = name[0].upper() + name[1:] + if name.endswith("Block"): + name = name[:-len("Block")] + return name + "Block" + + +def parse_apinotes_renames(path: Path) -> dict[str, dict[str, str]]: + """Parse Apple's `.apinotes` file, returning a nested map + `{class_name: {selector: cpp_name}}` derived from SwiftName entries. + + Apple's apinotes are YAML with directives like + Classes: + - Name: MTLRenderCommandEncoder + Methods: + - Selector: 'setBlendColorRed:green:blue:alpha:' + SwiftName: setBlendColor(red:green:blue:alpha:) + + The SwiftName's method part (before the `(`) is the canonical short + name Apple intends. metal-cpp follows ObjC selector conventions rather + than Swift's, so we apply only the renames Swift derived by stripping + the first argument label from the selector's first segment — the + standard ObjC convention (`setBlendColorRed:green:blue:alpha:` → + `setBlendColor` with first label `red:`). SwiftNames that rewrite the + method itself (`copyFromTexture:toTexture:` → `copy`, `commandBuffer` + → `makeCommandBuffer`) diverge from upstream metal-cpp and are + skipped — heuristic handles those.""" + import yaml # local import — apinotes are optional + try: + with open(path) as f: + doc = yaml.safe_load(f) or {} + except (OSError, yaml.YAMLError): + return {} + + result: dict[str, dict[str, str]] = {} + for section in ("Classes", "Protocols"): + for entry in doc.get(section, []) or []: + cls = entry.get("Name") + methods = entry.get("Methods") or [] + if not cls or not methods: + continue + renames: dict[str, str] = {} + for m in methods: + sel = m.get("Selector") + swift = m.get("SwiftName") + if not sel or not swift: + continue + # Split `setBlendColor(red:green:blue:alpha:)` into + # ("setBlendColor", ["red", "green", "blue", "alpha"]). + paren = swift.find("(") + if paren < 0: + continue + cpp_name = swift[:paren] + arg_labels = [a for a in swift[paren + 1:swift.rfind(")")].split(":") if a] + if not cpp_name or cpp_name.startswith("_") or not cpp_name[0].isalpha(): + continue + first_seg = sel.split(":", 1)[0] + # Apply only when SwiftName preserves the ObjC method root — + # i.e. first segment = cpp_name + capitalize(first_arg). + # `_` is Swift's "unnamed first parameter" marker, which means + # the selector already embeds the label in its method name + # (so first segment = cpp_name with nothing appended). + first_arg = arg_labels[0] if arg_labels else "" + if first_arg == "_": + first_arg = "" + expected = cpp_name + (first_arg[:1].upper() + first_arg[1:] if first_arg else "") + if first_seg != expected: + continue + renames[sel] = cpp_name + if renames: + # Same class name may appear in both Classes and Protocols + # (interface + protocol with matching name). Merge. + result.setdefault(cls, {}).update(renames) + return result + +def _safe_kind(cursor) -> Optional[CursorKind]: + """Get cursor kind, returning None for unknown kinds from newer SDKs.""" + try: + return cursor.kind + except ValueError: + return None + + +class ObjCParser: + """Parse Objective-C headers using libclang.""" + + def __init__(self, sdk_path: Path) -> None: + self.sdk_path = sdk_path + self.index = Index.create() + + def parse_header(self, header_path: Path) -> FrameworkData: + """Parse a single ObjC header and extract classes/enums.""" + args = [ + "-x", + "objective-c", + "-isysroot", + str(self.sdk_path), + "-fno-objc-arc", + "-Wno-everything", + ] + tu = self.index.parse( + str(header_path), + args=args, + options=(TranslationUnit.PARSE_DETAILED_PROCESSING_RECORD | TranslationUnit.PARSE_SKIP_FUNCTION_BODIES), + ) + + data = FrameworkData() + target = str(header_path) + + # First pass: collect @interface declarations + classes_by_name: dict[str, ObjCClass] = {} + for cursor in tu.cursor.get_children(): + loc = cursor.location + if not loc.file or loc.file.name != target: + continue + kind = _safe_kind(cursor) + if kind == CursorKind.OBJC_INTERFACE_DECL: + cls = self._parse_class(cursor) + if cls: + classes_by_name[cls.name] = cls + elif kind == CursorKind.OBJC_PROTOCOL_DECL: + # metal-cpp wraps protocols as concrete classes — same shape + # as @interface, but the "superclass" comes from a parent + # protocol (the first OBJC_PROTOCOL_REF child) rather than + # OBJC_SUPER_CLASS_REF. + cls = self._parse_protocol(cursor) + if cls: + classes_by_name[cls.name] = cls + elif kind == CursorKind.TYPEDEF_DECL: + # `typedef void (^MTLFooHandler)(...)` — Obj-C block typedef. + # Emit a `using` alias + std::function overload per upstream. + try: + ut = cursor.underlying_typedef_type + if ut.kind == TypeKind.BLOCKPOINTER: + block = _parse_block_typedef(cursor.spelling, ut.spelling) + if block: + data.blocks.append(block) + continue + except (AttributeError, ValueError): + pass + # Catch `typedef NS_ENUM(Underlying, Name) { ... }` — clang + # emits an anonymous ENUM_DECL plus a typedef pointing at it. + # _parse_enum returns None for the anonymous form, so re-enter + # through the typedef and pull both the underlying type and + # the enum values from the referenced declaration. + try: + decl = cursor.underlying_typedef_type.get_declaration() + if _safe_kind(decl) == CursorKind.ENUM_DECL: + underlying = decl.enum_type.spelling + if underlying: + # Inspect the typedef's tokens to distinguish + # NS_OPTIONS (flag enum, bitwise OR allowed) from + # NS_ENUM. libclang exposes the macro names via + # the cursor's tokens. + is_options = False + try: + for tok in cursor.get_tokens(): + if tok.spelling in ("NS_OPTIONS", "CF_OPTIONS", "MTL_OPTIONS"): + is_options = True + break + if tok.spelling in ("NS_ENUM", "CF_ENUM"): + break + except Exception: + pass + values: list[ObjCEnumValue] = [] + for child in decl.get_children(): + if _safe_kind(child) == CursorKind.ENUM_CONSTANT_DECL: + try: + v: Optional[int] = child.enum_value + except (ValueError, AttributeError): + v = None + values.append(ObjCEnumValue( + name=child.spelling, value=v, + value_expr=_enum_value_expr(child), + availability=cursor_availability(child))) + # Apple attaches the type-level `API_AVAILABLE` to + # the typedef, not the inner ENUM_DECL — pull from + # the cursor we're parsing here. + data.enums.append(ObjCEnum( + name=cursor.spelling, underlying_type=underlying, + values=values, is_options=is_options, + availability=cursor_availability(cursor))) + except (AttributeError, ValueError, AssertionError): + pass + # `typedef NSString * MyAlias` (NS_TYPED_ENUM-style string + # typedefs that back Apple's extern const groupings — e.g. + # `CADynamicRange`). Captured so the constants emitter can + # surface them as `using` aliases inside the namespace. + # Limited to NSString-backed aliases — typedefs over other + # ObjC classes (e.g. `MTLAutoreleasedRenderPipelineReflection + # = MTLRenderPipelineReflection*`) are intentionally not + # surfaced here; they'd require cross-header includes that + # the scanner doesn't yet emit. + try: + ut = cursor.underlying_typedef_type + spelling = ut.spelling + if spelling.strip() == "NSString *": + data.string_typedefs.append((cursor.spelling, spelling)) + except (AttributeError, ValueError): + pass + # `typedef MTLSamplePosition MTLCoordinate2D;` — record-type + # alias. The resolver wouldn't otherwise know MTLCoordinate2D + # is the same shape as a registered struct, and every method + # using it would fall through to `void*`. Chase typedef + # chains (the target may itself be a typedef wrapping a + # STRUCT_DECL), and record the immediate parent name — + # that's what's already registered with the resolver. + try: + ut = cursor.underlying_typedef_type + decl = ut.get_declaration() + target_name = "" + found_struct = False + for _ in range(8): # bounded walk to avoid pathological chains + k = _safe_kind(decl) + if k == CursorKind.STRUCT_DECL: + found_struct = True + # Apple's `typedef struct _Foo {...} Foo;` lands + # here on the first hop with no intermediate + # typedef. Fall back to the struct tag so the + # alias points at what `register_objc_declarations` + # actually registered. + if not target_name: + target_name = decl.spelling + break + if k == CursorKind.TYPEDEF_DECL: + # Remember the immediate alias name; we use it + # as the link target if the chain bottoms out + # at a STRUCT_DECL. + target_name = decl.spelling + decl = decl.underlying_typedef_type.get_declaration() + continue + break + if (found_struct and target_name + and target_name != cursor.spelling): + data.struct_aliases.append( + (cursor.spelling, target_name)) + except (AttributeError, ValueError, AssertionError): + pass + # `typedef MTLRenderPipelineReflection * + # MTLAutoreleasedRenderPipelineReflection;` — typedef + # to an ObjC class pointer. Surface as + # `using AutoreleasedRenderPipelineReflection = MTL::RenderPipelineReflection*;`. + # Captures cleanly via the libclang type kind. + try: + ut = cursor.underlying_typedef_type + if ut.kind == TypeKind.OBJCOBJECTPOINTER: + pointee = ut.get_pointee() + target_cls = pointee.get_declaration().spelling + if target_cls and target_cls != cursor.spelling: + data.class_pointer_aliases.append( + (cursor.spelling, target_cls)) + except (AttributeError, ValueError): + pass + # `typedef uint64_t MTLTimestamp;` — typedef over a builtin + # primitive type. libclang's type-system loses the original + # spelling (`uint64_t` reduces to `int`), so recover it from + # the typedef's source tokens — the underlying spelling + # always sits between `typedef` and the alias name. + try: + ut = cursor.underlying_typedef_type + # libclang reports `typedef uint64_t Foo;` with + # `ut.kind == ELABORATED` (wrapped typedef-alias name); + # the canonical type is the actual primitive kind. + canon_kind = ut.get_canonical().kind + if canon_kind in _PRIMITIVE_TYPE_KINDS: + toks = [t.spelling for t in cursor.get_tokens()] + if "typedef" in toks and cursor.spelling in toks: + i0 = toks.index("typedef") + 1 + i1 = toks.index(cursor.spelling, i0) + underlying_spell = " ".join(toks[i0:i1]).strip() + if (underlying_spell + and underlying_spell != cursor.spelling): + data.primitive_aliases.append( + (cursor.spelling, underlying_spell)) + except (AttributeError, ValueError): + pass + continue + elif kind == CursorKind.VAR_DECL: + # `extern const ` — surface as namespaced const + # bound to the system C symbol via __asm__ label. The non- + # canonical spelling preserves typedef aliases so emitted + # constants name them (`CA::DynamicRange const` rather than + # `NS::String* const`). + try: + if cursor.storage_class.name == "EXTERN": + data.constants.append(ObjCConstant( + c_name=cursor.spelling, + cpp_name=cursor.spelling, + cpp_type=cursor.type.spelling, + )) + except (AttributeError, ValueError): + pass + elif kind == CursorKind.ENUM_DECL: + enum = self._parse_enum(cursor) + if enum: + data.enums.append(enum) + elif kind == CursorKind.STRUCT_DECL: + # Named, file-scope C struct (e.g. MTL4BufferRange). Anonymous + # / nested structs are ignored — they reach us only through + # the TYPEDEF_DECL path and aren't generally part of the + # framework's public API. + if cursor.spelling and not cursor.spelling.startswith("("): + fields = [] + packed = False + for ch in cursor.get_children(): + ck = _safe_kind(ch) + if ck == CursorKind.FIELD_DECL: + ft = ch.type + if ft.kind == TypeKind.CONSTANTARRAY: + fields.append(ObjCStructField( + name=ch.spelling, + objc_type=ft.element_type.spelling, + array_size=ft.element_count)) + else: + fields.append(ObjCStructField( + name=ch.spelling, objc_type=ft.spelling)) + elif ck == CursorKind.PACKED_ATTR: + packed = True + if fields: + data.structs.append(ObjCStruct( + name=cursor.spelling, fields=fields, packed=packed, + availability=cursor_availability(cursor))) + + # Second pass: merge members from categories/extensions into classes + for cursor in tu.cursor.get_children(): + loc = cursor.location + if not loc.file or loc.file.name != target: + continue + if _safe_kind(cursor) != CursorKind.OBJC_CATEGORY_DECL: + continue + # Find which class this category extends + class_name = None + for child in cursor.get_children(): + if _safe_kind(child) == CursorKind.OBJC_CLASS_REF: + class_name = child.spelling + break + if not class_name or class_name not in classes_by_name: + continue + # Parse the category like a class and merge members + cat = self._parse_class_members(cursor) + target_cls = classes_by_name[class_name] + existing_props = {p.name for p in target_cls.properties} + existing_sels = {m.selector for m in target_cls.methods} + for p in cat.properties: + if p.name not in existing_props: + target_cls.properties.append(p) + for m in cat.methods: + if m.selector not in existing_sels: + target_cls.methods.append(m) + + data.classes = list(classes_by_name.values()) + + # `typedef NS_ENUM(Underlying, Name) { ... }` produces two cursors — + # a TYPEDEF_DECL and an anonymous ENUM_DECL whose name we + # synthesize from the typedef. Both paths above append to + # `data.enums`; collapse the dupes (first occurrence wins, since + # the TYPEDEF_DECL handler runs first). Anonymous loose-constant + # blocks have empty `name` and stay distinct. + if data.enums: + seen: set[str] = set() + deduped: list[ObjCEnum] = [] + for e in data.enums: + if e.name: + if e.name in seen: + continue + seen.add(e.name) + deduped.append(e) + data.enums = deduped + + # Synthesize block typedefs for inline (anonymous) block parameters. + # Apple's SDK frequently declares them without a `typedef`, so the + # spelling we see on the param is `void (^)(arg1, arg2)` and the + # resolver has nothing to map it to. Each unique block spelling gets + # a synthetic typedef named after the method that first used it + # (matching upstream metal-cpp's `LogHandlerBlock` etc.). + block_by_spelling: dict[str, str] = {b.name: b.name for b in data.blocks} + existing_names = {b.name for b in data.blocks} + for cls in data.classes: + for m in cls.methods: + for p in m.params: + if "(^" not in p.objc_type: + continue + spelling = p.objc_type + if spelling in block_by_spelling: + p.objc_type = block_by_spelling[spelling] + continue + base = _synth_block_name(m.cpp_name) + synth = base + k = 2 + while synth in existing_names: + synth = f"{base}{k}" + k += 1 + blk = _parse_block_typedef(synth, spelling) + if not blk: + continue + data.blocks.append(blk) + existing_names.add(synth) + block_by_spelling[spelling] = synth + p.objc_type = synth + return data + + def _parse_class_members(self, cursor) -> ObjCClass: + """Parse properties/methods from a cursor (class or category).""" + cls = ObjCClass(name="") + for child in cursor.get_children(): + kind = _safe_kind(child) + if kind == CursorKind.OBJC_PROPERTY_DECL: + prop = self._parse_property(child) + if prop: + cls.properties.append(prop) + elif kind == CursorKind.OBJC_INSTANCE_METHOD_DECL: + method = self._parse_method(child, is_class=False) + if method: + cls.methods.append(method) + elif kind == CursorKind.OBJC_CLASS_METHOD_DECL: + method = self._parse_method(child, is_class=True) + if method: + cls.methods.append(method) + elif kind == CursorKind.OBJC_PROTOCOL_REF: + cls.protocols.append(child.spelling) + # Remove synthesized accessor methods that duplicate properties. + prop_sels = set() + for prop in cls.properties: + prop_sels.add(prop.name) + if not prop.is_readonly: + prop_sels.add(f"set{prop.name[0].upper()}{prop.name[1:]}:") + cls.methods = [m for m in cls.methods if m.selector not in prop_sels] + return cls + + def _parse_class(self, cursor) -> Optional[ObjCClass]: + name = cursor.spelling + if not name: + return None + + superclass = "" + for child in cursor.get_children(): + if _safe_kind(child) == CursorKind.OBJC_SUPER_CLASS_REF: + superclass = child.spelling + break + + cls = self._parse_class_members(cursor) + cls.name = name + cls.superclass = superclass or "NSObject" + cls.availability = cursor_availability(cursor) + return cls + + def _parse_protocol(self, cursor) -> Optional[ObjCClass]: + """Parse an @protocol as a class wrapper, matching upstream metal-cpp's + shape (e.g. MTLBuffer protocol → class MTL::Buffer inheriting from + MTL::Resource). The superclass is the first conformed-to protocol; + falls back to NSObject when the protocol only conforms to NSObject.""" + name = cursor.spelling + if not name: + return None + + cls = self._parse_class_members(cursor) + cls.name = name + cls.is_protocol = True + # _parse_class_members already populated cls.protocols from + # OBJC_PROTOCOL_REF children. Pick the first non-NSObject one as base. + super_proto = next( + (p for p in cls.protocols if p not in ("NSObject", "NSCopying", "NSSecureCoding")), + "", + ) + cls.superclass = super_proto or "NSObject" + cls.availability = cursor_availability(cursor) + return cls + + def _parse_property(self, cursor) -> Optional[ObjCProperty]: + name = cursor.spelling + if not name: + return None + + objc_type = cursor.type.spelling + tokens = [t.spelling for t in cursor.get_tokens()] + is_readonly = "readonly" in tokens + is_class = "class" in tokens + + return ObjCProperty( + name=name, + objc_type=objc_type, + is_readonly=is_readonly, + is_class_property=is_class, + availability=cursor_availability(cursor), + ) + + def _parse_method(self, cursor, is_class: bool) -> Optional[ObjCMethod]: + selector = cursor.spelling + if not selector: + return None + + return_type = cursor.result_type.spelling + + params = [] + for child in cursor.get_children(): + if _safe_kind(child) == CursorKind.PARM_DECL: + params.append( + ObjCParam( + name=child.spelling or f"param{len(params)}", + objc_type=child.type.spelling, + ) + ) + + return ObjCMethod( + selector=selector, + return_type=return_type, + params=params, + is_class_method=is_class, + availability=cursor_availability(cursor), + ) + + def _parse_enum(self, cursor) -> Optional[ObjCEnum]: + name = cursor.spelling + is_anonymous = (not name) or name.startswith("enum ") or "unnamed" in name + if is_anonymous: + # Anonymous `NS_ENUM(NSStringEncoding) { ... }` — Apple's one-arg + # macro form: the underlying typedef *is* the logical enum name. + # Synthesize the name from it so the emitter produces a real + # `_NS_ENUM(NS::UInteger, StringEncoding) { ... }` instead of + # loose `inline constexpr` constants. Underlyings that are + # primitive integer aliases (NSUInteger, NSInteger) stay + # anonymous — those rarely carry a logical group identity. + children = [ch for ch in cursor.get_children() + if _safe_kind(ch) == CursorKind.ENUM_CONSTANT_DECL] + if not children: + return None + values = [] + for child in children: + try: + v = child.enum_value + except (ValueError, AttributeError): + v = None + values.append(ObjCEnumValue( + name=child.spelling, value=v, + value_expr=_enum_value_expr(child), + availability=cursor_availability(child))) + underlying_spelling = cursor.enum_type.spelling if cursor.enum_type else "NSUInteger" + synth_name = "" + underlying = underlying_spelling + if (re.fullmatch(r"[A-Z]\w*", underlying_spelling) + and underlying_spelling not in {"NSUInteger", "NSInteger", "NSTimeInterval"}): + synth_name = underlying_spelling + # Walk one typedef hop to get the real integer type for the + # macro's first arg (NSStringEncoding → NSUInteger). + try: + typedef_decl = cursor.enum_type.get_declaration() + if _safe_kind(typedef_decl) == CursorKind.TYPEDEF_DECL: + underlying = typedef_decl.underlying_typedef_type.spelling + except (AttributeError, ValueError): + pass + return ObjCEnum(name=synth_name, underlying_type=underlying, + values=values, + availability=cursor_availability(cursor)) + # Skip forward declarations: clang emits two ENUM_DECL cursors for a + # typedef NS_ENUM (one forward, one with the body). Take only the one + # with constants so collect_enum sees the populated values. + if not any(_safe_kind(ch) == CursorKind.ENUM_CONSTANT_DECL + for ch in cursor.get_children()): + return None + + underlying = cursor.enum_type.spelling if cursor.enum_type else "unsigned long" + + values = [] + for child in cursor.get_children(): + if _safe_kind(child) == CursorKind.ENUM_CONSTANT_DECL: + values.append( + ObjCEnumValue( + name=child.spelling, + value=child.enum_value, + value_expr=_enum_value_expr(child), + availability=cursor_availability(child), + ) + ) + + return ObjCEnum(name=name, underlying_type=underlying, values=values, + availability=cursor_availability(cursor)) + + +# ── Code generation ────────────────────────────────────────────────────── + + +# Special-case emission for NS::Object — the CRTP root. Was originally +# kept verbatim from Apple's metal-cpp; now generated so the directly- +# named selectors (retain/release/autorelease/copy/hash/description/…) go +# through the same `_objc_msgSend$` stub trampolines every other +# wrapper uses. `sendMessage` / `sendMessageSafe` remain as an escape +# hatch for arbitrary-selector dispatch (used by custom code that needs +# to call a selector not in the wrapped surface). +_NSOBJECT_HPP = """\ +#pragma once + +// NS::Object — the CRTP root. Emitted by tools/generate.py; was formerly +// copied verbatim from Apple's metal-cpp/Foundation/NSObject.hpp. +// +// Directly-named selectors (retain/release/autorelease/retainCount/copy/ +// hash/isEqual:/description/debugDescription/init/alloc/ +// respondsToSelector:/methodSignatureForSelector:) dispatch through the +// linker-synthesized `_objc_msgSend$` trampolines — same shape every +// other generated class uses. `sendMessage` / `sendMessageSafe` are kept +// for callers that need to dispatch an arbitrary runtime SEL. + +#include "NSDefines.hpp" +#include "NSTypes.hpp" +#include "NSBridge.hpp" + +#include +#include + +#include + +namespace NS +{ +class Object; +class String; +class MethodSignature; +} // namespace NS + +namespace NS +{ +template +class _NS_EXPORT Referencing : public _Base +{ +public: + _Class* retain(); + void release(); + _Class* autorelease(); + UInteger retainCount() const; +}; + +template +class Copying : public Referencing<_Class, _Base> +{ +public: + _Class* copy() const; +}; + +template +class SecureCoding : public Referencing<_Class, _Base> +{ +}; + +class Object : public Referencing +{ +public: + UInteger hash() const; + bool isEqual(const Object* pObject) const; + + class String* description() const; + class String* debugDescription() const; + + template + static _Ret sendMessage(const void* pObj, SEL selector, _Args... args); + + template + static _Ret sendMessageSafe(const void* pObj, SEL selector, _Args... args); + +protected: + friend class Referencing; + + template + static _Class* alloc(const char* pClassName); + template + static _Class* alloc(const void* pClass); + template + _Class* init(); + + template + static _Dst bridgingCast(const void* pObj); + static class MethodSignature* methodSignatureForSelector(const void* pObj, SEL selector); + static bool respondsToSelector(const void* pObj, SEL selector); + template + static constexpr bool doesRequireMsgSendStret(); + +private: + Object() = delete; + Object(const Object&) = delete; + ~Object() = delete; + + Object& operator=(const Object&) = delete; +}; +} // namespace NS + +// --- Inline implementations --- + +template +_NS_INLINE _Class* NS::Referencing<_Class, _Base>::retain() +{ + return reinterpret_cast<_Class*>(_NS_msg_NSObject_retain((const void*)this, nullptr)); +} + +template +_NS_INLINE void NS::Referencing<_Class, _Base>::release() +{ + _NS_msg_NSObject_release((const void*)this, nullptr); +} + +template +_NS_INLINE _Class* NS::Referencing<_Class, _Base>::autorelease() +{ + return reinterpret_cast<_Class*>(_NS_msg_NSObject_autorelease((const void*)this, nullptr)); +} + +template +_NS_INLINE NS::UInteger NS::Referencing<_Class, _Base>::retainCount() const +{ + return _NS_msg_NSObject_retainCount((const void*)this, nullptr); +} + +template +_NS_INLINE _Class* NS::Copying<_Class, _Base>::copy() const +{ + return reinterpret_cast<_Class*>(_NS_msg_NSObject_copy((const void*)this, nullptr)); +} + +template +_NS_INLINE _Dst NS::Object::bridgingCast(const void* pObj) +{ +#ifdef __OBJC__ + return (__bridge _Dst)pObj; +#else + return (_Dst)pObj; +#endif // __OBJC__ +} + +template +_NS_INLINE constexpr bool NS::Object::doesRequireMsgSendStret() +{ +#if (defined(__i386__) || defined(__x86_64__)) + constexpr size_t kStructLimit = (sizeof(std::uintptr_t) << 1); + return sizeof(_Type) > kStructLimit; +#elif defined(__arm64__) + return false; +#elif defined(__arm__) + constexpr size_t kStructLimit = sizeof(std::uintptr_t); + return std::is_class_v<_Type> && (sizeof(_Type) > kStructLimit); +#else +#error "Unsupported architecture!" +#endif +} + +template <> +_NS_INLINE constexpr bool NS::Object::doesRequireMsgSendStret() +{ + return false; +} + +// `sendMessage` keeps the upstream architecture-aware dispatch: x86 uses +// objc_msgSend_fpret for floating-point returns and objc_msgSend_stret +// for large structs, arm64 always uses regular objc_msgSend. +template +_NS_INLINE _Ret NS::Object::sendMessage(const void* pObj, SEL selector, _Args... args) +{ +#if (defined(__i386__) || defined(__x86_64__)) + if constexpr (std::is_floating_point<_Ret>()) + { + using SendMessageProcFpret = _Ret (*)(const void*, SEL, _Args...); + const SendMessageProcFpret pProc = reinterpret_cast(&objc_msgSend_fpret); + return (*pProc)(pObj, selector, args...); + } + else +#endif +#if !defined(__arm64__) + if constexpr (doesRequireMsgSendStret<_Ret>()) + { + using SendMessageProcStret = void (*)(_Ret*, const void*, SEL, _Args...); + const SendMessageProcStret pProc = reinterpret_cast(&objc_msgSend_stret); + _Ret ret; + (*pProc)(&ret, pObj, selector, args...); + return ret; + } + else +#endif + { + using SendMessageProc = _Ret (*)(const void*, SEL, _Args...); + const SendMessageProc pProc = reinterpret_cast(&objc_msgSend); + return (*pProc)(pObj, selector, args...); + } +} + +_NS_INLINE NS::MethodSignature* NS::Object::methodSignatureForSelector(const void* pObj, SEL selector) +{ + return _NS_msg_NSObject_methodSignatureForSelector_(pObj, nullptr, selector); +} + +_NS_INLINE bool NS::Object::respondsToSelector(const void* pObj, SEL selector) +{ + return _NS_msg_NSObject_respondsToSelector_(pObj, nullptr, selector); +} + +template +_NS_INLINE _Ret NS::Object::sendMessageSafe(const void* pObj, SEL selector, _Args... args) +{ + if ((respondsToSelector(pObj, selector)) || (nullptr != methodSignatureForSelector(pObj, selector))) + { + return sendMessage<_Ret>(pObj, selector, args...); + } + + if constexpr (!std::is_void<_Ret>::value) + { + return _Ret(0); + } +} + +template +_NS_INLINE _Class* NS::Object::alloc(const char* pClassName) +{ + // objc_lookUpClass returns `Class` (objc_class*). Under ObjC ARC, + // bridging a Class to a non-retainable pointer needs `__bridge`; + // in pure C++ translation units the macro expands to nothing. +#if __has_feature(objc_arc) + const void* cls = (__bridge const void*)objc_lookUpClass(pClassName); +#else + const void* cls = (const void*)objc_lookUpClass(pClassName); +#endif + return reinterpret_cast<_Class*>(_NS_msg_NSObject_alloc(cls, nullptr)); +} + +template +_NS_INLINE _Class* NS::Object::alloc(const void* pClass) +{ + return reinterpret_cast<_Class*>(_NS_msg_NSObject_alloc(pClass, nullptr)); +} + +template +_NS_INLINE _Class* NS::Object::init() +{ + return reinterpret_cast<_Class*>(_NS_msg_NSObject_init((const void*)this, nullptr)); +} + +_NS_INLINE NS::UInteger NS::Object::hash() const +{ + return _NS_msg_NSObject_hash((const void*)this, nullptr); +} + +_NS_INLINE bool NS::Object::isEqual(const Object* pObject) const +{ + return _NS_msg_NSObject_isEqual_((const void*)this, nullptr, pObject); +} + +_NS_INLINE NS::String* NS::Object::description() const +{ + return _NS_msg_NSObject_description((const void*)this, nullptr); +} + +_NS_INLINE NS::String* NS::Object::debugDescription() const +{ + return _NS_msg_NSObject_debugDescription((const void*)this, nullptr); +} +""" + + +# Special-case emission for NSEnumerator.hpp — used to be kept verbatim +# because libclang can't surface `template ` methods +# on the wrapped protocol. Emitted by the generator so it uses the same +# stub trampolines as everything else; drops the `_NS_PRIVATE_SEL` +# dependency entirely. +_NSENUMERATOR_HPP = """\ +#pragma once + +// NS::Enumerator / NS::FastEnumeration — emitted by tools/generate.py +// (used to live verbatim under metal-cpp-apple). The kept-upstream +// version routed through `_NS_PRIVATE_SEL`; this version dispatches +// directly through the linker-synthesized `_objc_msgSend$` stubs +// so it stops pulling Apple's selector-registration machinery into the +// tree. + +#include "NSDefines.hpp" +#include "NSObject.hpp" +#include "NSTypes.hpp" +#include "NSBridge.hpp" + +namespace NS +{ +class Array; +class FastEnumeration; +template class Enumerator; +} // namespace NS + +namespace NS +{ +struct FastEnumerationState +{ + unsigned long state; + Object** itemsPtr; + unsigned long* mutationsPtr; + unsigned long extra[5]; +} _NS_PACKED; + +class FastEnumeration : public Referencing +{ +public: + NS::UInteger countByEnumerating(FastEnumerationState* pState, Object** pBuffer, NS::UInteger len); +}; + +template +class Enumerator : public Referencing, FastEnumeration> +{ +public: + _ObjectType* nextObject(); + class Array* allObjects(); +}; +} // namespace NS + +// --- Inline implementations --- + +_NS_INLINE NS::UInteger NS::FastEnumeration::countByEnumerating( + FastEnumerationState* pState, Object** pBuffer, NS::UInteger len) +{ + return _NS_msg_NSFastEnumeration_countByEnumeratingWithState_objects_count_( + (const void*)this, nullptr, pState, pBuffer, len); +} + +template +_NS_INLINE _ObjectType* NS::Enumerator<_ObjectType>::nextObject() +{ + return reinterpret_cast<_ObjectType*>( + _NS_msg_NSEnumerator_nextObject((const void*)this, nullptr)); +} + +template +_NS_INLINE NS::Array* NS::Enumerator<_ObjectType>::allObjects() +{ + return _NS_msg_NSEnumerator_allObjects((const void*)this, nullptr); +} +""" + + +class CodeGenerator: + """Generate metal-cpp style C++ wrappers for a single framework.""" + + # Namespace → output directory. MTL4 shares Metal/ with MTL so a + # cross-namespace include from MTL to MTL4 (or vice versa) is a + # same-dir reference, not `../OtherDir/`. + FW_NS_TO_DIR = {"NS": "Foundation", "MTL": "Metal", "MTL4": "Metal", + "MTLFX": "MetalFX", "MTL4FX": "MetalFX", + "CA": "QuartzCore"} + + # NS:: typedefs and value types that look like class refs to the + # `::` regex sweep but must NOT be forward-declared + # as classes (they're primitives / aliases owned by NSTypes.hpp). + NOT_A_CLASS = { + "Integer", "UInteger", "TimeInterval", "Range", "ComparisonResult", + "Comparator", "ErrorDomain", "ErrorUserInfoKey", "DecimalNumber", + } + + def __init__( + self, + namespace: str, + prefix: str, + strip_prefix: str, + resolver: TypeResolver, + ) -> None: + self.ns = namespace + self.prefix = prefix + self.strip_prefix = strip_prefix + self.resolver = resolver + + # When False, the corresponding `API_AVAILABLE(...)` annotations are + # dropped from the generated source. `types` covers class / enum / + # struct type declarations; `members` covers methods, property + # getters/setters, and enum values. Both default off (matches the CLI + # flag default in generate.py). + self.emit_availability_types: bool = False + self.emit_availability_members: bool = False + + # Accumulated across all classes for Private.hpp + self.all_selectors: dict[str, str] = {} # accessor → ObjC selector string + self.all_classes: set[str] = set() # ObjC class names + self.all_enums: list[ObjCEnum] = [] # in declaration order + self._enum_names_seen: set[str] = set() + self.all_blocks: list[ObjCBlockTypedef] = [] + self._block_names_seen: set[str] = set() + self.all_structs: list[ObjCStruct] = [] + self._struct_names_seen: set[str] = set() + # `using Coordinate2D = MTL::SamplePosition;` style aliases — + # `typedef MTLSamplePosition MTLCoordinate2D` in the SDK, emitted + # alongside the underlying struct in `

Structs.hpp` so consumers + # see the alias name (`MTL::Coordinate2D`) the public API uses. + # List of (alias_cpp_name, target_cpp_qualified). + self.all_struct_aliases: list[tuple[str, str]] = [] + self._struct_alias_names_seen: set[str] = set() + self.generated_headers: list[str] = [] + # Upstream-kept header basenames for this framework (no `.hpp`). + # `

Structs.hpp` includes these so generated class headers that + # reference a `skip: true` struct (e.g. MTL::BufferRange owned by + # the hand-written MTLAccelerationStructureTypes.hpp) can pull the + # definition in via the framework's Structs aggregate. + self.keep_upstream: list[str] = [] + # Umbrella include lines prepended to .hpp (lets one framework's + # umbrella pull in a co-resident sibling's). + self.extra_umbrella_includes: list[str] = [] + # Output subdirectory this framework writes to (filename of the dir + # under `metal-cpp/`). Defaults to the framework name; differs for + # virtual frameworks like Metal4 that share Metal/. + self.output_subdir: str = "" + # ObjC class name → SDK header basename (no `.h`). Used by the + # per-source-header emitter to pick the right `#include` for a + # superclass that lives in another header. + self.class_to_source: dict[str, str] = {} + # Bridge registry: every (return type, arg types, selector) tuple + # used by any class trampoline in this framework collapses to a + # single deduped extern "C" decl emitted in `

Bridge.hpp`. + # Identical selectors with the same C++ signature (e.g. `label` + # returning `NS::String*` across N classes) share one entry. + self._bridge_by_sig: dict[tuple, str] = {} # (ret, args, sel) → name + self._bridge_by_name: dict[str, tuple] = {} # name → sig (collision check) + self._bridge_entries: list[tuple[str, str, list[str], str]] = [] # (name, ret, args, sel) + self._bridge_call_count: int = 0 # call sites — pre-dedup extern count + + @property + def has_blocks(self) -> bool: + """True when `Blocks.hpp` would carry any block typedef.""" + return bool(self.all_blocks) + + @property + def has_structs(self) -> bool: + """True when `Structs.hpp` would carry any struct or + struct-alias `using` declaration.""" + return bool(self.all_structs) or bool(self.all_struct_aliases) + + @property + def needs_availability_header(self) -> bool: + """True when any emitted file references the `API_AVAILABLE` macro + family — i.e. at least one of the two availability flags is on.""" + return self.emit_availability_types or self.emit_availability_members + + def _av_type(self, av: Availability) -> str: + """Return ` API_AVAILABLE(...)` for a type declaration (class / + enum / struct), or empty when type-level availability is disabled.""" + if not self.emit_availability_types: + return "" + s = format_availability(av) + return f" {s}" if s else "" + + def _av_member(self, av: Availability) -> str: + """Return ` API_AVAILABLE(...)` for a member (method / property / + enum value), or empty when member-level availability is disabled.""" + if not self.emit_availability_members: + return "" + s = format_availability(av) + return f" {s}" if s else "" + + def collect_enum(self, enum: ObjCEnum) -> None: + # Anonymous enums have empty `name` — they all need to flow through + # to emit their constants. Only dedupe named enums. + if enum.name and enum.name in self._enum_names_seen: + return + if enum.name: + self._enum_names_seen.add(enum.name) + self.all_enums.append(enum) + + def collect_block(self, block: ObjCBlockTypedef) -> None: + if block.name in self._block_names_seen: + return + self._block_names_seen.add(block.name) + self.all_blocks.append(block) + + def is_block(self, objc_type: str) -> bool: + """True iff `objc_type` is one of our generated block typedefs.""" + return objc_type.strip() in self._block_names_seen + + def collect_struct(self, s: ObjCStruct) -> None: + if s.name in self._struct_names_seen: + return + self._struct_names_seen.add(s.name) + self.all_structs.append(s) + + def collect_struct_alias(self, alias_cpp: str, target_cpp_qual: str) -> None: + if alias_cpp in self._struct_alias_names_seen: + return + self._struct_alias_names_seen.add(alias_cpp) + self.all_struct_aliases.append((alias_cpp, target_cpp_qual)) + + # ── Helpers ──────────────────────────────────────────────────────── + + def cpp_class_name(self, objc_name: str) -> str: + """Strip ObjC prefix to get C++ class name (e.g. NSScreen → Screen).""" + return strip_objc_prefix(objc_name, self.strip_prefix) + + def _resolve(self, objc_type: str, cls_name: str = "", context: str = "") -> str: + """Resolve type, handling instancetype → concrete class.""" + cpp_name = self.cpp_class_name(cls_name) if cls_name else "" + return resolve_type(self.resolver, objc_type, self.ns, cpp_name) + + def _system_includes(self, resolved_types: set[str]) -> list[str]: + """Determine system #include directives needed for the given resolved types.""" + headers = set() + for t in resolved_types: + # Strip pointer/const to get base type + base = t.rstrip("*").strip() + if base.startswith("const "): + base = base[6:].strip() + if base in SYSTEM_HEADER_FOR_TYPE: + headers.add(SYSTEM_HEADER_FOR_TYPE[base]) + return sorted(headers) + + # ── Selector collection ─────────────────────────────────────────── + + def collect_selectors(self, cls: ObjCClass) -> None: + """Collect selector/class registrations for Private.hpp.""" + self.all_classes.add(cls.name) + + for prop in cls.properties: + self.all_selectors[prop.name] = prop.name + if not prop.is_readonly: + sname = setter_name(prop.name) + self.all_selectors[f"{sname}_"] = f"{sname}:" + + for method in cls.methods: + self.all_selectors[method.sel_accessor] = method.selector + + # ── File generators ─────────────────────────────────────────────── + + def generate_bridge_header(self) -> str: + """Emit `

Bridge.hpp`: one extern "C" trampoline decl per unique + (return type, arg types, selector) tuple recorded for this + framework. Per-class headers include this file in place of carrying + their own externs — a `label` returning `NS::String*` across N + classes collapses to one decl here. + + Cross-namespace types referenced in any signature are forward- + declared (classes) or opaque-enum-declared (enums); structs and + blocks need full definitions so the framework's own `

Structs.hpp` + / `

Blocks.hpp` are included when populated, and sibling + frameworks' aggregates are pulled in for cross-framework references. + """ + p = self.prefix + ns = self.ns + ns_root = "" if ns == "NS" else "../Foundation/" + + lines = [ + "#pragma once", + "", + "// Consolidated extern \"C\" trampoline decls for this framework.", + "// One entry per (return, args, selector) — identical C++ signatures", + "// across multiple classes collapse to a single linker alias of", + "// `_objc_msgSend$`. Per-class headers include this file", + "// instead of declaring their own externs.", + "", + f'#include "{p}Defines.hpp"', + # `SEL` is the second parameter of every trampoline. + "#include ", + # `NS::UInteger`, `NS::Object`, etc. flow through here. NS framework + # already gets them from its own NSTypes.hpp; sibling frameworks + # need the relative path. + f'#include "{ns_root}NSTypes.hpp"', + ] + if self.has_blocks: + lines.append(f'#include "{p}Blocks.hpp"') + if self.has_structs: + lines.append(f'#include "{p}Structs.hpp"') + + # Walk every recorded signature once to learn which other-namespace + # classes / enums / aggregates we touch and need to surface here. + sig_types: set[str] = set() + for _name, ret, args, _sel in self._bridge_entries: + sig_types.add(ret) + sig_types.update(args) + + fwd_decls: dict[str, set[str]] = {} + fwd_template_decls: dict[str, set[str]] = {} # template forward decls + fwd_enums: dict[str, dict[str, tuple[str, bool]]] = {} + cross_fw_includes: set[str] = set() + # Class templates — declared as template forward decls inline so + # the bridge stays a leaf header (including their real definitions + # would cycle: NSEnumerator.hpp itself includes NSBridge.hpp). + TEMPLATE_CLASSES = {("NS", "Enumerator"): "_ObjectType"} + for resolved in sig_types: + for ns_name, cpp_cls in re.findall( + r"\b(NS|MTL4FX|MTL4|MTLFX|MTL|CA)::(\w+)", resolved): + if cpp_cls in self.NOT_A_CLASS: + continue + tparam = TEMPLATE_CLASSES.get((ns_name, cpp_cls)) + if tparam: + fwd_template_decls.setdefault(ns_name, set()).add( + f"template class {cpp_cls};") + continue + qual = f"{ns_name}::{cpp_cls}" + kind = self.resolver.kinds.get(qual, "class") + if kind == "enum": + underlying = self.resolver.enum_underlying.get(qual) + if underlying: + is_options = self.resolver.enum_is_options.get(qual, False) + fwd_enums.setdefault(ns_name, {})[cpp_cls] = (underlying, is_options) + continue + if kind == "typedef": + # Typedef/using aliases flow through Structs (e.g. + # `MTL::GPUAddress` = `uint64_t`) or appear later in + # a per-class header. The bridge can't forward-declare + # them — `class GPUAddress;` would clash with the + # actual `using` definition. String-typedef aliases + # have already been rewritten to their underlying type + # in `_stub`, so anything that reaches here surfaces + # via Structs and is already visible. + continue + if kind in ("block", "struct"): + # Cross-framework aggregates need a real include — their + # definitions can't be forward-declared. + if ns_name != self.ns: + suffix = "Blocks" if kind == "block" else "Structs" + fw_dir = self.FW_NS_TO_DIR.get(ns_name, ns_name) + fw_prefix = self.resolver.frameworks.get(qual, ns_name) + cross_fw_includes.add( + f'#include "../{fw_dir}/{fw_prefix}{suffix}.hpp"') + continue + # Plain class — forward decl is enough since the bridge only + # uses pointers to it. + fwd_decls.setdefault(ns_name, set()).add(cpp_cls) + + for inc in sorted(cross_fw_includes): + lines.append(inc) + + # System headers referenced by signature types (e.g. for + # uint32_t). The class-header emission path uses _system_includes + # for the same purpose; reuse it here. + for header in self._system_includes(sig_types): + lines.append(f"#include <{header}>") + + if fwd_decls or fwd_enums or fwd_template_decls: + lines.append("") + all_ns = sorted(set(fwd_decls) | set(fwd_enums) | set(fwd_template_decls)) + for ns_name in all_ns: + lines.append(f"namespace {ns_name} {{") + for cls_fwd in sorted(fwd_decls.get(ns_name, set())): + lines.append(f" class {cls_fwd};") + for tmpl in sorted(fwd_template_decls.get(ns_name, set())): + lines.append(f" {tmpl}") + for enum_name, (underlying, is_options) in sorted( + fwd_enums.get(ns_name, {}).items()): + lines.append(self._format_enum_fwd_decl( + enum_name, underlying, is_options, indent=" ")) + lines.append("}") + + lines += [ + "", + "#pragma clang diagnostic push", + '#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"', + # Bridge trampolines reference availability-attributed types as + # opaque pointers (e.g. `MTL::ResidencySet*`, macOS 15+) without + # restating the attribute per decl. The per-class wrapper that + # dispatches through a trampoline carries the public + # `API_AVAILABLE`, so a call site on an older OS still warns at + # the right level. Scoped to this block by the surrounding + # push/pop — clients of the bridge see their original setting. + '#pragma clang diagnostic ignored "-Wunguarded-availability-new"', + "", + 'extern "C" {', + ] + # Sorting by selector then deduped name keeps emission deterministic + # and groups all overloads of the same selector together — easier + # to skim when something looks off. + for name, ret_cpp, arg_types, selector in sorted( + self._bridge_entries, key=lambda e: (e[3], e[0])): + params = ["const void*", "SEL"] + arg_types + lines.append( + f'{ret_cpp} {name}' + f'({", ".join(params)}) __asm__("_objc_msgSend$" "{selector}");' + ) + lines += [ + "} // extern \"C\"", + "", + "#pragma clang diagnostic pop", + "", + ] + return "\n".join(lines) + + def generate_nsobject_header(self) -> str: + """Emit Foundation/NSObject.hpp — the CRTP root that every other + wrapper inherits from. Registers every directly-named NSObject + selector with the bridge registry so the inline impls below pick + up the deduped trampoline names emitted in `NSBridge.hpp`.""" + # Pre-register signatures. Names returned here are substituted into + # the static template body so all dispatch goes through the shared + # bridge externs (no hardcoded `_NS_msg_NSObject_*` decls anymore). + n_alloc = self._stub("void*", [], "alloc") + n_init = self._stub("void*", [], "init") + n_retain = self._stub("void*", [], "retain") + n_release = self._stub("void", [], "release") + n_autorelease = self._stub("void*", [], "autorelease") + n_retainCount = self._stub("NS::UInteger", [], "retainCount") + n_copy = self._stub("void*", [], "copy") + n_hash = self._stub("NS::UInteger", [], "hash") + n_isEqual = self._stub("bool", ["const NS::Object*"], "isEqual:") + n_description = self._stub("NS::String*", [], "description") + n_debugDescription = self._stub("NS::String*", [], "debugDescription") + n_respondsTo = self._stub("bool", ["SEL"], "respondsToSelector:") + n_methodSig = self._stub("NS::MethodSignature*", ["SEL"], + "methodSignatureForSelector:") + body = _NSOBJECT_HPP + # Replace longest placeholders first so prefix-of relationships + # (`_NS_msg_NSObject_retain` is a prefix of `_NS_msg_NSObject_retainCount`, + # `_NS_msg_NSObject_description` of `_NS_msg_NSObject_debugDescription`) + # don't get clobbered by the shorter match. + replacements = [ + ("_NS_msg_NSObject_alloc", n_alloc), + ("_NS_msg_NSObject_init", n_init), + ("_NS_msg_NSObject_retain", n_retain), + ("_NS_msg_NSObject_release", n_release), + ("_NS_msg_NSObject_autorelease", n_autorelease), + ("_NS_msg_NSObject_retainCount", n_retainCount), + ("_NS_msg_NSObject_copy", n_copy), + ("_NS_msg_NSObject_hash", n_hash), + ("_NS_msg_NSObject_isEqual_", n_isEqual), + ("_NS_msg_NSObject_description", n_description), + ("_NS_msg_NSObject_debugDescription", n_debugDescription), + ("_NS_msg_NSObject_respondsToSelector_", n_respondsTo), + ("_NS_msg_NSObject_methodSignatureForSelector_", n_methodSig), + ] + replacements.sort(key=lambda p: -len(p[0])) + for placeholder, name in replacements: + body = body.replace(placeholder, name) + return body + + def generate_nsenumerator_header(self) -> str: + """Emit Foundation/NSEnumerator.hpp. Like NSObject.hpp, the + hand-written externs are gone; selectors register with the bridge + so the inline impls reach them through `NSBridge.hpp`.""" + n_countByEnum = self._stub( + "NS::UInteger", ["void*", "NS::Object**", "NS::UInteger"], + "countByEnumeratingWithState:objects:count:") + n_nextObject = self._stub("void*", [], "nextObject") + n_allObjects = self._stub("NS::Array*", [], "allObjects") + body = _NSENUMERATOR_HPP + replacements = [ + ("_NS_msg_NSFastEnumeration_countByEnumeratingWithState_objects_count_", + n_countByEnum), + ("_NS_msg_NSEnumerator_nextObject", n_nextObject), + ("_NS_msg_NSEnumerator_allObjects", n_allObjects), + ] + replacements.sort(key=lambda p: -len(p[0])) + for placeholder, name in replacements: + body = body.replace(placeholder, name) + return body + + def generate_defines(self) -> str: + p = self.prefix + return "\n".join([ + "#pragma once", + "", + f'#include "../Foundation/NSDefines.hpp"', + "", + f"#define _{p}_EXPORT _NS_EXPORT", + f"#define _{p}_EXTERN _NS_EXTERN", + f"#define _{p}_INLINE _NS_INLINE", + f"#define _{p}_PACKED _NS_PACKED", + "", + f"#define _{p}_CONST(type, name) _NS_CONST(type, name)", + f"#define _{p}_ENUM(type, name) _NS_ENUM(type, name)", + f"#define _{p}_OPTIONS(type, name) _NS_OPTIONS(type, name)", + "", + f"#define _{p}_VALIDATE_SIZE(ns, name) _NS_VALIDATE_SIZE(ns, name)", + f"#define _{p}_VALIDATE_ENUM(ns, name) _NS_VALIDATE_ENUM(ns, name)", + "", + ]) + + def generate_private(self) -> str: + """Class-lookup machinery only. Selectors are now dispatched through + per-method extern "C" decls with __asm__ labels (see emit_stub_decl), + so there is no global SEL table to emit. + """ + p = self.prefix + ns = self.ns + lines = [ + "#pragma once", + "", + f'#include "{p}Defines.hpp"', + "", + "#include ", + "", + f"#define _{p}_PRIVATE_CLS(symbol) (Private::Class::s_k##symbol)", + "", + f"#if defined({p}_PRIVATE_IMPLEMENTATION)", + "", + "#ifdef METALCPP_SYMBOL_VISIBILITY_HIDDEN", + f'#define _{p}_PRIVATE_VISIBILITY __attribute__((visibility("hidden")))', + "#else", + f'#define _{p}_PRIVATE_VISIBILITY __attribute__((visibility("default")))', + "#endif // METALCPP_SYMBOL_VISIBILITY_HIDDEN", + "", + "#ifdef __OBJC__", + f"#define _{p}_PRIVATE_OBJC_LOOKUP_CLASS(symbol) ((__bridge void*)objc_lookUpClass(#symbol))", + "#else", + f"#define _{p}_PRIVATE_OBJC_LOOKUP_CLASS(symbol) objc_lookUpClass(#symbol)", + "#endif // __OBJC__", + "", + f"#define _{p}_PRIVATE_DEF_CLS(symbol) " + f"void* s_k##symbol _{p}_PRIVATE_VISIBILITY = " + f"_{p}_PRIVATE_OBJC_LOOKUP_CLASS(symbol)", + "", + "#else", + "", + f"#define _{p}_PRIVATE_DEF_CLS(symbol) extern void* s_k##symbol", + "", + f"#endif // {p}_PRIVATE_IMPLEMENTATION", + "", + ] + + # Class registrations + if self.all_classes: + lines += [ + f"namespace {ns}", + "{", + "namespace Private", + "{", + " namespace Class", + " {", + ] + for cls_name in sorted(self.all_classes): + lines.append(f" _{p}_PRIVATE_DEF_CLS({cls_name});") + lines += [ + " } // Class", + "} // Private", + f"}} // {ns}", + "", + ] + + return "\n".join(lines) + + def _collect_enum_fwds(self, resolved_types) -> dict[str, dict[str, tuple[str, bool]]]: + """Walk an iterable of resolved C++ type strings and return + `{namespace: {enum_cpp_name: (underlying_type, is_options)}}` + covering every registered enum found. Used by emitters that need + to reference enums declared in other source headers without + pulling those headers through transitively (avoids include + cycles like `MTLArgument.hpp` ↔ `MTLTexture.hpp`).""" + fwds: dict[str, dict[str, tuple[str, bool]]] = {} + for resolved in resolved_types: + for ns_name, cpp_cls in re.findall( + r"\b(NS|MTL4FX|MTL4|MTLFX|MTL|CA)::(\w+)", resolved): + qual = f"{ns_name}::{cpp_cls}" + if self.resolver.kinds.get(qual) != "enum": + continue + underlying = self.resolver.enum_underlying.get(qual) + if not underlying: + continue + is_options = self.resolver.enum_is_options.get(qual, False) + fwds.setdefault(ns_name, {})[cpp_cls] = (underlying, is_options) + return fwds + + @staticmethod + def _format_enum_fwd_decl(cpp_cls: str, underlying: str, + is_options: bool, indent: str = "") -> str: + """Single forward decl. OPTIONS-style enums expand (via + `_

_OPTIONS`) to `using Name = Underlying; enum : Name { … }` + — declaring them as `enum Name : Underlying;` would clash with + the type alias. Forward-declare them as the same `using` alias + the macro produces instead.""" + if is_options: + return f"{indent}using {cpp_cls} = {underlying};" + return f"{indent}enum {cpp_cls} : {underlying};" + + def _emit_enum_lines(self, enums: list[ObjCEnum]) -> list[str]: + """Render a sequence of enums as C++ source lines (no namespace + wrapper, no `#pragma once`). Used by per-source-header emission; + the caller embeds these inside its own `namespace { ... }` + block. Output style matches upstream metal-cpp's + `_MTL_ENUM(NS::UInteger, IndexType) { IndexTypeUInt16, ... };` + form, with the framework prefix stripped from both the enum name + and its value names. + + Identifiers inside source-form `= ` initializers are + rewritten with the framework prefix removed (`NSActivityIdle…` → + `ActivityIdle…`). Expressions that reference anything outside + `self.all_enums` (SDK `#define` macros, cross-framework symbols) + fall back to the libclang-evaluated integer literal so the + emitted header doesn't reference an undeclared identifier.""" + p = self.prefix + strip = self.strip_prefix + prefix_re = re.compile(rf"\b{re.escape(strip)}(?=[A-Z])") if strip else None + known_idents = { + strip_objc_prefix(v.name, strip) + for e in self.all_enums for v in e.values + } + + def _maybe_expr(text: Optional[str]) -> Optional[str]: + if text is None: + return None + stripped = prefix_re.sub("", text) if prefix_re else text + for m in re.finditer(r"\b[A-Za-z_]\w*\b", stripped): + if m.group(0) not in known_idents: + return None + return stripped + + lines: list[str] = [] + for enum in enums: + underlying = self.resolver.resolve(enum.underlying_type) if enum.underlying_type else "NS::UInteger" + if not enum.name: + # Anonymous enum (e.g. `NS_ENUM(NSStringEncoding) { ... }`) — + # the values are global constants of the underlying typedef + # in the framework namespace. + for v in enum.values: + v_cpp = strip_objc_prefix(v.name, strip) + expr = _maybe_expr(v.value_expr) + av = self._av_member(v.availability) + if expr is not None: + lines.append(f"inline constexpr {underlying} {v_cpp}{av} = {expr};") + elif v.value is not None: + val = f"static_cast<{underlying}>({v.value})" if v.value < 0 else str(v.value) + lines.append(f"inline constexpr {underlying} {v_cpp}{av} = {val};") + lines.append("") + continue + cpp_name = strip_objc_prefix(enum.name, strip) + macro = "OPTIONS" if enum.is_options else "ENUM" + # Attribute attaches to the closing `};` — the macro form + # doesn't expose a position between `enum` and the name, and + # clang rejects a preceding-line attribute on type decls. + av_close = self._av_type(enum.availability).lstrip() + lines.append(f"_{p}_{macro}({underlying}, {cpp_name}) {{") + for v in enum.values: + v_cpp = strip_objc_prefix(v.name, strip) + expr = _maybe_expr(v.value_expr) + # Place the attribute between the enumerator name and the + # `=`. Trailing position (after the initializer) would let + # operators in the initializer try to consume the macro — + # e.g. `1UL << 3 API_AVAILABLE(...)` is parsed as a shift + # expression and fails. + av_v = self._av_member(v.availability) + if expr is not None: + lines.append(f" {v_cpp}{av_v} = {expr},") + elif v.value is None: + lines.append(f" {v_cpp}{av_v},") + elif v.value < 0: + # Negative literal in an enum backed by an unsigned typedef + # would trigger -Wc++11-narrowing. Always cast through the + # underlying type — harmless when it's signed, required + # when it isn't. + lines.append(f" {v_cpp}{av_v} = static_cast<{underlying}>({v.value}),") + else: + lines.append(f" {v_cpp}{av_v} = {v.value},") + close = f"}} {av_close};" if av_close else "};" + lines += [close, ""] + return lines + + def generate_blocks(self) -> str: + """Per-framework Blocks.hpp matching upstream's pattern: + a `using` alias for the raw Obj-C block and a `Function` alias + wrapping it in std::function for C++ ergonomics.""" + p = self.prefix + ns = self.ns + strip = self.strip_prefix + ns_root = "" if ns == "NS" else "../Foundation/" + lines = [ + "#pragma once", + "", + f'#include "{p}Defines.hpp"', + f'#include "{ns_root}NSObjCRuntime.hpp"', + f'#include "{ns_root}NSTypes.hpp"', + f'#include "{ns_root}NSRange.hpp"', + "", + "#include ", + "", + ] + # Gather every type touched by a block signature once, then split + # into class refs (forward-declared as `class Foo;`) and enum refs + # (forward-declared as `enum Foo : Underlying;`). Enums move into + # the cross-namespace fwd block alongside classes — including the + # specific declaring `

.hpp` would re-introduce the + # `MTLArgument.hpp` ↔ `MTLTexture.hpp` cycle. + sig_types: set[str] = set() + for b in self.all_blocks: + sig_types.add(self.resolver.resolve(b.return_type)) + for t in b.arg_types: + sig_types.add(self.resolver.resolve(t)) + cls_refs: set[tuple[str, str]] = set() + for resolved in sig_types: + for m_ns, m_cls in re.findall(r"\b(NS|MTL4FX|MTL4|MTLFX|MTL|CA)::(\w+)", resolved): + if self.resolver.kinds.get(f"{m_ns}::{m_cls}", "class") != "class": + continue + cls_refs.add((m_ns, m_cls)) + cls_by_ns: dict[str, set[str]] = {} + for ns_name, c in cls_refs: + cls_by_ns.setdefault(ns_name, set()).add(c) + enum_fwds = self._collect_enum_fwds(sig_types) + # Emit cross-namespace enum forward decls outside `namespace {ns}`. + for ns_name in sorted(enum_fwds): + if ns_name == ns: + continue + lines.append(f"namespace {ns_name} {{") + for name, (underlying, is_options) in sorted(enum_fwds[ns_name].items()): + lines.append(self._format_enum_fwd_decl( + name, underlying, is_options, indent=" ")) + lines.append("}") + if any(ns_name != ns for ns_name in enum_fwds): + lines.append("") + lines += [f"namespace {ns} {{", ""] + # Same-ns class forward decls + same-ns enum forward decls go + # inside the open `namespace {ns}` block. + for c in sorted(cls_by_ns.get(ns, set())): + lines.append(f"class {c};") + for name, (underlying, is_options) in sorted(enum_fwds.get(ns, {}).items()): + lines.append(self._format_enum_fwd_decl(name, underlying, is_options)) + if cls_by_ns.get(ns) or enum_fwds.get(ns): + lines.append("") + # Cross-ns class forward decls. + for ns_name in sorted(cls_by_ns): + if ns_name == ns: + continue + lines.append(f"}} namespace {ns_name} {{") + for c in sorted(cls_by_ns[ns_name]): + lines.append(f"class {c};") + lines.append(f"}} namespace {ns} {{") + if any(ns_name != ns for ns_name in cls_by_ns): + lines.append("") + for b in self.all_blocks: + cpp_name = strip_objc_prefix(b.name, strip) + # Match upstream's convention: `Block` → `Function` + # (replace), otherwise `Function` (append). + fn_name = cpp_name[:-len("Block")] + "Function" if cpp_name.endswith("Block") else f"{cpp_name}Function" + # Resolve types and rewrite any typedef aliases to their + # underlying spelling — the blocks header is a leaf and can't + # see the per-header `using` declarations that define those + # aliases (e.g. `MTL::DeviceNotificationName`). + ret_cpp = self._unalias_in_type(self.resolver.resolve(b.return_type)) + args_cpp = [self._unalias_in_type(self.resolver.resolve(a)) + for a in b.arg_types] + args_joined = ", ".join(args_cpp) + lines.append(f"using {cpp_name} = {ret_cpp} (^)({args_joined});") + lines.append(f"using {fn_name} = std::function<{ret_cpp}({args_joined})>;") + lines.append("") + lines += [f"}} // {ns}", ""] + return "\n".join(lines) + + def generate_structs(self) -> str: + """Per-framework Structs.hpp — plain C-style structs the SDK + exposes (e.g. MTL4BufferRange). Framework prefix is stripped from the + struct name (matches upstream metal-cpp: MTLOrigin → MTL::Origin). + Structs marked packed (either by SDK __attribute__((packed)) or via + config) get `__PACKED` to match upstream's emission.""" + p = self.prefix + ns = self.ns + ns_root = "" if ns == "NS" else "../Foundation/" + lines = ["#pragma once", ""] + if self.needs_availability_header: + # `API_AVAILABLE` etc. for per-struct annotations below. + lines.append("#include ") + lines += [ + f'#include "{p}Defines.hpp"', + f'#include "{ns_root}NSTypes.hpp"', + "", + ] + # Emit opaque enum forward decls for every enum referenced by + # struct field types. Including the declaring `
.hpp` + # would create cycles (e.g. `MTLStructs.hpp` ↔ `MTLTexture.hpp` + # via `MTL::TextureSwizzle`). + sig_types: set[str] = set() + for s in self.all_structs: + for fld in s.fields: + sig_types.add(self.resolver.resolve(fld.objc_type)) + enum_fwds = self._collect_enum_fwds(sig_types) + # Cross-ns enum fwds go before the `namespace {ns}` block. + for ns_name in sorted(enum_fwds): + if ns_name == ns: + continue + lines.append(f"namespace {ns_name} {{") + for name, (underlying, is_options) in sorted(enum_fwds[ns_name].items()): + lines.append(self._format_enum_fwd_decl( + name, underlying, is_options, indent=" ")) + lines.append("}") + if any(ns_name != ns for ns_name in enum_fwds): + lines.append("") + lines += [ + f"namespace {ns} {{", + "", + ] + # Same-ns enum fwds inside the namespace block. + for name, (underlying, is_options) in sorted(enum_fwds.get(ns, {}).items()): + lines.append(self._format_enum_fwd_decl(name, underlying, is_options)) + if enum_fwds.get(ns): + lines.append("") + # Track every struct cpp-name we emit in THIS namespace block so + # we can split typedef aliases into "target visible here" vs + # "target lives upstream" (the latter must come after the + # keep_upstream chain). + own_struct_cpp_names: set[str] = set() + # Resolve every field once. A struct that has a by-value member + # whose type lives in our own namespace but isn't one of the structs + # we're about to emit must come AFTER the keep_upstream `#include` + # chain — by elimination, the only way the resolver knows the name + # is because it was registered for an upstream-kept hpp (e.g. + # MTL::PackedFloat4x3 from MTLAccelerationStructureTypes.hpp). + # Cross-namespace refs (`NS::UInteger`) are always fine — NSTypes + # and sibling-framework headers are pulled in at the top of this + # file. + all_struct_cpp_names: set[str] = set() + for s in self.all_structs: + base = s.name.lstrip("_") + all_struct_cpp_names.add( + strip_objc_prefix_aggressive(base, self.strip_prefix)) + # Forward-declared enums in our own namespace (emitted above the + # struct block) are usable by-value too — count them as available. + available_own_names = all_struct_cpp_names | set(enum_fwds.get(ns, {})) + resolved_fields: dict[int, list[tuple[str, str, Optional[int]]]] = {} + deferred: set[int] = set() + own_ns_re = re.compile(rf"\b{re.escape(ns)}::(\w+)") + for s in self.all_structs: + rfields: list[tuple[str, str, Optional[int]]] = [] + defer = False + for fld in s.fields: + resolved = self.resolver.resolve(fld.objc_type) + for m in own_ns_re.finditer(resolved): + if m.group(1) not in available_own_names: + defer = True + rfields.append((resolved, fld.name, fld.array_size)) + resolved_fields[id(s)] = rfields + if defer: + deferred.add(id(s)) + + def _emit_struct(s: "ObjCStruct") -> None: + base = s.name.lstrip("_") + cpp_name = strip_objc_prefix_aggressive(base, self.strip_prefix) + own_struct_cpp_names.add(cpp_name) + av = self._av_type(s.availability).lstrip() + if av: + lines.append(av) + lines.append(f"struct {cpp_name} {{") + if s.extra_members: + lines.append(s.extra_members.rstrip()) + for field_type, fname, asize in resolved_fields[id(s)]: + dim = f"[{asize}]" if asize is not None else "" + lines.append(f" {field_type} {fname}{dim};") + suffix = f" _{p}_PACKED" if s.packed else "" + lines.extend([f"}}{suffix};", ""]) + + for s in self.all_structs: + if id(s) not in deferred: + _emit_struct(s) + + def _emit_alias(alias_cpp: str, target_cpp_qual: str) -> str: + # Same-namespace target: strip the `::` prefix so the + # using reads `using Coordinate2D = SamplePosition;` rather + # than the redundantly qualified form. + t = target_cpp_qual + if t.startswith(f"{ns}::"): + t = t[len(ns) + 2:] + return f"using {alias_cpp} = {t};" + + # Aliases whose target is defined right above (own struct) — emit + # before the keep_upstream chain so `

Bridge.hpp` (transitively + # included via keep_upstream) sees them by value. + own_aliases = [a for a in self.all_struct_aliases + if a[1].startswith(f"{ns}::") + and a[1][len(ns) + 2:] in own_struct_cpp_names] + upstream_aliases = [a for a in self.all_struct_aliases + if a not in own_aliases] + for alias_cpp, target in own_aliases: + lines.append(_emit_alias(alias_cpp, target)) + if own_aliases: + lines.append("") + lines += [f"}} // {ns}", ""] + # Pull in upstream-kept headers AFTER the struct definitions. Some + # upstream files (notably MTLAccelerationStructureTypes.hpp) include + # per-class headers that in turn include `

Bridge.hpp` — and the + # bridge needs `MTL::Size` / `Origin` / `Region` already visible + # when its extern decls reference them by value. Defining the + # structs first breaks that cycle. + for keep in self.keep_upstream: + lines.append(f'#include "{keep}.hpp"') + if self.keep_upstream: + lines.append("") + # Structs (and aliases) whose member types come from the + # keep_upstream chain only become visible once it's been included. + # Emit them in a follow-on namespace block. + deferred_structs = [s for s in self.all_structs if id(s) in deferred] + if deferred_structs or upstream_aliases: + lines += [f"namespace {ns} {{", ""] + for s in deferred_structs: + _emit_struct(s) + for alias_cpp, target in upstream_aliases: + lines.append(_emit_alias(alias_cpp, target)) + lines += ["", f"}} // {ns}", ""] + return "\n".join(lines) + + # ── Bridge-trampoline registry ─────────────────────────────────── + # Every generated method body calls into `_

_msg__` — an + # `extern "C"` decl with an `__asm__` label that resolves to the + # linker-synthesized `_objc_msgSend$` trampoline. Names are keyed + # by (return type, arg types, selector) so identical C++ signatures + # collapse to one decl across every class that calls the same selector. + # The deduped externs all live in a single per-framework `

Bridge.hpp` + # included by each per-class header. + + @staticmethod + def _mangle_type_id(t: str) -> str: + """C++ type → identifier-safe fragment. Each non-identifier char + maps to a distinct escape so two distinct C++ types never collide.""" + if not t or t == "void": + return "v" + s = re.sub(r"\s+", "", t) + table = {"*": "p", "&": "r", ":": "_", "<": "L", ">": "G", ",": "C"} + out = [] + for ch in s: + if ch.isalnum() or ch == "_": + out.append(ch) + else: + out.append(table.get(ch, "_")) + return "".join(out) + + @staticmethod + def _mangle_selector_id(selector: str) -> str: + """ObjC selector → identifier-safe fragment. Trailing `:` (which + every parameterized selector has) becomes a trailing `_`, and + embedded `:` between segments collapses the same way.""" + return selector.replace(":", "_") + + def _unalias_in_type(self, t: str) -> str: + """Substitute every recorded string-typedef alias in `t` with its + underlying C++ type. The bridge header can't see the per-header + `using` definitions, so we rewrite signatures eagerly to the + underlying form (`NS::ErrorDomain` → `NS::String*`).""" + aliases = self.resolver.alias_underlying + if not aliases: + return t + # Replace longest alias names first so a longer key isn't shadowed + # by a partial match (e.g. `NS::NotificationName` vs `NS::Name`). + for alias in sorted(aliases, key=len, reverse=True): + if alias in t: + t = t.replace(alias, aliases[alias]) + return t + + def _stub(self, ret_cpp: str, arg_types_cpp: list[str], selector: str) -> str: + """Register a (return, args, selector) trampoline and return its + deduped extern "C" name. Called wherever a per-class inline impl + needs to dispatch through a selector stub. + + Receiver is always `const void*` and `SEL` is always the second arg + (matches upstream metal-cpp's Object::sendMessage shape, and stays + legal under ObjC ARC since raw pointer ↔ id bridging isn't needed). + """ + ret_cpp = self._unalias_in_type(ret_cpp) + arg_types_cpp = [self._unalias_in_type(a) for a in arg_types_cpp] + self._bridge_call_count += 1 + key = (ret_cpp, tuple(arg_types_cpp), selector) + existing = self._bridge_by_sig.get(key) + if existing: + return existing + ret_m = self._mangle_type_id(ret_cpp) + sel_m = self._mangle_selector_id(selector) + args_m = "_".join(self._mangle_type_id(a) for a in arg_types_cpp) + base = f"_{self.prefix}_msg_{ret_m}_{sel_m}" + name = f"{base}_{args_m}" if args_m else base + # Collision guard (mangling should never produce them, but a + # signature equal under whitespace canonicalization could): + if name in self._bridge_by_name and self._bridge_by_name[name] != key: + idx = 2 + while f"{base}_x{idx}" in self._bridge_by_name: + idx += 1 + name = f"{base}_x{idx}" + self._bridge_by_sig[key] = name + self._bridge_by_name[name] = key + self._bridge_entries.append((name, ret_cpp, list(arg_types_cpp), selector)) + return name + + # ── Block-typed method overload helpers ────────────────────────── + # When a method takes a single block parameter we also emit a second + # overload that takes `const Function&` (std::function) and wraps + # it in a block literal — same pattern upstream metal-cpp uses by hand. + + def _block_param_info(self, m: ObjCMethod) -> tuple[Optional[int], Optional[ObjCBlockTypedef]]: + idx = None + block = None + for i, p in enumerate(m.params): + if self.is_block(p.objc_type): + if idx is not None: + return None, None # >1 block params: skip + idx = i + for b in self.all_blocks: + if b.name == p.objc_type: + block = b + break + return (idx, block) if block else (None, None) + + def _function_alias_name(self, block: ObjCBlockTypedef) -> str: + """C++ name of the std::function-typed alias matching `block`. Matches + upstream metal-cpp's convention: Block → Function, otherwise + append Function.""" + cpp = strip_objc_prefix(block.name, self.strip_prefix) + base = cpp[:-len("Block")] if cpp.endswith("Block") else cpp + return f"{self.ns}::{base}Function" + + def _fmt_function_overload_params(self, m: ObjCMethod, cls_name: str, + block_idx: int, block: ObjCBlockTypedef) -> str: + fn_alias = self._function_alias_name(block) + parts = [] + for i, p in enumerate(m.params): + if i == block_idx: + parts.append(f"const {fn_alias}& {p.name}") + else: + parts.append(f"{self._resolve(p.objc_type, cls_name)} {p.name}") + return ", ".join(parts) + + def _fmt_function_overload_body(self, m: ObjCMethod, block_idx: int, + block: ObjCBlockTypedef) -> str: + fn_alias = self._function_alias_name(block) + fn_param = m.params[block_idx].name + # Block literal forwards every arg to the captured std::function. + block_args = [] + forward_args = [] + for i, arg in enumerate(block.arg_types): + arg_cpp = self.resolver.resolve(arg) + name = f"x{i}" + block_args.append(f"{arg_cpp} {name}") + forward_args.append(name) + fwd = ", ".join(forward_args) + block_ret = self.resolver.resolve(block.return_type) if block.return_type else "void" + if block_ret == "void": + block_literal = f"^({', '.join(block_args)}) {{ blockFunction({fwd}); }}" + else: + # Non-void block — Apple block syntax puts the return type BEFORE + # the arg list: `^Ret(args) { ... }`. C++ lambda-style trailing + # return is not valid here. + block_literal = (f"^{block_ret}({', '.join(block_args)}) " + f"{{ return blockFunction({fwd}); }}") + call_args = [] + for i, p in enumerate(m.params): + call_args.append(block_literal if i == block_idx else p.name) + # Outer method might return a value too (e.g. NS::UInteger from + # indexOfObjectPassingTest); forward that result. + m_ret = self._resolve(m.return_type) if m.return_type else "void" + return_kw = "return " if m_ret != "void" else "" + return ( + f" __block {fn_alias} blockFunction = {fn_param};\n" + f" {return_kw}{m.cpp_name}({', '.join(call_args)});" + ) + + def generate_class_header(self, classes: list[tuple["ObjCClass", Optional[dict]]], + header_basename: str, + constants: Optional[list["ObjCConstant"]] = None, + string_typedefs: Optional[list[tuple[str, str]]] = None, + enums: Optional[list[ObjCEnum]] = None) -> str: + """Emit one .hpp covering every class that lived in the same SDK + header — matches upstream metal-cpp's file layout (MTLEvent.h → + MTLEvent.hpp containing Event + SharedEvent + SharedEventHandle + + SharedEventListener). + + `classes` is a list of (ObjCClass, override-dict) tuples in source + order. `header_basename` is the destination .hpp filename + (e.g. 'MTLEvent') — also used to recognize "same-file" enum + references in the scanner. `constants`, `string_typedefs`, and + `enums` are the extern globals / NSString-aliased typedefs / + enum declarations the SDK header carried at file scope — emitted + in the namespace before the class declarations so they sit where + Apple's SDK declares them. + """ + p = self.prefix + ns = self.ns + # Helper: include path from this generator's dir to a target dir. + def _rel_dir(target_dir: str) -> str: + return "" if target_dir == (self.output_subdir or "") else f"../{target_dir}/" + ns_root = "" if ns == "NS" else "../Foundation/" + + # Per-class superclass-include needs (collected first so they go in + # the preamble before anything that may depend on them). The include + # path uses the SDK-header basename the superclass lives in — same + # convention as the rest of the file layout. + same_file_classes = {c.name for c, _ in classes} + super_hpps: set[str] = set() + super_cpps: dict[str, str] = {} # cls.name → super_cpp + for cls, _ in classes: + sc = "" + shpp = "" + # Skip superclasses we don't emit (NSObject, NSFastEnumeration, + # NSLocking, and other CRTP-base / non-generated protocols). + # They reach us through upstream NSObject.hpp. + # Look up the parent's source header in this gen's map first, + # then fall back to the resolver's cross-framework map so a + # subclass declared in framework A can name a parent from B. + super_src = (self.class_to_source.get(cls.superclass) + or self.resolver.class_to_source.get(cls.superclass, "")) + if (cls.superclass and cls.superclass != "NSObject" + and super_src): + resolved = resolve_type(self.resolver, cls.superclass, ns, + self.cpp_class_name(cls.superclass)) + if resolved and not resolved.startswith("void"): + if resolved.endswith("*"): + resolved = resolved[:-1].strip() + sc = resolved + super_ns, _, _ = sc.rpartition("::") + super_dir = self.FW_NS_TO_DIR.get(super_ns, super_ns) + same_dir = super_dir == (self.output_subdir or "") + if same_dir and cls.superclass not in same_file_classes: + shpp = f'"{super_src}.hpp"' + elif super_ns and not same_dir: + shpp = f'"{_rel_dir(super_dir)}{super_src}.hpp"' + super_cpps[cls.name] = sc + if shpp: + super_hpps.add(shpp) + + lines = ["#pragma once", ""] + if self.needs_availability_header: + # `API_AVAILABLE` / `API_UNAVAILABLE` / `API_DEPRECATED` macros + # used by the per-decl availability annotations below. + lines.append("#include ") + lines.append(f'#include "{p}Defines.hpp"') + # Auxiliary per-framework aggregates are emitted only when non-empty + # (see `has_blocks` / `has_structs`). Skip the include too — + # referencing a missing file would otherwise break the build. + # Enums no longer live in a per-framework aggregate: each enum is + # emitted into the per-source-header hpp it was declared in, and + # the resolver's `cpp_to_source` map routes cross-header includes + # below via `_scan`. + if self.has_blocks: + lines.append(f'#include "{p}Blocks.hpp"') + if self.has_structs: + lines.append(f'#include "{p}Structs.hpp"') + # Consolidated extern "C" trampoline decls for this framework. + # Per-class headers no longer carry their own externs — every + # selector dispatched from this header is declared once in + # `

Bridge.hpp` and reused across every class that calls it. + # Listed after Structs/Blocks so by-value struct params in the + # bridge see complete definitions (Structs may chain back into + # this header via the upstream keep-list). + lines.append(f'#include "{p}Bridge.hpp"') + lines += [ + f'#include "{ns_root}NSObject.hpp"', + f'#include "{ns_root}NSTypes.hpp"', + f'#include "{ns_root}NSRange.hpp"', + ] + for shpp in sorted(super_hpps): + lines.append(f"#include {shpp}") + + # Register string-typedef aliases (`typedef NSString *CADynamicRange`) + # with the resolver BEFORE per-class processing so member type + # resolution finds them. Emission of the `using` lines happens later + # (inside the namespace block, where the alias is actually visible + # to consumers). The mapped value is the alias name — the alias + # already expands to a pointer type, so callers must NOT add `*`. + for alias, underlying in (string_typedefs or []): + stripped = strip_objc_prefix(alias, self.strip_prefix) + self.resolver.register(alias, f"{ns}::{stripped}", + kind="typedef", + framework_prefix=self.prefix) + # Record the underlying type so `

Bridge.hpp` (which can't + # see the per-header `using` def) can rewrite signatures. + resolved_underlying = self._resolve(underlying, "") + if not resolved_underlying.startswith("void"): + self.resolver.alias_underlying[f"{ns}::{stripped}"] = resolved_underlying + + # ── Per-class processing (filtering, dedup) ──────────────────── + # Build a working struct of {cls, override, sliced members} for + # each class so the section emitters below can iterate without + # repeating the prep work. + # Class templates from kept-upstream headers — can't be + # forward-declared as plain classes (`class Foo;` clashes with + # `template class Foo;`). Map name → header to #include + # instead of forward-declaring. + TEMPLATE_CLASSES = { + ("NS", "Enumerator"): "NSEnumerator.hpp", + } + block_cpp_names = {strip_objc_prefix(b.name, self.strip_prefix) for b in self.all_blocks} + struct_cpp_names = {s.name for s in self.all_structs} + # Enums declared in *this* source header — references inside the + # file resolve in-place and need no extra include. + same_file_enum_cpp_names = { + strip_objc_prefix(e.name, self.strip_prefix) + for e in (enums or []) if e.name + } + + resolved_types: set[str] = set() + fwd_decls: dict[str, set[str]] = {} + # Per-namespace opaque enum forward decls: `enum Foo : NS::UInteger;`. + # Lets a class header reference an enum declared in another header + # without pulling that header through — sidesteps the include + # cycles `MTLArgument.hpp` <-> `MTLTexture.hpp` produced when we + # tried to emit a full include for every cross-file enum ref. + # ns -> {cpp_name: (underlying, is_options)} + fwd_enums: dict[str, dict[str, tuple[str, bool]]] = {} + cross_fw_includes: set[str] = set() + same_file_cpp_names = {self.cpp_class_name(c.name) for c, _ in classes} + + def _scan(resolved: str) -> None: + for ns_name, cpp_cls in re.findall(r"\b(NS|MTL4FX|MTL4|MTLFX|MTL|CA)::(\w+)", resolved): + if ns_name == self.ns and cpp_cls in same_file_cpp_names: + continue + if cpp_cls in self.NOT_A_CLASS: + continue + # Class templates need a real #include — a `class Foo;` + # forward decl would clash with the template definition + # in the kept-upstream header. + template_hdr = TEMPLATE_CLASSES.get((ns_name, cpp_cls)) + if template_hdr: + fw_dir = self.FW_NS_TO_DIR.get(ns_name, ns_name) + cross_fw_includes.add( + f'#include "{_rel_dir(fw_dir)}{template_hdr}"') + continue + qual = f"{ns_name}::{cpp_cls}" + kind = self.resolver.kinds.get(qual, "class") + if kind == "enum": + # In-file refs need nothing; cross-file refs get an + # opaque enum forward decl. The full definition is + # reached transitively when the consumer needs enum + # values — methods only ever USE the type, so the + # forward decl is enough for them to compile. + if ns_name == self.ns and cpp_cls in same_file_enum_cpp_names: + continue + underlying = self.resolver.enum_underlying.get(qual) + if underlying: + is_options = self.resolver.enum_is_options.get(qual, False) + fwd_enums.setdefault(ns_name, {})[cpp_cls] = (underlying, is_options) + continue + if kind != "class": + suffix = {"block": "Blocks", "struct": "Structs"}.get(kind) + if suffix and ns_name != self.ns: + fw_dir = self.FW_NS_TO_DIR.get(ns_name, ns_name) + fw_prefix = self.resolver.frameworks.get(qual, ns_name) + cross_fw_includes.add( + f'#include "{_rel_dir(fw_dir)}{fw_prefix}{suffix}.hpp"') + continue + if ns_name == self.ns and cpp_cls in block_cpp_names: + continue + if ns_name == self.ns and cpp_cls in struct_cpp_names: + continue + fwd_decls.setdefault(ns_name, set()).add(cpp_cls) + + # Type aliases that collapse to the same C++ scalar — must be treated + # as equal during overload dedup so that `numberWithLong:` and + # `numberWithInteger:` (NSInteger ≡ long on Apple's 64-bit ABI) don't + # both emit `number(long)` and trip a redeclaration error. + SCALAR_ALIASES = { + "NS::Integer": "long", + "NS::UInteger": "unsigned long", + "NS::TimeInterval": "double", + } + + def _canon(t: str) -> str: + for alias, base in SCALAR_ALIASES.items(): + t = t.replace(alias, base) + # Collapse whitespace around `*` so resolver outputs that differ + # only in spacing (`void *` vs `void*`) compare equal — the + # signature tuple is the dedup key, and identical C++ overloads + # would otherwise leak through. + return re.sub(r"\s*\*\s*", "*", t) + + def _signature(cls_name: str, cpp_name: str, params: list[ObjCParam]) -> tuple: + return (cpp_name,) + tuple(_canon(self._resolve(p.objc_type, cls_name)) for p in params) + + prepared: list[dict] = [] # one entry per emitted class + for cls, override in classes: + class_props = [p for p in cls.properties if p.is_class_property] + instance_props = [p for p in cls.properties if not p.is_class_property] + # Drop methods whose C++ name collides with a reserved keyword + # (`+new`, `+delete`, etc. — Apple's SDK exposes these on some + # classes specifically marked unavailable in ObjC). + CXX_KEYWORDS = {"new", "delete", "class", "template", "operator", + "this", "throw", "try", "catch", "typeid", + "typename", "using", "namespace"} + class_methods = [m for m in cls.methods + if m.is_class_method and m.cpp_name not in CXX_KEYWORDS] + instance_methods = [m for m in cls.methods + if not m.is_class_method and m.cpp_name not in CXX_KEYWORDS] + + seen_sigs: set[tuple] = set() + class_methods = [m for m in class_methods + if not (_signature(cls.name, m.cpp_name, m.params) in seen_sigs + or seen_sigs.add(_signature(cls.name, m.cpp_name, m.params)))] + seen_sigs = set() + instance_methods = [m for m in instance_methods + if not (_signature(cls.name, m.cpp_name, m.params) in seen_sigs + or seen_sigs.add(_signature(cls.name, m.cpp_name, m.params)))] + seen_props: set[str] = set() + instance_props = [p for p in instance_props + if not (p.name in seen_props or seen_props.add(p.name))] + seen_props = set() + class_props = [p for p in class_props + if not (p.name in seen_props or seen_props.add(p.name))] + class_sigs = {_signature(cls.name, m.cpp_name, m.params) for m in class_methods} + instance_methods = [m for m in instance_methods + if _signature(cls.name, m.cpp_name, m.params) not in class_sigs] + + # Walk every type touched by this class so we can build the + # union resolved-types / forward-decl / cross-fw-include set. + for prop in class_props + instance_props: + r = self._resolve(prop.objc_type, cls.name) + resolved_types.add(r); _scan(r) + for m in class_methods + instance_methods: + r = self._resolve(m.return_type, cls.name) + resolved_types.add(r); _scan(r) + for param in m.params: + r = self._resolve(param.objc_type, cls.name) + resolved_types.add(r); _scan(r) + + prepared.append({ + "cls": cls, + "override": override or {}, + "class_props": class_props, + "instance_props": instance_props, + "class_methods": class_methods, + "instance_methods": instance_methods, + }) + + for header in self._system_includes(resolved_types): + lines.append(f"#include <{header}>") + for inc in sorted(cross_fw_includes): + lines.append(inc) + + if fwd_decls or fwd_enums: + lines.append("") + # Merge per-namespace class + enum forward decls so each + # namespace block declares everything once. + all_ns = sorted(set(fwd_decls) | set(fwd_enums)) + for ns_name in all_ns: + lines.append(f"namespace {ns_name} {{") + for cls_fwd in sorted(fwd_decls.get(ns_name, set())): + lines.append(f" class {cls_fwd};") + for enum_name, (underlying, is_options) in sorted(fwd_enums.get(ns_name, {}).items()): + lines.append(self._format_enum_fwd_decl( + enum_name, underlying, is_options, indent=" ")) + lines.append("}") + + # ── Class declarations (one namespace block, all classes inside) ── + # Local alias — every call site in this function annotates a member + # (method / property / setter), so it routes through the member flag. + # The single class-level annotation uses `self._av_type` directly. + _av = self._av_member + + lines += ["", f"namespace {ns}", "{", ""] + # String-typedef aliases (`typedef NSString *CADynamicRange`) — emit + # them at the top of the namespace, where Apple's SDK declares them + # alongside the associated `extern const` globals. Build a local + # lookup so the constants below can resolve `const ` against + # the just-emitted alias rather than the global resolver (which + # intentionally doesn't register these to avoid cross-header + # include explosions). + emitted_any_preamble = False + local_typedef: dict[str, str] = {} # ObjC alias name → stripped C++ name + for alias, underlying in (string_typedefs or []): + stripped = strip_objc_prefix(alias, self.strip_prefix) + resolved = self._resolve(underlying, "") + if resolved.startswith("void"): + continue + lines.append(f"using {stripped} = {resolved};") + local_typedef[alias] = stripped + emitted_any_preamble = True + # `extern const __asm__("_")` — namespaced + # constants bound at link time to Apple's underscored C symbol so + # `.mm` translation units that also include Apple's headers don't + # see two declarations of the same C name. + for const in (constants or []): + if not const.c_name.startswith(self.strip_prefix): + continue + stripped = strip_objc_prefix(const.c_name, self.strip_prefix) + cpp_type = const.cpp_type.strip() + # Resolve via local typedef first (`const CADynamicRange` → + # `CA::DynamicRange const`), then fall back to the global + # resolver (handles BUILTIN-mapped aliases like NSErrorDomain). + m = re.match(r"^const\s+(\w+)$", cpp_type) + if m and m.group(1) in local_typedef: + resolved = f"{local_typedef[m.group(1)]} const" + else: + resolved = self._resolve(cpp_type, "") + if resolved.startswith("void"): + continue + lines.append( + f'extern {resolved} {stripped} __asm__("_{const.c_name}");' + ) + emitted_any_preamble = True + # Enums declared in this SDK source header. Emitted inline so each + # `

.hpp` carries the enums Apple's `
.h` declared, + # rather than a per-framework `Enums.hpp` aggregate. The + # scanner (above) routes cross-file references to the right hpp. + if enums: + enum_lines = self._emit_enum_lines(enums) + if enum_lines: + lines += enum_lines + emitted_any_preamble = True + if emitted_any_preamble: + lines.append("") + # Forward-declare every class in this file so a class declared earlier + # can reference one declared later (common when a Descriptor's factory + # method returns the protocol it produces, both in the same SDK .h). + if len(prepared) > 1: + for info in prepared: + lines.append(f"class {self.cpp_class_name(info['cls'].name)};") + lines.append("") + for idx, info in enumerate(prepared): + cls = info["cls"] + cpp_name = self.cpp_class_name(cls.name) + prepend_block = info["override"].get("prepend", "") + append_block = info["override"].get("append", "") + + crtp = "Referencing" + if "NSSecureCoding" in cls.protocols: + crtp = "SecureCoding" + elif "NSCopying" in cls.protocols: + crtp = "Copying" + sc = super_cpps.get(cls.name, "") + base = f"NS::{crtp}<{cpp_name}{', ' + sc if sc else ''}>" + + if prepend_block: + lines += [prepend_block.rstrip(), ""] + # Auto-emit `static T* alloc()` and `T* init()` — every Obj-C + # class supports these via NSObject. We don't carry inheritance + # from the @interface chain so `T::alloc()->init()` would + # otherwise fail. Skip when the class redeclares its own init(). + has_own_init = any( + m.cpp_name == "init" and not m.params + for m in info["instance_methods"] + ) + info["emit_auto_init"] = not has_own_init + # Each emitted member becomes a (lhs, rhs, sort_key[, prefix]) + # tuple so we can column-align names within a group (`static + # MTL::Device* ` padded to the same width as the longest LHS) + # and sort the rows by C++ name to match upstream metal-cpp's + # layout. Overloads of the same name share a sort key and stay + # adjacent because Python's sort is stable. An optional 4th + # element holds a header line (`template `) + # emitted on its own line just before the aligned row. + def _emit_aligned(rows: list) -> None: + if not rows: + return + rows.sort(key=lambda r: r[2]) + width = max(len(r[0]) for r in rows) + 1 + for row in rows: + if len(row) >= 4 and row[3]: + lines.append(f" {row[3]}") + lines.append(f" {row[0].ljust(width)}{row[1]};") + + # Auto-emitted alloc() / init() — kept as a top group, separated + # by a blank line from the rest, mirroring upstream's "constructor + # cluster" convention. Skipped for protocols: those wrap an + # `@protocol` and aren't directly instantiable; the runtime + # produces them via factories on a concrete class + # (e.g. `MTL::Device::newBuffer(...)`). + # Attribute placement: clang requires `class Name`, not + # `class Name ` (the latter is ignored for type decls) and + # not on a preceding line (also ignored for class definitions). + lines += [ + f"class{self._av_type(cls.availability)} {cpp_name} : public {base}", + "{", + "public:", + ] + if not cls.is_protocol: + ctor_rows: list[tuple[str, str, str]] = [ + (f"static {cpp_name}*", "alloc()", "alloc"), + ] + if info["emit_auto_init"]: + ctor_rows.append((f"{cpp_name}*", "init() const", "init")) + _emit_aligned(ctor_rows) + lines.append("") + + # Class-scope: static methods and class properties, merged. + class_rows: list[tuple[str, str, str]] = [] + for prop in info["class_props"]: + cpp_type = self._resolve(prop.objc_type, cls.name) + getter_name = cpp_method_name_from_first_segment(prop.name) + class_rows.append(( + f"static {cpp_type}", + f"{getter_name}(){_av(prop.availability)}", + getter_name, + )) + for m in info["class_methods"]: + ret = self._resolve(m.return_type, cls.name) + params_str = self._fmt_params(m.params, cls.name) + class_rows.append(( + f"static {ret}", + f"{m.cpp_name}({params_str}){_av(m.availability)}", + m.cpp_name, + )) + bi, blk = self._block_param_info(m) + if bi is not None and blk is not None: + fp = self._fmt_function_overload_params(m, cls.name, bi, blk) + class_rows.append(( + f"static {ret}", + f"{m.cpp_name}({fp}){_av(m.availability)}", + m.cpp_name, + )) + if class_rows: + _emit_aligned(class_rows) + lines.append("") + + # Instance-scope: instance methods + property getters/setters, + # merged. Setter `setFoo` sorts after getter `foo` naturally + # ('f' < 's'), matching upstream's getter-then-setter cadence. + inst_rows: list[tuple[str, str, str]] = [] + for prop in info["instance_props"]: + getter_name = cpp_method_name_from_first_segment(prop.name) + # Same generic-return treatment as methods: `@property + # (readonly) ObjectType firstObject;` becomes templated. + if gi := _generic_return_info(prop.objc_type): + tparam, ret = gi + inst_rows.append(( + ret, + f"{getter_name}() const{_av(prop.availability)}", + getter_name, + f"template ", + )) + continue + cpp_type = self._resolve(prop.objc_type, cls.name) + inst_rows.append(( + cpp_type, + f"{getter_name}() const{_av(prop.availability)}", + getter_name, + )) + if not prop.is_readonly: + # Setter name matches upstream's pattern: `setUtf8String` + # (case-folded) rather than `setUTF8String`. Selector + # still tracks the SDK form via stub_decl below. + sname_cpp = f"set{getter_name[0].upper()}{getter_name[1:]}" + inst_rows.append(( + "void", + f"{sname_cpp}({cpp_type} {prop.name}){_av(prop.availability)}", + sname_cpp, + )) + for m in info["instance_methods"]: + params_str = self._fmt_params(m.params, cls.name) + # Methods on collection-style classes that return the bare + # generic parameter (`ObjectType` / `KeyType` / `ValueType`) + # or an `NSEnumerator` become template-on- + # element methods so the caller can name the element type + # and skip a downstream `reinterpret_cast`. Matches + # upstream's `template + # Enumerator<_KeyType>* keyEnumerator() const;` form. + # Defaults to the base `Object*` so untyped callers still + # compile. + # Instance methods aren't emitted `const` — most mutate the + # underlying Obj-C object's state (e.g. `commit()`, + # `enqueue()`, encoder calls). Property getters keep `const` + # because they're guaranteed pure reads. + if gi := _generic_return_info(m.return_type): + tparam, ret = gi + inst_rows.append(( + ret, + f"{m.cpp_name}({params_str}){_av(m.availability)}", + m.cpp_name, + f"template ", + )) + else: + ret = self._resolve(m.return_type, cls.name) + inst_rows.append(( + ret, + f"{m.cpp_name}({params_str}){_av(m.availability)}", + m.cpp_name, + )) + bi, blk = self._block_param_info(m) + if bi is not None and blk is not None: + fp = self._fmt_function_overload_params(m, cls.name, bi, blk) + inst_rows.append(( + ret, + f"{m.cpp_name}({fp}){_av(m.availability)}", + m.cpp_name, + )) + if inst_rows: + _emit_aligned(inst_rows) + lines.append("") + + lines += ["};", ""] + if append_block: + lines += [append_block.rstrip(), ""] + + lines += [ + f"}} // namespace {ns}", + "", + ] + + # Dispatch stubs and inline impls only apply when this header + # actually declares classes — an enum-only `.hpp` (e.g. emitted + # for `MTLDataType.h`) closes the namespace and stops here. + if not prepared: + return "\n".join(lines) + + # ── ObjC class symbols + inline impls ───────────────────────── + # Trampoline `extern "C"` decls all live in `

Bridge.hpp` (already + # included up top). Each class only emits its own runtime class + # symbol here — `&OBJC_CLASS_$_` is what `+alloc` is invoked on. + lines.append("// --- Class symbols + inline implementations ---") + lines.append("") + for info in prepared: + cls = info["cls"] + lines.append(f'extern "C" void *OBJC_CLASS_$_{cls.name};') + lines.append("") + + def _arg_types(cls_name: str, params: list[ObjCParam]) -> list[str]: + return [self._resolve(p.objc_type, cls_name) for p in params] + + def _call(receiver_expr: str, stub: str, args: str) -> str: + arg_suffix = f", {args}" if args else "" + return f"{stub}((const void*){receiver_expr}, nullptr{arg_suffix})" + + for info in prepared: + cls = info["cls"] + cpp_name = self.cpp_class_name(cls.name) + cls_recv = f"&OBJC_CLASS_$_{cls.name}" + cls_t = f"{self.ns}::{cpp_name}*" + # Inline body for the auto-emitted alloc() and (optionally) init(). + # Skipped for protocols (no constructor cluster declared). + if not cls.is_protocol: + alloc_stub = self._stub(cls_t, [], "alloc") + lines += [ + f"_{p}_INLINE {ns}::{cpp_name}* {ns}::{cpp_name}::alloc()", + "{", + f" return {_call(cls_recv, alloc_stub, '')};", + "}", "", + ] + if info.get("emit_auto_init"): + init_stub = self._stub(cls_t, [], "init") + lines += [ + f"_{p}_INLINE {ns}::{cpp_name}* {ns}::{cpp_name}::init() const", + "{", + f" return {_call('this', init_stub, '')};", + "}", "", + ] + for prop in info["class_props"]: + cpp_type = self._resolve(prop.objc_type, cls.name) + stub = self._stub(cpp_type, [], prop.name) + getter_name = cpp_method_name_from_first_segment(prop.name) + lines += [ + f"_{p}_INLINE {cpp_type} {ns}::{cpp_name}::{getter_name}()", + "{", + f" return {_call(cls_recv, stub, '')};", + "}", "", + ] + for m in info["class_methods"]: + ret = self._resolve(m.return_type, cls.name) + params_str = self._fmt_params(m.params, cls.name) + args = self._fmt_args(m.params) + stub = self._stub(ret, _arg_types(cls.name, m.params), m.selector) + ret_kw = "return " if ret != "void" else "" + lines += [ + f"_{p}_INLINE {ret} {ns}::{cpp_name}::{m.cpp_name}({params_str})", + "{", + f" {ret_kw}{_call(cls_recv, stub, args)};", + "}", "", + ] + bi, blk = self._block_param_info(m) + if bi is not None and blk is not None: + fp = self._fmt_function_overload_params(m, cls.name, bi, blk) + body = self._fmt_function_overload_body(m, bi, blk) + lines += [ + f"_{p}_INLINE {ret} {ns}::{cpp_name}::{m.cpp_name}({fp})", + "{", body, "}", "", + ] + for prop in info["instance_props"]: + getter_name = cpp_method_name_from_first_segment(prop.name) + cpp_type = self._resolve(prop.objc_type, cls.name) + stub = self._stub(cpp_type, [], prop.name) + if gi := _generic_return_info(prop.objc_type): + tparam, ret = gi + # The impl is at file scope, so qualify the template + # container name with the namespace (the decl form + # above is inside `namespace NS {}` and stays bare). + ret_q = ret.replace("Enumerator<", f"{ns}::Enumerator<") + lines += [ + f"template ", + f"_{p}_INLINE {ret_q} {ns}::{cpp_name}::{getter_name}() const", + "{", + f" return reinterpret_cast<{ret_q}>({_call('this', stub, '')});", + "}", "", + ] + continue + lines += [ + f"_{p}_INLINE {cpp_type} {ns}::{cpp_name}::{getter_name}() const", + "{", + f" return {_call('this', stub, '')};", + "}", "", + ] + if not prop.is_readonly: + # SDK selector keeps its original case; C++ name matches + # the case-folded getter. + sname_sel = setter_name(prop.name) + sname_cpp = f"set{getter_name[0].upper()}{getter_name[1:]}" + stub_s = self._stub("void", [cpp_type], f"{sname_sel}:") + lines += [ + f"_{p}_INLINE void {ns}::{cpp_name}::{sname_cpp}({cpp_type} {prop.name})", + "{", + f" {_call('this', stub_s, prop.name)};", + "}", "", + ] + for m in info["instance_methods"]: + params_str = self._fmt_params(m.params, cls.name) + args = self._fmt_args(m.params) + ret = self._resolve(m.return_type, cls.name) + stub = self._stub(ret, _arg_types(cls.name, m.params), m.selector) + if gi := _generic_return_info(m.return_type): + # Templated element-typed method (see declaration side): + # the trampoline returns the resolver's default (e.g. + # `void*` or `NS::Enumerator*`), so + # reinterpret_cast to the caller's requested type. The + # impl is at file scope, so qualify the template + # container with the namespace. + tparam, ret_g = gi + ret_q = ret_g.replace("Enumerator<", f"{ns}::Enumerator<") + lines += [ + f"template ", + f"_{p}_INLINE {ret_q} {ns}::{cpp_name}::{m.cpp_name}({params_str})", + "{", + f" return reinterpret_cast<{ret_q}>({_call('this', stub, args)});", + "}", "", + ] + continue + ret_kw = "return " if ret != "void" else "" + lines += [ + f"_{p}_INLINE {ret} {ns}::{cpp_name}::{m.cpp_name}({params_str})", + "{", + f" {ret_kw}{_call('this', stub, args)};", + "}", "", + ] + bi, blk = self._block_param_info(m) + if bi is not None and blk is not None: + fp = self._fmt_function_overload_params(m, cls.name, bi, blk) + body = self._fmt_function_overload_body(m, bi, blk) + lines += [ + f"_{p}_INLINE {ret} {ns}::{cpp_name}::{m.cpp_name}({fp})", + "{", body, "}", "", + ] + + return "\n".join(lines) + + def generate_umbrella(self, fw_name: str) -> str: + p = self.prefix + lines = [ + "#pragma once", + "", + f'#include "{p}Defines.hpp"', + ] + # Enums live in their declaring per-source-header hpp, included + # below via `generated_headers`. Blocks/Structs are still per-fw + # aggregates. + if self.has_blocks: + lines.append(f'#include "{p}Blocks.hpp"') + if self.has_structs: + lines.append(f'#include "{p}Structs.hpp"') + for header in sorted(self.generated_headers): + lines.append(f'#include "{header}"') + # Sibling umbrellas this framework pulls in (e.g. Metal.hpp → + # Metal4.hpp so a single client include surfaces both namespaces). + for extra in self.extra_umbrella_includes: + lines.append(f'#include "{extra}"') + lines.append("") + return "\n".join(lines) + + # ── Formatting helpers ──────────────────────────────────────────── + + def _fmt_params(self, params: list[ObjCParam], cls_name: str) -> str: + if not params: + return "" + parts = [] + for p in params: + cpp_type = self._resolve(p.objc_type, cls_name) + parts.append(f"{cpp_type} {p.name}") + return ", ".join(parts) + + def _fmt_args(self, params: list[ObjCParam]) -> str: + return ", ".join(p.name for p in params) diff --git a/thirdparty/metal-cpp/tools/seed_from_metal_cpp.py b/thirdparty/metal-cpp/tools/seed_from_metal_cpp.py new file mode 100644 index 000000000000..715a86ce0c76 --- /dev/null +++ b/thirdparty/metal-cpp/tools/seed_from_metal_cpp.py @@ -0,0 +1,377 @@ +#!/usr/bin/env python3 +"""Seed per-class member filters from upstream metal-cpp. + +Walks `thirdparty/metal-cpp` to discover, for each ObjC class upstream +wraps, the set of selectors its inline impls touch via +`__PRIVATE_SEL()`. Also parses each framework's macOS +SDK headers to discover the *full* SDK selector surface per class. + +For every class, we then choose the more compact representation: + * `include.members` — the upstream selector allow-list + * `exclude.members` — the SDK selectors upstream *omits* + (only when significantly smaller; see _EXCLUDE_RATIO) + +Also writes each framework's `include.classes` to exactly the ObjC types +upstream defines, so the generator doesn't wrap SDK siblings upstream chose +to leave out (e.g. `URLQueryItem`, `URLComponents`, `FileSecurity` from +`NSURL.h`). + +ruamel.yaml's round-trip loader preserves comments / key order in the +in-place config edit. + +Usage: + venv/bin/python3 tools/seed_from_metal_cpp.py \ + --metal-cpp ../metal-cpp \ + --config tools/config.yaml +""" + +from __future__ import annotations + +import argparse +import re +import subprocess +import sys +from pathlib import Path + +try: + from ruamel.yaml import YAML + from ruamel.yaml.comments import CommentedMap, CommentedSeq +except ImportError: + print("ruamel.yaml required: pip install ruamel.yaml", file=sys.stderr) + sys.exit(1) + +# `metalcpp_common` lives next to this script; ensure we can import it +# whether the script is run from the repo root or from tools/. +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from metalcpp_common import ObjCParser # noqa: E402 + + +# C++ namespaces upstream uses (in priority order — longer prefixes first so +# `MTL4FX` is tried before `MTL4` before `MTL`). +NAMESPACES = ["NS", "MTL4FX", "MTL4", "MTLFX", "MTL", "CA"] + +# Pattern alternation built once: longest-match first so `MTL4` doesn't +# swallow the `MTL` of `MTL4Foo`. +_NS_ALT = "|".join(re.escape(n) for n in NAMESPACES) + +# Matches an inline-impl signature header: ` NS::::(...)` +# anywhere on a line. Class is captured for the next selector association. +_SIG_RE = re.compile(rf"\b({_NS_ALT})::(\w+)::\w+\s*\(") +# Matches the selector reference inside an inline-impl body. +_SEL_RE = re.compile(rf"_(?:{_NS_ALT})_PRIVATE_SEL\((\w+)\)") +# Matches a full class DEFINITION line: `class [_EXPORT] : public ...`. +# Forward decls `class ;` are intentionally not matched — they don't +# imply upstream wraps the class. +_CLASS_DEF_RE = re.compile(r"^\s*class\s+(?:_\w+\s+)?(\w+)\s*:\s*public\b") + +# Prefer `exclude` only when it would shrink the per-class list by at least +# this factor. Tuned so very-large classes (MTLDevice, MTLRenderCommandEncoder) +# collapse to a small drop list while small classes keep the explicit +# include — `include` documents intent better when the lists are comparable. +_EXCLUDE_RATIO = 2 # len(exclude) * _EXCLUDE_RATIO < len(include) + + +def accessor_to_selector(accessor: str) -> str: + """`foo_bar_` → `foo:bar:`; `commit` → `commit`.""" + return accessor.replace("_", ":") if accessor.endswith("_") else accessor + + +def parse_upstream_hpp(path: Path) -> dict[str, set[str]]: + """Scan one upstream `.hpp`. Returns `{ObjCClassName: {selectors}}`. + + State machine: each line that contains an `::::method(` + signature sets the "current class"; each subsequent `__PRIVATE_SEL(...)` + on the same or following lines is attributed to that class. Resets when + a new signature appears. + """ + out: dict[str, set[str]] = {} + current: str | None = None # ObjC class name (``) + for line in path.read_text().splitlines(): + sig = _SIG_RE.search(line) + if sig: + current = f"{sig.group(1)}{sig.group(2)}" + if current is None: + continue + for m in _SEL_RE.finditer(line): + out.setdefault(current, set()).add(accessor_to_selector(m.group(1))) + return out + + +def parse_upstream_classes(path: Path) -> set[str]: + """Return the set of ObjC class names upstream defines in this `.hpp`. + + Prefix is derived from the filename (`MTL4CommandQueue.hpp` → `MTL4`), so + a definition `class CommitOptions : public ...` in that file produces + `MTL4CommitOptions`. Files not matching any known prefix are ignored. + """ + prefix = next((n for n in NAMESPACES if path.stem.startswith(n)), None) + if prefix is None: + return set() + out: set[str] = set() + for line in path.read_text().splitlines(): + if m := _CLASS_DEF_RE.match(line): + out.add(f"{prefix}{m.group(1)}") + return out + + +def collect_upstream(metal_cpp_root: Path) -> tuple[dict[str, set[str]], dict[str, set[str]]]: + """Walk upstream metal-cpp once. + + Returns `(selectors_by_class, classes_by_prefix)`: + * `selectors_by_class[ObjCClass]` — selectors referenced by inline impls + * `classes_by_prefix[prefix]` — ObjC class names whose full definitions + appear in upstream (drives the framework-level `include.classes`). + """ + selectors: dict[str, set[str]] = {} + classes: dict[str, set[str]] = {} + for hpp in sorted(metal_cpp_root.glob("**/*.hpp")): + for cls, sels in parse_upstream_hpp(hpp).items(): + selectors.setdefault(cls, set()).update(sels) + for cls in parse_upstream_classes(hpp): + prefix = next((n for n in NAMESPACES if cls.startswith(n)), None) + if prefix: + classes.setdefault(prefix, set()).add(cls) + return selectors, classes + + +def _macos_sdk_path() -> Path: + """Resolve the macOS SDK via xcrun. macOS exposes the broadest method + surface — picking it ensures we see every selector that any platform + might support (per-platform `API_AVAILABLE` shrinks libclang's AST on + other SDKs).""" + out = subprocess.check_output(["xcrun", "--sdk", "macosx", + "--show-sdk-path"]).decode().strip() + return Path(out) + + +def collect_sdk_classes(cfg: dict, sdk_path: Path) -> dict[str, "ParsedClass"]: + """Parse every ObjC SDK header listed in the config and return + `{ObjCClassName: ParsedClass}`. C-API frameworks (apinotes-driven) are + skipped — they don't have ObjC selectors.""" + parser = ObjCParser(sdk_path) + out: dict[str, ParsedClass] = {} + for fw in cfg["frameworks"]: + if fw.get("api_notes"): + continue + sdk_fw_name = fw.get("sdk_framework") or fw["name"] + fw_dir = (sdk_path / "System" / "Library" / "Frameworks" + / f"{sdk_fw_name}.framework" / "Headers") + for header in fw.get("headers", []) or []: + hp = fw_dir / header + if not hp.exists(): + continue + data = parser.parse_header(hp) + for cls in data.classes: + # Each class shows up in at most one header (and re-parsing + # the same one would duplicate), so first-write wins. + out.setdefault(cls.name, ParsedClass.from_cls(cls)) + return out + + +class ParsedClass: + """Subset of `ObjCClass` we keep for selector comparison.""" + __slots__ = ("methods", "properties") + + def __init__(self, methods: list[str], properties: list[tuple[str, bool, str]]): + # (selector,) + self.methods = methods + # (prop_name, is_readonly, objc_type) + self.properties = properties + + @classmethod + def from_cls(cls, parsed_cls) -> "ParsedClass": + return cls( + methods=[m.selector for m in parsed_cls.methods], + properties=[(p.name, p.is_readonly, p.objc_type) + for p in parsed_cls.properties], + ) + + +def _prop_in_upstream(prop_name: str, is_readonly: bool, objc_type: str, + upstream: set[str]) -> bool: + """True when upstream's selector set references this SDK property under + any of its filter-recognized forms. + + The generator's `filter_class` matches a property when either `prop.name` + or its `set:` form is in the allow-list. Upstream metal-cpp, + however, references properties via their actual ObjC selector + (`_PRIVATE_SEL(isRasterizationEnabled)`, `_PRIVATE_SEL(setLabel_)`, …), + not by property name. We therefore probe every plausible upstream-style + selector to decide whether upstream "wraps" the property.""" + cap = prop_name[0].upper() + prop_name[1:] + if prop_name in upstream: + return True + if not is_readonly and f"set{cap}:" in upstream: + return True + # Apple's BOOL property convention: getter selector is `is` even + # though the property name is ``. + if objc_type.strip() in {"BOOL", "bool", "_Bool"} and f"is{cap}" in upstream: + return True + return False + + +def compute_exclude(parsed: ParsedClass, upstream: set[str]) -> set[str]: + """Return the set of SDK identifiers (method selectors or property + names) that upstream does *not* wrap. Suitable for `exclude.members` + — the generator's filter will drop these and keep the rest.""" + excl: set[str] = set() + for selector in parsed.methods: + if selector not in upstream: + excl.add(selector) + for prop_name, is_readonly, objc_type in parsed.properties: + if not _prop_in_upstream(prop_name, is_readonly, objc_type, upstream): + excl.add(prop_name) + return excl + + +def update_config(config_path: Path, upstream_sels: dict[str, set[str]], + classes_by_prefix: dict[str, set[str]], + sdk_classes: dict[str, ParsedClass], + dry_run: bool) -> dict[str, int]: + """In-place merge. Writes: + * `frameworks[i].include.classes` — exactly the upstream-defined types + * `class_overrides[Class].include.members` or `.exclude.members`, + whichever is more compact. + + Returns counters: `{"include": n, "exclude": n, "wrapped": n, "sels": n}`. + """ + yaml = YAML() + yaml.preserve_quotes = True + yaml.indent(mapping=2, sequence=4, offset=2) + yaml.width = 200 + with config_path.open() as f: + cfg = yaml.load(f) + + counts = {"include": 0, "exclude": 0, "no_filter": 0} + + def _clear_members(entry: CommentedMap, key: str) -> None: + """Drop `entry[key].members` and the now-empty parent if needed.""" + sub = entry.get(key) + if isinstance(sub, CommentedMap): + sub.pop("members", None) + if not sub: + entry.pop(key) + + for fw in cfg["frameworks"]: + prefix: str = fw["prefix"] + # Constrain the framework's class universe to exactly what upstream + # defines for this prefix. Without this the generator wraps every + # @interface the SDK packs into a header (e.g. NSURL.h declares URL, + # URLQueryItem, URLComponents, FileSecurity — but upstream only + # wraps URL). + upstream_classes = sorted(classes_by_prefix.get(prefix, set())) + if upstream_classes: + inc = fw.setdefault("include", CommentedMap()) + inc["classes"] = CommentedSeq(upstream_classes) + co = fw.setdefault("class_overrides", CommentedMap()) + for cls in sorted(upstream_sels): + owning_prefix = next( + (p for p in NAMESPACES if cls.startswith(p)), "" + ) + if owning_prefix != prefix: + continue + upstream = upstream_sels[cls] + if not upstream: + continue + entry = co.get(cls) + if not isinstance(entry, CommentedMap): + entry = CommentedMap() + co[cls] = entry + # Skip structs / skipped entries — they don't take include/exclude. + if entry.get("skip"): + continue + + # Three outcomes per class: + # * exclude: upstream wraps most of the SDK; the SDK diff is + # significantly smaller than the include list. + # * no_filter: upstream wraps the entire SDK surface (empty + # diff) — a filter would be a no-op, so drop it. + # * include: anything else (default). + mode = "include" + include_members = sorted(upstream) + exclude_members: list[str] = [] + if (parsed := sdk_classes.get(cls)) is not None: + excl = compute_exclude(parsed, upstream) + if not excl: + mode = "no_filter" + elif len(excl) * _EXCLUDE_RATIO < len(upstream): + mode = "exclude" + exclude_members = sorted(excl) + + if mode == "exclude": + _clear_members(entry, "include") + exc = entry.get("exclude") + if not isinstance(exc, CommentedMap): + exc = CommentedMap() + entry["exclude"] = exc + exc["members"] = CommentedSeq(exclude_members) + elif mode == "no_filter": + _clear_members(entry, "include") + _clear_members(entry, "exclude") + # Drop the override entry entirely if nothing else is set + # (rename / append / skip / packed / …). Keeps the seeded + # config free of `ClassName: {}` noise. + if not entry: + co.pop(cls) + else: # include + _clear_members(entry, "exclude") + inc = entry.get("include") + if not isinstance(inc, CommentedMap): + inc = CommentedMap() + entry["include"] = inc + inc["members"] = CommentedSeq(include_members) + counts[mode] += 1 + + if dry_run: + yaml.dump(cfg, sys.stdout) + else: + with config_path.open("w") as f: + yaml.dump(cfg, f) + + return counts + + +def main() -> int: + p = argparse.ArgumentParser(description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + p.add_argument("--metal-cpp", type=Path, required=True, + help="Path to upstream metal-cpp (thirdparty/metal-cpp)") + p.add_argument("--config", type=Path, required=True, + help="Path to config.yaml to update in place") + p.add_argument("--dry-run", action="store_true", + help="Print updated YAML to stdout instead of writing back") + args = p.parse_args() + + if not args.metal_cpp.is_dir(): + print(f"--metal-cpp not a directory: {args.metal_cpp}", file=sys.stderr) + return 1 + if not args.config.is_file(): + print(f"--config not a file: {args.config}", file=sys.stderr) + return 1 + + upstream_sels, classes_by_prefix = collect_upstream(args.metal_cpp) + if not upstream_sels: + print("no selectors found — check --metal-cpp path", file=sys.stderr) + return 1 + + # SDK parsing is the slow step (~10s); load config once for both passes. + yaml = YAML(typ="rt") + with args.config.open() as f: + cfg = yaml.load(f) + sdk_path = _macos_sdk_path() + sdk_classes = collect_sdk_classes(cfg, sdk_path) + + counts = update_config(args.config, upstream_sels, classes_by_prefix, + sdk_classes, args.dry_run) + n_sels = sum(len(s) for s in upstream_sels.values()) + n_wrapped = sum(len(v) for v in classes_by_prefix.values()) + print(f"{counts['include']} include / {counts['exclude']} exclude / " + f"{counts['no_filter']} no-filter classes, " + f"{n_sels} upstream selectors, " + f"{n_wrapped} wrapped types → {args.config}", + file=sys.stderr) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/thirdparty/metal-cpp/update-metal-cpp.sh b/thirdparty/metal-cpp/update-metal-cpp.sh deleted file mode 100755 index 19e42b8c8123..000000000000 --- a/thirdparty/metal-cpp/update-metal-cpp.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -e - -# metal-cpp update script for Godot -# -# metal-cpp source: https://developer.apple.com/metal/cpp/ -# This version includes Metal 4 APIs (macOS 26 / iOS 26). - -VERSION="macOS26-iOS26" - -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" - -# If a zip is provided as argument, extract it -if [ -n "$1" ]; then - echo "Updating metal-cpp from: $1" - - rm -rf \ - "$SCRIPT_DIR/Foundation" \ - "$SCRIPT_DIR/Metal" \ - "$SCRIPT_DIR/MetalFX" \ - "$SCRIPT_DIR/QuartzCore" \ - "$SCRIPT_DIR/SingleHeader" - - unzip -q "$1" -d "$SCRIPT_DIR" - - echo "Extracted metal-cpp $VERSION" -else - echo "Applying patches only..." -fi - -# ============================================================================= -# Apply Godot-specific patches -# ============================================================================= - -echo "Applying Godot compatibility patches..." - -# Apply patch files (idempotent) -PATCH_DIR="$SCRIPT_DIR/patches" -if [ -d "$PATCH_DIR" ]; then - for PATCH in "$PATCH_DIR"/*.patch; do - if [ ! -e "$PATCH" ]; then - echo " No patches found in $PATCH_DIR" - break - fi - - PATCH_NAME="$(basename "$PATCH")" - if git -C "$REPO_ROOT" apply --check "$PATCH" > /dev/null 2>&1; then - git -C "$REPO_ROOT" apply "$PATCH" - echo " $PATCH_NAME: applied" - elif git -C "$REPO_ROOT" apply --reverse --check "$PATCH" > /dev/null 2>&1; then - echo " $PATCH_NAME: already applied" - else - echo " $PATCH_NAME: failed to apply" - exit 1 - fi - done -else - echo " Warning: $PATCH_DIR not found" -fi - -echo "Done."