From 68b0125226464cb3c9e9b7f50bfb53cda97723b4 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 6 Aug 2025 01:07:41 -0700 Subject: Add reflection api for overload candidate filtering. (#8066) * Add reflection api for overload candidate filtering. * Fix API. * Fix. * Update build. * Update test. * Update formatting. --- include/slang.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/slang.h') diff --git a/include/slang.h b/include/slang.h index 65449a1ff..7462644a2 100644 --- a/include/slang.h +++ b/include/slang.h @@ -502,6 +502,12 @@ convention for interface methods. #include #endif // ! SLANG_NO_STDDEF +#ifdef SLANG_NO_DEPRECATION + #define SLANG_DEPRECATED +#else + #define SLANG_DEPRECATED [[deprecated]] +#endif + #ifdef __cplusplus extern "C" { @@ -3345,6 +3351,16 @@ struct ShaderReflection name); } + SLANG_DEPRECATED FunctionReflection* tryResolveOverloadedFunction( + uint32_t candidateCount, + FunctionReflection** candidates) + { + return (FunctionReflection*)spReflection_TryResolveOverloadedFunction( + (SlangReflection*)this, + candidateCount, + (SlangReflectionFunction**)candidates); + } + VariableReflection* findVarByNameInType(TypeReflection* type, const char* name) { return (VariableReflection*)spReflection_FindVarByNameInType( -- cgit v1.2.3