diff --git a/.silktouch/openal-clangsharp.stout b/.silktouch/openal-clangsharp.stout index 994e242e2e..fe7129046a 100644 Binary files a/.silktouch/openal-clangsharp.stout and b/.silktouch/openal-clangsharp.stout differ diff --git a/.silktouch/vulkan-clangsharp.stout b/.silktouch/vulkan-clangsharp.stout index d905b7ace2..4680dfe9eb 100644 Binary files a/.silktouch/vulkan-clangsharp.stout and b/.silktouch/vulkan-clangsharp.stout differ diff --git a/generator.json b/generator.json index 8bbae05cda..86d71ef94f 100644 --- a/generator.json +++ b/generator.json @@ -42,6 +42,7 @@ "AddIncludes", "ClangScraper", "MarkNativeNames", + "ExtractHandles", "ExtractNestedTyping", "TransformHandles", "TransformFunctions", @@ -59,8 +60,7 @@ "InputTestRoot": "tests/SDL" }, "TransformHandles": { - "AssumeMissingTypesOpaque": true, - "UseDSL": true + "UseDsl": true }, "TransformFunctions": { "BoolTypes": { @@ -228,6 +228,7 @@ "ChangeNativeClass", "AddApiProfiles", "MixKhronosData", + "ExtractHandles", "ExtractNestedTyping", "TransformHandles", "InterceptNativeFunctions", @@ -299,24 +300,20 @@ "NameOverrides": { "ALContext": "ALContext", "EFXEAXREVERBPROPERTIES": "EfxEaxReverbProperties", - "EFXEAXREVERBPROPERTIES_flReflectionsPan": "EfxEaxReverbPropertiesFlReflectionsPan", - "EFXEAXREVERBPROPERTIES_flLateReverbPan": "EfxEaxReverbPropertiesFlLateReverbPan", + "EFXEAXREVERBPROPERTIESflReflectionsPan": "EfxEaxReverbPropertiesFlReflectionsPan", + "EFXEAXREVERBPROPERTIESflLateReverbPan": "EfxEaxReverbPropertiesFlLateReverbPan", "ALCcontextHandle": "ContextHandle", "ALCdeviceHandle": "DeviceHandle", "ALBUFFERCALLBACKTYPESOFT": "BufferCallbackSOFT", - "ALBUFFERCALLBACKTYPESOFTDelegate": "BufferCallbackDelegateSOFT", + "ALBUFFERCALLBACKTYPESOFTDelegate": "BufferCallbackSOFTDelegate", "ALCEVENTPROCTYPESOFT": "ContextEventProcSOFT", - "ALCEVENTPROCTYPESOFTDelegate": "ContextEventProcDelegateSOFT", + "ALCEVENTPROCTYPESOFTDelegate": "ContextEventProcSOFTDelegate", "ALEVENTPROCSOFT": "EventProcSOFT", - "ALEVENTPROCSOFTDelegate": "EventProcDelegateSOFT", + "ALEVENTPROCSOFTDelegate": "EventProcSOFTDelegate", "ALDEBUGPROCEXT": "DebugProcEXT", - "ALDEBUGPROCEXTDelegate": "DebugProcDelegateEXT", + "ALDEBUGPROCEXTDelegate": "DebugProcEXTDelegate", "LPALFOLDBACKCALLBACK": "FoldbackCallback", - "LPALFOLDBACKCALLBACKDelegate": "FoldbackCallbackDelegate", - "EAXSetDirect": "EAXSetDirect", - "EAXGetDirect": "EAXGetDirect", - "EAXGetBufferModeDirect": "EAXGetBufferModeDirect", - "EAXSetBufferModeDirect": "EAXSetBufferModeDirect" + "LPALFOLDBACKCALLBACKDelegate": "FoldbackCallbackDelegate" }, "Affixes": { "HandleType": { @@ -351,8 +348,7 @@ "BenefitOfTheDoubtArrayTransformation": true }, "TransformHandles": { - "AssumeMissingTypesOpaque": true, - "UseDSL": true + "UseDsl": true }, "StripAttributes": { "Remove": [ @@ -370,6 +366,7 @@ "AddIncludes", "ClangScraper", "MarkNativeNames", + "ExtractHandles", "ExtractNestedTyping", "TransformHandles", "MixKhronosData", @@ -423,8 +420,7 @@ } }, "TransformHandles": { - "AssumeMissingTypesOpaque": true, - "UseDSL": true + "UseDsl": true }, "PrettifyNames": { "GlobalPrefixHints": ["PFN_vk","vk"], diff --git a/sources/OpenAL/OpenAL/al/AL.gen.cs b/sources/OpenAL/OpenAL/al/AL.gen.cs index fae97c609f..c11df0e5f9 100644 --- a/sources/OpenAL/OpenAL/al/AL.gen.cs +++ b/sources/OpenAL/OpenAL/al/AL.gen.cs @@ -8203,7 +8203,7 @@ Ref buffers SupportedApiProfile("al", ["AL_EXT_direct_context"]), SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] - public static extern int EAXGetBufferModeDirect( + public static extern int EaxGetBufferModeDirect( ContextHandle context, uint buffer, int* pReserved @@ -8218,7 +8218,7 @@ public static extern int EAXGetBufferModeDirect( [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static int EAXGetBufferModeDirect( + public static int EaxGetBufferModeDirect( ContextHandle context, uint buffer, Ref pReserved @@ -8226,7 +8226,7 @@ Ref pReserved { fixed (int* __dsl_pReserved = pReserved) { - return (int)EAXGetBufferModeDirect(context, buffer, __dsl_pReserved); + return (int)EaxGetBufferModeDirect(context, buffer, __dsl_pReserved); } } @@ -8236,7 +8236,7 @@ Ref pReserved SupportedApiProfile("al", ["AL_EXT_direct_context"]), SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] - public static extern int EAXGetDirect( + public static extern int EaxGetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -8254,7 +8254,7 @@ uint value_size [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static int EAXGetDirect( + public static int EaxGetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -8266,7 +8266,7 @@ uint value_size fixed (void* __dsl_value = value) fixed (System.Guid* __dsl_property_set_id = property_set_id) { - return (int)EAXGetDirect( + return (int)EaxGetDirect( context, __dsl_property_set_id, property_id, @@ -8283,7 +8283,7 @@ uint value_size SupportedApiProfile("al", ["AL_EXT_direct_context"]), SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] - public static extern sbyte EAXSetBufferModeDirect( + public static extern sbyte EaxSetBufferModeDirect( ContextHandle context, int n, uint* buffers, @@ -8299,7 +8299,7 @@ int value [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static MaybeBool EAXSetBufferModeDirect( + public static MaybeBool EaxSetBufferModeDirect( ContextHandle context, int n, Ref buffers, @@ -8309,7 +8309,7 @@ int value fixed (uint* __dsl_buffers = buffers) { return (MaybeBool) - (sbyte)EAXSetBufferModeDirect(context, n, __dsl_buffers, value); + (sbyte)EaxSetBufferModeDirect(context, n, __dsl_buffers, value); } } @@ -8319,7 +8319,7 @@ int value SupportedApiProfile("al", ["AL_EXT_direct_context"]), SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] - public static extern int EAXSetDirect( + public static extern int EaxSetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -8337,7 +8337,7 @@ uint value_size [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static int EAXSetDirect( + public static int EaxSetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -8349,7 +8349,7 @@ uint value_size fixed (void* __dsl_value = value) fixed (System.Guid* __dsl_property_set_id = property_set_id) { - return (int)EAXSetDirect( + return (int)EaxSetDirect( context, __dsl_property_set_id, property_id, @@ -16286,8 +16286,8 @@ public void SpeedOfSoundDirect(ContextHandle context, float value) => [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public int EAXGetBufferModeDirect(ContextHandle context, uint buffer, int* pReserved) => - T.EAXGetBufferModeDirect(context, buffer, pReserved); + public int EaxGetBufferModeDirect(ContextHandle context, uint buffer, int* pReserved) => + T.EaxGetBufferModeDirect(context, buffer, pReserved); [NativeName("EAXGetBufferModeDirect")] [ @@ -16298,8 +16298,8 @@ public int EAXGetBufferModeDirect(ContextHandle context, uint buffer, int* pRese [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public int EAXGetBufferModeDirect(ContextHandle context, uint buffer, Ref pReserved) => - T.EAXGetBufferModeDirect(context, buffer, pReserved); + public int EaxGetBufferModeDirect(ContextHandle context, uint buffer, Ref pReserved) => + T.EaxGetBufferModeDirect(context, buffer, pReserved); [NativeName("EAXGetDirect")] [ @@ -16310,14 +16310,14 @@ public int EAXGetBufferModeDirect(ContextHandle context, uint buffer, Ref p [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public int EAXGetDirect( + public int EaxGetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, uint source_id, void* value, uint value_size - ) => T.EAXGetDirect(context, property_set_id, property_id, source_id, value, value_size); + ) => T.EaxGetDirect(context, property_set_id, property_id, source_id, value, value_size); [NativeName("EAXGetDirect")] [ @@ -16328,14 +16328,14 @@ uint value_size [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public int EAXGetDirect( + public int EaxGetDirect( ContextHandle context, Ref property_set_id, uint property_id, uint source_id, Ref value, uint value_size - ) => T.EAXGetDirect(context, property_set_id, property_id, source_id, value, value_size); + ) => T.EaxGetDirect(context, property_set_id, property_id, source_id, value, value_size); [NativeName("EAXSetBufferModeDirect")] [ @@ -16346,12 +16346,12 @@ uint value_size [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public sbyte EAXSetBufferModeDirect( + public sbyte EaxSetBufferModeDirect( ContextHandle context, int n, uint* buffers, int value - ) => T.EAXSetBufferModeDirect(context, n, buffers, value); + ) => T.EaxSetBufferModeDirect(context, n, buffers, value); [NativeName("EAXSetBufferModeDirect")] [ @@ -16362,12 +16362,12 @@ int value [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public MaybeBool EAXSetBufferModeDirect( + public MaybeBool EaxSetBufferModeDirect( ContextHandle context, int n, Ref buffers, int value - ) => T.EAXSetBufferModeDirect(context, n, buffers, value); + ) => T.EaxSetBufferModeDirect(context, n, buffers, value); [NativeName("EAXSetDirect")] [ @@ -16378,14 +16378,14 @@ int value [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public int EAXSetDirect( + public int EaxSetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, uint source_id, void* value, uint value_size - ) => T.EAXSetDirect(context, property_set_id, property_id, source_id, value, value_size); + ) => T.EaxSetDirect(context, property_set_id, property_id, source_id, value, value_size); [NativeName("EAXSetDirect")] [ @@ -16396,14 +16396,14 @@ uint value_size [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public int EAXSetDirect( + public int EaxSetDirect( ContextHandle context, Ref property_set_id, uint property_id, uint source_id, Ref value, uint value_size - ) => T.EAXSetDirect(context, property_set_id, property_id, source_id, value, value_size); + ) => T.EaxSetDirect(context, property_set_id, property_id, source_id, value, value_size); } public partial class ThisThread @@ -25946,11 +25946,11 @@ public static void SpeedOfSoundDirect(ContextHandle context, float value) => [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static int EAXGetBufferModeDirect( + public static int EaxGetBufferModeDirect( ContextHandle context, uint buffer, int* pReserved - ) => Underlying.Value!.EAXGetBufferModeDirect(context, buffer, pReserved); + ) => Underlying.Value!.EaxGetBufferModeDirect(context, buffer, pReserved); [NativeName("EAXGetBufferModeDirect")] [ @@ -25961,7 +25961,7 @@ public static int EAXGetBufferModeDirect( [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static int EAXGetBufferModeDirect( + public static int EaxGetBufferModeDirect( ContextHandle context, uint buffer, Ref pReserved @@ -25969,7 +25969,7 @@ Ref pReserved { fixed (int* __dsl_pReserved = pReserved) { - return (int)EAXGetBufferModeDirect(context, buffer, __dsl_pReserved); + return (int)EaxGetBufferModeDirect(context, buffer, __dsl_pReserved); } } @@ -25982,7 +25982,7 @@ Ref pReserved [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static int EAXGetDirect( + public static int EaxGetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -25990,7 +25990,7 @@ public static int EAXGetDirect( void* value, uint value_size ) => - Underlying.Value!.EAXGetDirect( + Underlying.Value!.EaxGetDirect( context, property_set_id, property_id, @@ -26008,7 +26008,7 @@ uint value_size [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static int EAXGetDirect( + public static int EaxGetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -26020,7 +26020,7 @@ uint value_size fixed (void* __dsl_value = value) fixed (System.Guid* __dsl_property_set_id = property_set_id) { - return (int)EAXGetDirect( + return (int)EaxGetDirect( context, __dsl_property_set_id, property_id, @@ -26040,12 +26040,12 @@ uint value_size [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static sbyte EAXSetBufferModeDirect( + public static sbyte EaxSetBufferModeDirect( ContextHandle context, int n, uint* buffers, int value - ) => Underlying.Value!.EAXSetBufferModeDirect(context, n, buffers, value); + ) => Underlying.Value!.EaxSetBufferModeDirect(context, n, buffers, value); [NativeName("EAXSetBufferModeDirect")] [ @@ -26056,7 +26056,7 @@ int value [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static MaybeBool EAXSetBufferModeDirect( + public static MaybeBool EaxSetBufferModeDirect( ContextHandle context, int n, Ref buffers, @@ -26066,7 +26066,7 @@ int value fixed (uint* __dsl_buffers = buffers) { return (MaybeBool) - (sbyte)EAXSetBufferModeDirect(context, n, __dsl_buffers, value); + (sbyte)EaxSetBufferModeDirect(context, n, __dsl_buffers, value); } } @@ -26079,7 +26079,7 @@ int value [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static int EAXSetDirect( + public static int EaxSetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -26087,7 +26087,7 @@ public static int EAXSetDirect( void* value, uint value_size ) => - Underlying.Value!.EAXSetDirect( + Underlying.Value!.EaxSetDirect( context, property_set_id, property_id, @@ -26105,7 +26105,7 @@ uint value_size [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] - public static int EAXSetDirect( + public static int EaxSetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -26117,7 +26117,7 @@ uint value_size fixed (void* __dsl_value = value) fixed (System.Guid* __dsl_property_set_id = property_set_id) { - return (int)EAXSetDirect( + return (int)EaxSetDirect( context, __dsl_property_set_id, property_id, @@ -42711,7 +42711,7 @@ public static void SpeedOfSoundDirect(ContextHandle context, float value) => ] [NativeFunction("openal", EntryPoint = "EAXGetBufferModeDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - int IAL.EAXGetBufferModeDirect(ContextHandle context, uint buffer, int* pReserved) => + int IAL.EaxGetBufferModeDirect(ContextHandle context, uint buffer, int* pReserved) => ( (delegate* unmanaged)( _slots[293] is not null and var loadedFnPtr @@ -42727,8 +42727,8 @@ _slots[293] is not null and var loadedFnPtr ] [NativeFunction("openal", EntryPoint = "EAXGetBufferModeDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - public static int EAXGetBufferModeDirect(ContextHandle context, uint buffer, int* pReserved) => - ThisThread.EAXGetBufferModeDirect(context, buffer, pReserved); + public static int EaxGetBufferModeDirect(ContextHandle context, uint buffer, int* pReserved) => + ThisThread.EaxGetBufferModeDirect(context, buffer, pReserved); [NativeName("EAXGetBufferModeDirect")] [ @@ -42737,11 +42737,11 @@ public static int EAXGetBufferModeDirect(ContextHandle context, uint buffer, int ] [NativeFunction("openal", EntryPoint = "EAXGetBufferModeDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - int IAL.EAXGetBufferModeDirect(ContextHandle context, uint buffer, Ref pReserved) + int IAL.EaxGetBufferModeDirect(ContextHandle context, uint buffer, Ref pReserved) { fixed (int* __dsl_pReserved = pReserved) { - return (int)((IAL)this).EAXGetBufferModeDirect(context, buffer, __dsl_pReserved); + return (int)((IAL)this).EaxGetBufferModeDirect(context, buffer, __dsl_pReserved); } } @@ -42752,11 +42752,11 @@ int IAL.EAXGetBufferModeDirect(ContextHandle context, uint buffer, Ref pRes ] [NativeFunction("openal", EntryPoint = "EAXGetBufferModeDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - public static int EAXGetBufferModeDirect( + public static int EaxGetBufferModeDirect( ContextHandle context, uint buffer, Ref pReserved - ) => ThisThread.EAXGetBufferModeDirect(context, buffer, pReserved); + ) => ThisThread.EaxGetBufferModeDirect(context, buffer, pReserved); [NativeName("EAXGetDirect")] [ @@ -42765,7 +42765,7 @@ Ref pReserved ] [NativeFunction("openal", EntryPoint = "EAXGetDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - int IAL.EAXGetDirect( + int IAL.EaxGetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -42788,7 +42788,7 @@ _slots[294] is not null and var loadedFnPtr ] [NativeFunction("openal", EntryPoint = "EAXGetDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - public static int EAXGetDirect( + public static int EaxGetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -42796,7 +42796,7 @@ public static int EAXGetDirect( void* value, uint value_size ) => - ThisThread.EAXGetDirect( + ThisThread.EaxGetDirect( context, property_set_id, property_id, @@ -42812,7 +42812,7 @@ uint value_size ] [NativeFunction("openal", EntryPoint = "EAXGetDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - int IAL.EAXGetDirect( + int IAL.EaxGetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -42825,7 +42825,7 @@ uint value_size fixed (System.Guid* __dsl_property_set_id = property_set_id) { return (int) - ((IAL)this).EAXGetDirect( + ((IAL)this).EaxGetDirect( context, __dsl_property_set_id, property_id, @@ -42843,7 +42843,7 @@ uint value_size ] [NativeFunction("openal", EntryPoint = "EAXGetDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - public static int EAXGetDirect( + public static int EaxGetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -42851,7 +42851,7 @@ public static int EAXGetDirect( Ref value, uint value_size ) => - ThisThread.EAXGetDirect( + ThisThread.EaxGetDirect( context, property_set_id, property_id, @@ -42867,7 +42867,7 @@ uint value_size ] [NativeFunction("openal", EntryPoint = "EAXSetBufferModeDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - sbyte IAL.EAXSetBufferModeDirect(ContextHandle context, int n, uint* buffers, int value) => + sbyte IAL.EaxSetBufferModeDirect(ContextHandle context, int n, uint* buffers, int value) => ( (delegate* unmanaged)( _slots[295] is not null and var loadedFnPtr @@ -42883,12 +42883,12 @@ _slots[295] is not null and var loadedFnPtr ] [NativeFunction("openal", EntryPoint = "EAXSetBufferModeDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - public static sbyte EAXSetBufferModeDirect( + public static sbyte EaxSetBufferModeDirect( ContextHandle context, int n, uint* buffers, int value - ) => ThisThread.EAXSetBufferModeDirect(context, n, buffers, value); + ) => ThisThread.EaxSetBufferModeDirect(context, n, buffers, value); [NativeName("EAXSetBufferModeDirect")] [ @@ -42897,7 +42897,7 @@ int value ] [NativeFunction("openal", EntryPoint = "EAXSetBufferModeDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - MaybeBool IAL.EAXSetBufferModeDirect( + MaybeBool IAL.EaxSetBufferModeDirect( ContextHandle context, int n, Ref buffers, @@ -42907,7 +42907,7 @@ int value fixed (uint* __dsl_buffers = buffers) { return (MaybeBool) - (sbyte)((IAL)this).EAXSetBufferModeDirect(context, n, __dsl_buffers, value); + (sbyte)((IAL)this).EaxSetBufferModeDirect(context, n, __dsl_buffers, value); } } @@ -42918,12 +42918,12 @@ int value ] [NativeFunction("openal", EntryPoint = "EAXSetBufferModeDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - public static MaybeBool EAXSetBufferModeDirect( + public static MaybeBool EaxSetBufferModeDirect( ContextHandle context, int n, Ref buffers, int value - ) => ThisThread.EAXSetBufferModeDirect(context, n, buffers, value); + ) => ThisThread.EaxSetBufferModeDirect(context, n, buffers, value); [NativeName("EAXSetDirect")] [ @@ -42932,7 +42932,7 @@ int value ] [NativeFunction("openal", EntryPoint = "EAXSetDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - int IAL.EAXSetDirect( + int IAL.EaxSetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -42955,7 +42955,7 @@ _slots[296] is not null and var loadedFnPtr ] [NativeFunction("openal", EntryPoint = "EAXSetDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - public static int EAXSetDirect( + public static int EaxSetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -42963,7 +42963,7 @@ public static int EAXSetDirect( void* value, uint value_size ) => - ThisThread.EAXSetDirect( + ThisThread.EaxSetDirect( context, property_set_id, property_id, @@ -42979,7 +42979,7 @@ uint value_size ] [NativeFunction("openal", EntryPoint = "EAXSetDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - int IAL.EAXSetDirect( + int IAL.EaxSetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -42992,7 +42992,7 @@ uint value_size fixed (System.Guid* __dsl_property_set_id = property_set_id) { return (int) - ((IAL)this).EAXSetDirect( + ((IAL)this).EaxSetDirect( context, __dsl_property_set_id, property_id, @@ -43010,7 +43010,7 @@ uint value_size ] [NativeFunction("openal", EntryPoint = "EAXSetDirect")] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] - public static int EAXSetDirect( + public static int EaxSetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -43018,7 +43018,7 @@ public static int EAXSetDirect( Ref value, uint value_size ) => - ThisThread.EAXSetDirect( + ThisThread.EaxSetDirect( context, property_set_id, property_id, diff --git a/sources/OpenAL/OpenAL/al/BufferCallbackSOFT.gen.cs b/sources/OpenAL/OpenAL/al/BufferCallbackSOFT.gen.cs index 821cb1670f..d28a908f9a 100644 --- a/sources/OpenAL/OpenAL/al/BufferCallbackSOFT.gen.cs +++ b/sources/OpenAL/OpenAL/al/BufferCallbackSOFT.gen.cs @@ -19,7 +19,7 @@ namespace Silk.NET.OpenAL; public BufferCallbackSOFT(delegate* unmanaged ptr) => Pointer = ptr; - public BufferCallbackSOFT(BufferCallbackDelegateSOFT proc) => + public BufferCallbackSOFT(BufferCallbackSOFTDelegate proc) => Pointer = SilkMarshal.DelegateToPtr(proc); public void Dispose() => SilkMarshal.Free(Pointer); diff --git a/sources/OpenAL/OpenAL/al/BufferCallbackDelegateSOFT.gen.cs b/sources/OpenAL/OpenAL/al/BufferCallbackSOFTDelegate.gen.cs similarity index 90% rename from sources/OpenAL/OpenAL/al/BufferCallbackDelegateSOFT.gen.cs rename to sources/OpenAL/OpenAL/al/BufferCallbackSOFTDelegate.gen.cs index 9304622154..00ceea77e9 100644 --- a/sources/OpenAL/OpenAL/al/BufferCallbackDelegateSOFT.gen.cs +++ b/sources/OpenAL/OpenAL/al/BufferCallbackSOFTDelegate.gen.cs @@ -11,4 +11,4 @@ namespace Silk.NET.OpenAL; [NativeName("ALBUFFERCALLBACKTYPESOFT")] -public unsafe delegate int BufferCallbackDelegateSOFT(void* arg0, void* arg1, int arg2); +public unsafe delegate int BufferCallbackSOFTDelegate(void* arg0, void* arg1, int arg2); diff --git a/sources/OpenAL/OpenAL/al/ContextEventProcSOFT.gen.cs b/sources/OpenAL/OpenAL/al/ContextEventProcSOFT.gen.cs index 36ccd70272..cc8b15a5c4 100644 --- a/sources/OpenAL/OpenAL/al/ContextEventProcSOFT.gen.cs +++ b/sources/OpenAL/OpenAL/al/ContextEventProcSOFT.gen.cs @@ -21,7 +21,7 @@ public ContextEventProcSOFT( delegate* unmanaged ptr ) => Pointer = ptr; - public ContextEventProcSOFT(ContextEventProcDelegateSOFT proc) => + public ContextEventProcSOFT(ContextEventProcSOFTDelegate proc) => Pointer = SilkMarshal.DelegateToPtr(proc); public void Dispose() => SilkMarshal.Free(Pointer); diff --git a/sources/OpenAL/OpenAL/al/ContextEventProcDelegateSOFT.gen.cs b/sources/OpenAL/OpenAL/al/ContextEventProcSOFTDelegate.gen.cs similarity index 92% rename from sources/OpenAL/OpenAL/al/ContextEventProcDelegateSOFT.gen.cs rename to sources/OpenAL/OpenAL/al/ContextEventProcSOFTDelegate.gen.cs index 8bf39a4158..298338bc3a 100644 --- a/sources/OpenAL/OpenAL/al/ContextEventProcDelegateSOFT.gen.cs +++ b/sources/OpenAL/OpenAL/al/ContextEventProcSOFTDelegate.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.OpenAL; [NativeName("ALCEVENTPROCTYPESOFT")] -public unsafe delegate void ContextEventProcDelegateSOFT( +public unsafe delegate void ContextEventProcSOFTDelegate( int arg0, int arg1, DeviceHandle arg2, diff --git a/sources/OpenAL/OpenAL/al/DebugProcEXT.gen.cs b/sources/OpenAL/OpenAL/al/DebugProcEXT.gen.cs index 1c7f5c2f40..2e70e56727 100644 --- a/sources/OpenAL/OpenAL/al/DebugProcEXT.gen.cs +++ b/sources/OpenAL/OpenAL/al/DebugProcEXT.gen.cs @@ -20,7 +20,7 @@ namespace Silk.NET.OpenAL; public DebugProcEXT(delegate* unmanaged ptr) => Pointer = ptr; - public DebugProcEXT(DebugProcDelegateEXT proc) => Pointer = SilkMarshal.DelegateToPtr(proc); + public DebugProcEXT(DebugProcEXTDelegate proc) => Pointer = SilkMarshal.DelegateToPtr(proc); public void Dispose() => SilkMarshal.Free(Pointer); diff --git a/sources/OpenAL/OpenAL/al/DebugProcDelegateEXT.gen.cs b/sources/OpenAL/OpenAL/al/DebugProcEXTDelegate.gen.cs similarity index 93% rename from sources/OpenAL/OpenAL/al/DebugProcDelegateEXT.gen.cs rename to sources/OpenAL/OpenAL/al/DebugProcEXTDelegate.gen.cs index 55d0dbf77f..2731ebb85e 100644 --- a/sources/OpenAL/OpenAL/al/DebugProcDelegateEXT.gen.cs +++ b/sources/OpenAL/OpenAL/al/DebugProcEXTDelegate.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.OpenAL; [NativeName("ALDEBUGPROCEXT")] -public unsafe delegate void DebugProcDelegateEXT( +public unsafe delegate void DebugProcEXTDelegate( int arg0, int arg1, uint arg2, diff --git a/sources/OpenAL/OpenAL/al/EventProcSOFT.gen.cs b/sources/OpenAL/OpenAL/al/EventProcSOFT.gen.cs index a9c1b55168..9bfa68cf4e 100644 --- a/sources/OpenAL/OpenAL/al/EventProcSOFT.gen.cs +++ b/sources/OpenAL/OpenAL/al/EventProcSOFT.gen.cs @@ -20,7 +20,7 @@ namespace Silk.NET.OpenAL; public EventProcSOFT(delegate* unmanaged ptr) => Pointer = ptr; - public EventProcSOFT(EventProcDelegateSOFT proc) => Pointer = SilkMarshal.DelegateToPtr(proc); + public EventProcSOFT(EventProcSOFTDelegate proc) => Pointer = SilkMarshal.DelegateToPtr(proc); public void Dispose() => SilkMarshal.Free(Pointer); diff --git a/sources/OpenAL/OpenAL/al/EventProcDelegateSOFT.gen.cs b/sources/OpenAL/OpenAL/al/EventProcSOFTDelegate.gen.cs similarity index 93% rename from sources/OpenAL/OpenAL/al/EventProcDelegateSOFT.gen.cs rename to sources/OpenAL/OpenAL/al/EventProcSOFTDelegate.gen.cs index 78284252ae..aeb235dd90 100644 --- a/sources/OpenAL/OpenAL/al/EventProcDelegateSOFT.gen.cs +++ b/sources/OpenAL/OpenAL/al/EventProcSOFTDelegate.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.OpenAL; [NativeName("ALEVENTPROCSOFT")] -public unsafe delegate void EventProcDelegateSOFT( +public unsafe delegate void EventProcSOFTDelegate( int arg0, uint arg1, uint arg2, diff --git a/sources/OpenAL/OpenAL/al/IAL.gen.cs b/sources/OpenAL/OpenAL/al/IAL.gen.cs index 669d756827..8d198744cf 100644 --- a/sources/OpenAL/OpenAL/al/IAL.gen.cs +++ b/sources/OpenAL/OpenAL/al/IAL.gen.cs @@ -6027,7 +6027,7 @@ Ref buffers SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXGetBufferModeDirect")] - static abstract int EAXGetBufferModeDirect( + static abstract int EaxGetBufferModeDirect( ContextHandle context, uint buffer, int* pReserved @@ -6039,7 +6039,7 @@ static abstract int EAXGetBufferModeDirect( SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXGetBufferModeDirect")] - static abstract int EAXGetBufferModeDirect( + static abstract int EaxGetBufferModeDirect( ContextHandle context, uint buffer, Ref pReserved @@ -6051,7 +6051,7 @@ Ref pReserved SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXGetDirect")] - static abstract int EAXGetDirect( + static abstract int EaxGetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -6066,7 +6066,7 @@ uint value_size SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXGetDirect")] - static abstract int EAXGetDirect( + static abstract int EaxGetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -6081,7 +6081,7 @@ uint value_size SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXSetBufferModeDirect")] - static abstract sbyte EAXSetBufferModeDirect( + static abstract sbyte EaxSetBufferModeDirect( ContextHandle context, int n, uint* buffers, @@ -6094,7 +6094,7 @@ int value SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXSetBufferModeDirect")] - static abstract MaybeBool EAXSetBufferModeDirect( + static abstract MaybeBool EaxSetBufferModeDirect( ContextHandle context, int n, Ref buffers, @@ -6107,7 +6107,7 @@ int value SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXSetDirect")] - static abstract int EAXSetDirect( + static abstract int EaxSetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -6122,7 +6122,7 @@ uint value_size SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXSetDirect")] - static abstract int EAXSetDirect( + static abstract int EaxSetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -11433,7 +11433,7 @@ long start_time SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXGetBufferModeDirect")] - int EAXGetBufferModeDirect(ContextHandle context, uint buffer, int* pReserved); + int EaxGetBufferModeDirect(ContextHandle context, uint buffer, int* pReserved); [NativeName("EAXGetBufferModeDirect")] [ @@ -11441,7 +11441,7 @@ long start_time SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXGetBufferModeDirect")] - int EAXGetBufferModeDirect(ContextHandle context, uint buffer, Ref pReserved); + int EaxGetBufferModeDirect(ContextHandle context, uint buffer, Ref pReserved); [NativeName("EAXGetDirect")] [ @@ -11449,7 +11449,7 @@ long start_time SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXGetDirect")] - int EAXGetDirect( + int EaxGetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -11464,7 +11464,7 @@ uint value_size SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXGetDirect")] - int EAXGetDirect( + int EaxGetDirect( ContextHandle context, Ref property_set_id, uint property_id, @@ -11479,7 +11479,7 @@ uint value_size SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXSetBufferModeDirect")] - sbyte EAXSetBufferModeDirect(ContextHandle context, int n, uint* buffers, int value); + sbyte EaxSetBufferModeDirect(ContextHandle context, int n, uint* buffers, int value); [NativeName("EAXSetBufferModeDirect")] [ @@ -11487,7 +11487,7 @@ uint value_size SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXSetBufferModeDirect")] - MaybeBool EAXSetBufferModeDirect( + MaybeBool EaxSetBufferModeDirect( ContextHandle context, int n, Ref buffers, @@ -11500,7 +11500,7 @@ int value SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXSetDirect")] - int EAXSetDirect( + int EaxSetDirect( ContextHandle context, System.Guid* property_set_id, uint property_id, @@ -11515,7 +11515,7 @@ uint value_size SupportedApiProfile("alc", ["AL_EXT_direct_context"]) ] [NativeFunction("openal", EntryPoint = "EAXSetDirect")] - int EAXSetDirect( + int EaxSetDirect( ContextHandle context, Ref property_set_id, uint property_id, diff --git a/sources/SilkTouch/SilkTouch/Mods/Common/ModLoader.cs b/sources/SilkTouch/SilkTouch/Mods/Common/ModLoader.cs index 8556bd7539..1f454cb49b 100644 --- a/sources/SilkTouch/SilkTouch/Mods/Common/ModLoader.cs +++ b/sources/SilkTouch/SilkTouch/Mods/Common/ModLoader.cs @@ -25,6 +25,7 @@ public class ModLoader nameof(BakeSourceSets) => typeof(BakeSourceSets), nameof(AddApiProfiles) => typeof(AddApiProfiles), nameof(MixKhronosData) => typeof(MixKhronosData), + nameof(ExtractHandles) => typeof(ExtractHandles), nameof(TransformHandles) => typeof(TransformHandles), nameof(TransformEnums) => typeof(TransformEnums), nameof(ExtractNestedTyping) => typeof(ExtractNestedTyping), diff --git a/sources/SilkTouch/SilkTouch/Mods/ExtractHandles.cs b/sources/SilkTouch/SilkTouch/Mods/ExtractHandles.cs new file mode 100644 index 0000000000..d1018b9caf --- /dev/null +++ b/sources/SilkTouch/SilkTouch/Mods/ExtractHandles.cs @@ -0,0 +1,324 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Extensions.Logging; +using Silk.NET.SilkTouch.Naming; +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; + +namespace Silk.NET.SilkTouch.Mods; + +/// +/// Adds empty handle structs by searching for missing types referenced through pointers. +/// If all references to the missing type are through a pointer, +/// that missing type is then added as an empty struct. +/// +/// See for applying further transformations. +/// +public class ExtractHandles(ILogger logger) : Mod +{ + /// + public override async Task ExecuteAsync(IModContext ctx, CancellationToken ct = default) + { + await base.ExecuteAsync(ctx, ct); + + var project = ctx.SourceProject; + if (project == null) + { + return; + } + + var compilation = await project.GetCompilationAsync(ct); + if (compilation == null) + { + throw new InvalidOperationException("Failed to get compilation"); + } + + // Find missing handle types + var handleDiscoverer = new MissingHandleTypeDiscoverer(logger, compilation, ct); + var missingHandleTypes = handleDiscoverer.GetMissingHandleTypes(); + + // Generate syntax nodes containing empty structs to represent the missing handle types + var structGenerator = new EmptyStructGenerator(); + var syntaxNodes = structGenerator.GenerateSyntaxNodes(missingHandleTypes); + + // Add syntax nodes to the project as new documents + foreach (var (fullyQualifiedName, node) in syntaxNodes) + { + var relativePath = $"Handles/{PathForFullyQualified(fullyQualifiedName)}"; + project = project + .AddDocument( + Path.GetFileName(relativePath), + node.NormalizeWhitespace(), + filePath: project.FullPath(relativePath) + ) + .Project; + } + + ctx.SourceProject = project; + } + + private class MissingHandleTypeDiscoverer( + ILogger logger, + Compilation compilation, + CancellationToken ct + ) : SymbolVisitor + { + private readonly HashSet _nonHandleTypes = + new(SymbolEqualityComparer.Default); + private readonly Dictionary _missingTypes = + new(SymbolEqualityComparer.Default); + + private string? _currentNamespace = null; + private int _pointerTypeDepth = 0; + + /// + /// Gets all missing handle types that are found and the namespace that they should be created in. + /// + public Dictionary GetMissingHandleTypes() + { + // We need to find and generate all missing handle types + // Handle types are types that are only referenced through a pointer + // We do this by parsing through the list of type errors + var typeErrors = compilation + .GetDiagnostics(ct) + .Where(d => d.Id == "CS0246") // Type errors + .ToList(); + + // Find symbols that contain ITypeErrorSymbols + // These symbols are not necessarily ITypeErrorSymbols + var symbolsFound = new HashSet(SymbolEqualityComparer.Default); + foreach (var typeError in typeErrors) + { + var syntaxTree = typeError.Location.SourceTree; + if (syntaxTree == null) + { + continue; + } + + var semanticModel = compilation.GetSemanticModel(syntaxTree); + + // Get the syntax node the type error corresponds to + var currentSyntax = syntaxTree.GetRoot().FindNode(typeError.Location.SourceSpan); + + // Search upwards to find a syntax node that we can call GetDeclaredSymbol on + // This is because calling GetDeclaredSymbol on the starting node will just return null + var isSuccess = false; + while (currentSyntax != null && currentSyntax is not TypeDeclarationSyntax) + { + switch (currentSyntax) + { + case VariableDeclarationSyntax variableDeclarationSyntax: + { + foreach (var declaratorSyntax in variableDeclarationSyntax.Variables) + { + var symbol = semanticModel.GetDeclaredSymbol(declaratorSyntax, ct); + if (symbol != null) + { + symbolsFound.Add(symbol); + isSuccess = true; + + // All of the declarators will have the same type, so getting the first symbol is enough + break; + } + } + + break; + } + case MemberDeclarationSyntax memberDeclarationSyntax: + { + var symbol = semanticModel.GetDeclaredSymbol( + memberDeclarationSyntax, + ct + ); + if (symbol != null) + { + symbolsFound.Add(symbol); + isSuccess = true; + } + + break; + } + // Skip syntaxes that will never contain handle types + case BaseTypeSyntax: + case AttributeSyntax: + { + isSuccess = true; + break; + } + } + + currentSyntax = currentSyntax.Parent; + } + + if (!isSuccess) + { + // This is to warn of unhandled cases + logger.LogWarning( + "Failed to find corresponding symbol for type error. There may be an unhandled case in the code" + ); + } + } + + // These symbols contain at least one IErrorTypeSymbol, we need to search downwards for them + foreach (var symbol in symbolsFound) + { + Visit(symbol); + } + + return new Dictionary( + _missingTypes.Where(kvp => !_nonHandleTypes.Contains(kvp.Key)), + SymbolEqualityComparer.Default + ); + } + + public override void VisitMethod(IMethodSymbol symbol) + { + base.VisitMethod(symbol); + + _currentNamespace = symbol.NamespaceFromSymbol(); + foreach (var parameterSymbol in symbol.Parameters) + { + Visit(parameterSymbol); + } + _currentNamespace = null; + } + + public override void VisitParameter(IParameterSymbol symbol) + { + base.VisitParameter(symbol); + + _currentNamespace = symbol.NamespaceFromSymbol(); + Visit(symbol.Type); + _currentNamespace = null; + } + + public override void VisitProperty(IPropertySymbol symbol) + { + base.VisitProperty(symbol); + + _currentNamespace = symbol.NamespaceFromSymbol(); + Visit(symbol.Type); + _currentNamespace = null; + } + + public override void VisitField(IFieldSymbol symbol) + { + base.VisitField(symbol); + + _currentNamespace = symbol.NamespaceFromSymbol(); + Visit(symbol.Type); + _currentNamespace = null; + } + + public override void VisitLocal(ILocalSymbol symbol) + { + base.VisitLocal(symbol); + + _currentNamespace = symbol.NamespaceFromSymbol(); + Visit(symbol.Type); + _currentNamespace = null; + } + + public override void VisitPointerType(IPointerTypeSymbol symbol) + { + base.VisitPointerType(symbol); + + _pointerTypeDepth++; + Visit(symbol.PointedAtType); + _pointerTypeDepth--; + } + + public override void VisitNamedType(INamedTypeSymbol symbol) + { + base.VisitNamedType(symbol); + + if (symbol is IErrorTypeSymbol errorTypeSymbol) + { + if (_currentNamespace == null) + { + throw new InvalidOperationException( + $"{nameof(_currentNamespace)} should not be null" + ); + } + + if (_pointerTypeDepth == 0) + { + _nonHandleTypes.Add(errorTypeSymbol); + } + + if (_missingTypes.TryGetValue(errorTypeSymbol, out var sharedNamespace)) + { + _missingTypes[errorTypeSymbol] = NameUtils + .FindCommonPrefix([sharedNamespace, _currentNamespace], true, false, true) + .Trim('.'); + } + else + { + _missingTypes[errorTypeSymbol] = _currentNamespace; + } + } + } + } + + private class EmptyStructGenerator + { + /// + /// Generates a syntax node for each specified type. + /// + /// Map from error type symbol to the namespace the type should be created in. + /// Map from the fully qualified name of the generated type to the syntax node containing code for that type. + public Dictionary GenerateSyntaxNodes( + Dictionary typesToGenerate + ) => + GenerateSyntaxNodes( + typesToGenerate + .Select(kvp => new KeyValuePair(kvp.Key.Name, kvp.Value)) + .ToDictionary() + ); + + /// + /// Generates a syntax node for each specified type. + /// + /// Map from type name to the namespace the type should be created in. + /// Map from the fully qualified name of the generated type to the syntax node containing code for that type. + public Dictionary GenerateSyntaxNodes( + Dictionary missingHandleTypes + ) + { + var results = new Dictionary(); + foreach (var (name, ns) in missingHandleTypes) + { + var fullyQualifiedName = string.IsNullOrWhiteSpace(ns) ? name : $"{ns}.{name}"; + var structDeclarationSyntax = StructDeclaration(name) + .WithModifiers( + TokenList( + Token(SyntaxKind.PublicKeyword), + Token(SyntaxKind.UnsafeKeyword), + Token(SyntaxKind.PartialKeyword) + ) + ); + + results[fullyQualifiedName] = CompilationUnit() + .WithMembers( + SingletonList( + string.IsNullOrWhiteSpace(ns) + ? structDeclarationSyntax + : FileScopedNamespaceDeclaration( + ModUtils.NamespaceIntoIdentifierName(ns) + ) + .WithMembers( + SingletonList( + structDeclarationSyntax + ) + ) + ) + ); + } + + return results; + } + } +} diff --git a/sources/SilkTouch/SilkTouch/Mods/ExtractNestedTyping.cs b/sources/SilkTouch/SilkTouch/Mods/ExtractNestedTyping.cs index fd53e3a615..0a028011ca 100644 --- a/sources/SilkTouch/SilkTouch/Mods/ExtractNestedTyping.cs +++ b/sources/SilkTouch/SilkTouch/Mods/ExtractNestedTyping.cs @@ -322,11 +322,20 @@ mem is not StructDeclarationSyntax struc continue; } - var iden = $"{node.Identifier}_{match.Groups[1].Value}"; + var iden = $"{node.Identifier}{match.Groups[1].Value}"; _typeRenames[struc.Identifier.ToString()] = iden; struc = - VisitStructDeclaration(struc.WithIdentifier(Identifier(iden))) - as StructDeclarationSyntax + VisitStructDeclaration( + struc + .WithIdentifier(Identifier(iden)) + .WithAttributeLists( + struc.AttributeLists.AddReferencedNameAffix( + NameAffixType.Prefix, + "NestedStructParent", + node.Identifier.ToString() + ) + ) + ) as StructDeclarationSyntax ?? struc; ExtractedNestedStructs.Add(struc); members = members.RemoveAt(i--); @@ -529,6 +538,11 @@ _fallbackFromOuterFunctionPointer is not null : default ) .WithNativeName(currentNativeTypeName) + .AddReferencedNameAffix( + NameAffixType.Prefix, + "FunctionPointerParent", + currentNativeTypeName + ) .AddNameAffix( NameAffixType.Suffix, "FunctionPointerDelegateType", diff --git a/sources/SilkTouch/SilkTouch/Mods/MixKhronosData.cs b/sources/SilkTouch/SilkTouch/Mods/MixKhronosData.cs index e7bb381c84..98395e7517 100644 --- a/sources/SilkTouch/SilkTouch/Mods/MixKhronosData.cs +++ b/sources/SilkTouch/SilkTouch/Mods/MixKhronosData.cs @@ -1915,9 +1915,8 @@ private SyntaxList ProcessAndGetNewAttributes( MethodDeclarationSyntax? methodDeclaration = null ) { - // Get the name of the identifier, preferring the native one if available // This name will be modified by the code below as different suffixes are identified - var trimmedName = attributeLists.GetNativeNameOrDefault(identifier); + var trimmedName = identifier.ToString(); if (trimHandleSuffix) { diff --git a/sources/SilkTouch/SilkTouch/Mods/PrettifyNames.cs b/sources/SilkTouch/SilkTouch/Mods/PrettifyNames.cs index a803b7ab6b..ce85dea49f 100644 --- a/sources/SilkTouch/SilkTouch/Mods/PrettifyNames.cs +++ b/sources/SilkTouch/SilkTouch/Mods/PrettifyNames.cs @@ -14,12 +14,10 @@ namespace Silk.NET.SilkTouch.Mods; /// /// The logger. /// Configuration snapshot. -/// Name trimmer providers. [ModConfiguration] public class PrettifyNames( ILogger logger, - IOptionsSnapshot config, - IEnumerable> trimmerProviders + IOptionsSnapshot config ) : IMod, IResponseFileMod { /// @@ -37,11 +35,6 @@ IEnumerable> trimmerProviders /// public Dictionary NameOverrides { get; init; } = []; - /// - /// The base trimmer version. If null, trimming is disabled. - /// - public Version? TrimmerBaseline { get; init; } = new(3, 0); - /// /// The maximum length of an all capitals string to be treated as a single acronym, rather than as an all /// capitals word. @@ -131,140 +124,95 @@ public async Task ExecuteAsync(IModContext ctx, CancellationToken ct = default) var nameAffixer = new PrettifyNamesAffixer(visitor.AffixTypes, cfg.Affixes); var namePrettifier = new NamePrettifier(cfg.LongAcronymThreshold); - // Trim the trimmable names if the trimmer baseline is set - // Otherwise, we just prettify the trimmable names - if (cfg.TrimmerBaseline is null) + // Trim and prettify the trimmable names + + // Define name processors + var nameProcessors = new INameProcessor[] { - // Only prettify the trimmable names - foreach (var (name, (nonFunctions, functions)) in visitor.TrimmableTypes) - { - newNames[name] = new RenamedType( - ApplyPrettifyOnlyPipeline( - null, - name, - cfg.NameOverrides, - nameAffixer, - namePrettifier - ), - nonFunctions.ToDictionary( - x => x, - x => - ApplyPrettifyOnlyPipeline( - name, - x, - cfg.NameOverrides, - nameAffixer, - namePrettifier - ) - ), - functions.ToDictionary( - x => x.Name, - x => - ApplyPrettifyOnlyPipeline( - name, - x.Name, - cfg.NameOverrides, - nameAffixer, - namePrettifier - ) - ) - ); - } - } - else + new StripAffixesProcessor(nameAffixer), + new NameTrimmer(), + new PrettifyProcessor(namePrettifier), + new ReapplyAffixesProcessor(nameAffixer), + new PrefixIfStartsWithNumberProcessor(), + }; + + // Create a type name dictionary to trim the type names. + var typeNames = visitor.TrimmableTypes.ToDictionary( + x => x.Key, + x => new CandidateNames(x.Key, []) + ); + + // If we don't have a prefix hint and don't have more than one type, we can't determine a prefix so don't + // trim. + if (typeNames.Count > 1 || cfg.GlobalPrefixHints is not null) { - // Trim and prettify the trimmable names - - // Get all the trimmers that are above this baseline. We also sort by the version. Why? Because someone - // couldn't be bothered to introduce a weight property. It is also unclear what effect this has on 2.17/2.18 - // but to be honest those trimmers aren't used and are only included for posterity and understanding of the - // old logic. - var trimmers = trimmerProviders - .SelectMany(x => x.Get(ctx.JobKey)) - .Append(new NameAffixerEarlyTrimmer(nameAffixer)) - .Append(new NameAffixerLateTrimmer(nameAffixer)) - .Append(new PrettifyNamesTrimmer(namePrettifier)) - .OrderBy(x => x.Order) - .ToArray(); - - // Create a type name dictionary to trim the type names. - var typeNames = visitor.TrimmableTypes.ToDictionary( - x => x.Key, - x => new CandidateNames(x.Key, []) + ProcessNames( + new NameProcessorContext + { + Container = null, + Names = typeNames, + Configuration = cfg, + JobKey = ctx.JobKey, + NonDeterminant = visitor.NonDeterminant, + }, + nameProcessors ); + } - // If we don't have a prefix hint and don't have more than one type, we can't determine a prefix so don't - // trim. - if (typeNames.Count > 1 || cfg.GlobalPrefixHints is not null) - { - Trim( - new NameTrimmerContext - { - Container = null, - Names = typeNames, - Configuration = cfg, - JobKey = ctx.JobKey, - NonDeterminant = visitor.NonDeterminant, - }, - trimmers - ); - } - - // Now rename everything within each type. - foreach (var (typeName, (newTypeName, _)) in typeNames) - { - var (_, (consts, functions)) = visitor.TrimmableTypes.First(x => x.Key == typeName); + // Now rename everything within each type. + foreach (var (typeName, (newTypeName, _)) in typeNames) + { + var (_, (consts, functions)) = visitor.TrimmableTypes.First(x => x.Key == typeName); - // Rename the "constants" i.e. all the consts/static readonlys in this type. These are treated - // individually because everything that isn't a constant or a function is only prettified instead of prettified & trimmed. - var constNames = consts.ToDictionary(x => x, x => new CandidateNames(x, [])); + // Rename the "constants" i.e. all the consts/static readonlys in this type. These are treated + // individually because everything that isn't a constant or a function is only prettified instead of prettified & trimmed. + var constNames = consts.ToDictionary(x => x, x => new CandidateNames(x, [])); - // Trim the constants. - Trim( - new NameTrimmerContext - { - Container = typeName, - Names = constNames, - Configuration = cfg, - JobKey = ctx.JobKey, - NonDeterminant = visitor.NonDeterminant, - }, - trimmers - ); + // Trim the constants. + ProcessNames( + new NameProcessorContext + { + Container = typeName, + Names = constNames, + Configuration = cfg, + JobKey = ctx.JobKey, + NonDeterminant = visitor.NonDeterminant, + }, + nameProcessors + ); - // Rename the functions. More often that not functions have different nomenclature to constants, so we - // treat them separately. - var functionNames = functions - .DistinctBy(x => x.Name) - .ToDictionary(x => x.Name, x => new CandidateNames(x.Name, [])); + // Rename the functions. More often that not functions have different nomenclature to constants, so we + // treat them separately. + var functionNames = functions + .DistinctBy(x => x.Name) + .ToDictionary(x => x.Name, x => new CandidateNames(x.Name, [])); - // Collect the syntax as this is used for conflict resolution in the Trim function. - var functionSyntax = functionNames.Keys.ToDictionary( - x => x, - x => functions.Where(y => y.Name == x).Select(y => y.Syntax) - ); + // Collect the syntax as this is used for conflict resolution in the Trim function. + var functionSyntax = functionNames.Keys.ToDictionary( + x => x, + x => functions.Where(y => y.Name == x).Select(y => y.Syntax) + ); - // Trim the functions. - Trim( - new NameTrimmerContext - { - Container = typeName, - Names = functionNames, - Configuration = cfg, - JobKey = ctx.JobKey, - NonDeterminant = visitor.NonDeterminant, - }, - trimmers, - functionSyntax - ); + // Trim the functions. + ProcessNames( + new NameProcessorContext + { + Container = typeName, + Names = functionNames, + Configuration = cfg, + JobKey = ctx.JobKey, + NonDeterminant = visitor.NonDeterminant, + }, + nameProcessors, + functionSyntax + ); - // Add it to the rewriter's list of names to... rewrite... - newNames[typeName] = new RenamedType( - newTypeName, - constNames.ToDictionary(x => x.Key, x => x.Value.Primary), - functionNames.ToDictionary(x => x.Key, x => x.Value.Primary) - ); - } + // Add it to the rewriter's list of names to... rewrite... + newNames[typeName] = new RenamedType( + newTypeName, + constNames.ToDictionary(x => x.Key, x => x.Value.Primary), + functionNames.ToDictionary(x => x.Key, x => x.Value.Primary) + ); } // Prettify the prettify only names @@ -453,6 +401,7 @@ z.MethodKind is MethodKind.Constructor or MethodKind.Destructor ctx.SourceProject = proj; } + // TODO: Remove this method and unify the name processing code. /// /// Applies the prettify only pipeline. /// This currently consists of checking for name overrides first. @@ -507,20 +456,21 @@ NamePrettifier namePrettifier var result = name; result = nameAffixer.RemoveAffixes(result, container, name, null); result = namePrettifier.Prettify(result, allowAllCaps); - result = nameAffixer.ApplyAffixes(result, container, name, null); + result = nameAffixer.ApplyAffixes(result, container, name, null, null); + result = NameUtils.PrefixIfStartsWithNumber(result); return result; } - private void Trim( - NameTrimmerContext context, - IEnumerable trimmers, + private void ProcessNames( + NameProcessorContext context, + IEnumerable nameProcessors, Dictionary>? functionSyntax = null ) { // Ensure the trimmers don't see names that have been manually overridden, as we don't want them to influence // automatic prefix determination for example - var namesToTrim = context.Names; + var namesToProcess = context.Names; foreach (var (nativeName, overriddenName) in context.Configuration.NameOverrides) { var nameToAdd = nativeName; @@ -548,21 +498,21 @@ private void Trim( } } - if (!namesToTrim.TryGetValue(nameToAdd, out var v)) + if (!namesToProcess.TryGetValue(nameToAdd, out var v)) { continue; } // If we haven't created the differentiated dictionary yet, then do so now. We do want to keep the original // dictionary so we can actually apply the renames; if we have created two different branching dictionaries - // they are recombined following trimming. - if (namesToTrim == context.Names) + // they are recombined following name processing. + if (namesToProcess == context.Names) { - namesToTrim = namesToTrim.ToDictionary(); + namesToProcess = namesToProcess.ToDictionary(); } - // Don't let the trimmers see the overridden native name. - namesToTrim.Remove(nameToAdd); + // Don't let the name processors see the overridden native name. + namesToProcess.Remove(nameToAdd); // Apply the name override to the dictionary we actually use. context.Names[nameToAdd] = new CandidateNames( @@ -571,16 +521,16 @@ private void Trim( ); } - // Run each trimmer - foreach (var trimmer in trimmers) + // Run each name processor + foreach (var nameProcessor in nameProcessors) { - trimmer.Trim(context with { Names = namesToTrim }); + nameProcessor.ProcessNames(context with { Names = namesToProcess }); } // Apply changes - if (namesToTrim != context.Names) + if (namesToProcess != context.Names) { - foreach (var (evalName, result) in namesToTrim) + foreach (var (evalName, result) in namesToProcess) { context.Names[evalName] = result; } @@ -1252,7 +1202,7 @@ Dictionary config /// Removes affixes from the specified primary name and adds the original specified primary to the secondary list if provided. /// /// - /// Designed to be used by either or . + /// Designed to be used by either or . /// /// The current primary name. /// The container name. Either null or the containing type. @@ -1285,18 +1235,20 @@ public string RemoveAffixes( /// Applies affixes to the specified primary name and adds fallbacks to the secondary list if provided. /// /// - /// Designed to be used by either or . + /// Designed to be used by either or . /// /// The current primary name. /// The container name. Either null or the containing type. /// The original name of the identifier. Either the type name or the member name. /// The list of secondary names. This should be null if used by . + /// The context containing the current names for the current container. /// The new primary name. public string ApplyAffixes( string primary, string? container, string originalName, - List? secondary + List? secondary, + NameProcessorContext? context // TODO: Handle this better. Exposing the entire context is excessive. ) { var affixes = GetAffixes(container, originalName); @@ -1384,15 +1336,28 @@ void CreateName(string name, Span currentAffixes) foreach (var affix in currentAffixes) { + var affixValue = affix.Affix; + if ( + affix.IsReference + && context.HasValue + && context.Value.Names.TryGetValue( + affixValue, + out var referencedCandidateNames + ) + ) + { + affixValue = referencedCandidateNames.Primary; + } + if (!GetConfiguration(affix).Remove) { if (affix.Type == NameAffixType.Prefix) { - name = affix.Affix + name; + name = affixValue + name; } else { - name += affix.Affix; + name += affixValue; } } } @@ -1414,7 +1379,7 @@ void CreateName(string name, Span currentAffixes) /// The container name. Either null or the containing type. /// The original name of the identifier. Either the type name or the member name. /// The name affixes for the specified identifier. - private NameAffix[] GetAffixes(string? container, string originalName) + public NameAffix[] GetAffixes(string? container, string originalName) { TypeAffixData typeAffixData; if (container == null) @@ -1448,31 +1413,13 @@ private NameAffixConfiguration GetConfiguration(string category) => } /// - /// Removes identified affixes so that other trimmers can process the base name separately. - /// These affixes should be reapplied by . + /// Removes identified affixes so that other name processors can process the base name separately. + /// These affixes should be reapplied by . /// - private class NameAffixerEarlyTrimmer(PrettifyNamesAffixer affixer) : INameTrimmer + private class StripAffixesProcessor(PrettifyNamesAffixer affixer) : INameProcessor { - /// - public Version Version => new(0, 0, 0); - - /// - public int Order => (int)TrimmerOrder.NameAffixerEarlyTrimmer; - - public void Trim(NameTrimmerContext context) + public void ProcessNames(NameProcessorContext context) { - if (context.Container == null) - { - foreach (var (original, (primary, secondary)) in context.Names) - { - var secondaries = secondary; - var newPrimary = affixer.RemoveAffixes(primary, null, original, secondaries); - context.Names[original] = new CandidateNames(newPrimary, secondaries); - } - - return; - } - foreach (var (original, (primary, secondary)) in context.Names) { var secondaries = secondary; @@ -1482,72 +1429,163 @@ public void Trim(NameTrimmerContext context) original, secondaries ); + context.Names[original] = new CandidateNames(newPrimary, secondaries); } } } + private class PrettifyProcessor(NamePrettifier namePrettifier) : INameProcessor + { + public void ProcessNames(NameProcessorContext context) + { + // Be lenient about caps for type names (e.g. GL) + var allowAllCaps = context.Container == null; + + foreach (var (original, (primary, secondary)) in context.Names) + { + for (var i = 0; i < secondary.Count; i++) + { + secondary[i] = namePrettifier.Prettify(secondary[i], allowAllCaps); + } + + context.Names[original] = new CandidateNames( + namePrettifier.Prettify(primary, allowAllCaps), + secondary + ); + } + } + } + /// /// Reapplies and transforms identified affixes based on . /// - private class NameAffixerLateTrimmer(PrettifyNamesAffixer affixer) : INameTrimmer + private class ReapplyAffixesProcessor(PrettifyNamesAffixer affixer) : INameProcessor { - /// - public Version Version => new(0, 0, 0); - - /// - public int Order => (int)TrimmerOrder.NameAffixerLateTrimmer; - - public void Trim(NameTrimmerContext context) + public void ProcessNames(NameProcessorContext context) { - if (context.Container == null) + // Calculate processing order using topological sort + var processingOrderByKey = new List(); { - foreach (var (original, (primary, secondary)) in context.Names) + var ready = new Queue(); + var dependencyCountByKey = new Dictionary(); + var notifyDependantByKey = new Dictionary>(); + + // Build dependency graph + foreach (var key in context.Names.Keys) { - var secondaries = secondary; - var newPrimary = affixer.ApplyAffixes(primary, null, original, secondaries); - context.Names[original] = new CandidateNames(newPrimary, secondaries); + var dependencyCount = 0; + + var affixes = affixer.GetAffixes(context.Container, key); + foreach (var affix in affixes) + { + if (!affix.IsReference) + { + continue; + } + + // Add as dependency + if (!notifyDependantByKey.TryGetValue(affix.Affix, out var dependants)) + { + notifyDependantByKey[affix.Affix] = dependants = []; + } + + dependants.Add(key); + dependencyCount++; + } + + if (dependencyCount == 0) + { + // No dependencies + ready.Enqueue(key); + continue; + } + + // Store dependency count + dependencyCountByKey.Add(key, dependencyCount); } - return; + // Output final order + while (ready.TryDequeue(out var key)) + { + processingOrderByKey.Add(key); + if (notifyDependantByKey.TryGetValue(key, out var dependants)) + { + foreach (var dependant in dependants) + { + if ( + dependencyCountByKey.TryGetValue(dependant, out var dependencyCount) + ) + { + dependencyCount--; + if (dependencyCount == 0) + { + ready.Enqueue(dependant); + dependencyCountByKey.Remove(dependant); + continue; + } + + dependencyCountByKey[dependant] = dependencyCount; + } + } + } + } + + // Check for unfulfilled dependencies + if (dependencyCountByKey.Count != 0) + { + // Check for missing dependencies + foreach (var key in dependencyCountByKey.Keys) + { + if (!context.Names.ContainsKey(key)) + { + // This is because we currently can only resolve names that are given by the NameProcessorContext + // Please update this message if this limitation changes + throw new InvalidOperationException( + $"A name affix for '{key}' references a name that does not exist or is part of a different name container. " + + $"Referencing names from other containers is currently not supported" + ); + } + } + + // Remaining must be a cycle + throw new InvalidOperationException( + $"Detected cycle in referenced affixes. Names that are part of the cycle: {string.Join(", ", dependencyCountByKey)}" + ); + } } - foreach (var (original, (primary, secondary)) in context.Names) + foreach (var original in processingOrderByKey) { + var (primary, secondary) = context.Names[original]; + var secondaries = secondary; var newPrimary = affixer.ApplyAffixes( primary, context.Container, original, - secondaries + secondaries, + context ); + context.Names[original] = new CandidateNames(newPrimary, secondaries); } } } - private class PrettifyNamesTrimmer(NamePrettifier namePrettifier) : INameTrimmer + private class PrefixIfStartsWithNumberProcessor : INameProcessor { - /// - public Version Version => new(0, 0, 0); - - /// - public int Order => (int)TrimmerOrder.PrettifyNamesTrimmer; - - public void Trim(NameTrimmerContext context) + public void ProcessNames(NameProcessorContext context) { foreach (var (original, (primary, secondary)) in context.Names) { - // Be lenient about caps for type names (e.g. GL) - var allowAllCaps = context.Container == null; - for (var i = 0; i < secondary.Count; i++) { - secondary[i] = namePrettifier.Prettify(secondary[i], allowAllCaps); + secondary[i] = NameUtils.PrefixIfStartsWithNumber(secondary[i]); } context.Names[original] = new CandidateNames( - namePrettifier.Prettify(primary, allowAllCaps), + NameUtils.PrefixIfStartsWithNumber(primary), secondary ); } diff --git a/sources/SilkTouch/SilkTouch/Mods/TransformHandles.cs b/sources/SilkTouch/SilkTouch/Mods/TransformHandles.cs index 5e958705c6..04feaa8cd0 100644 --- a/sources/SilkTouch/SilkTouch/Mods/TransformHandles.cs +++ b/sources/SilkTouch/SilkTouch/Mods/TransformHandles.cs @@ -25,11 +25,6 @@ namespace Silk.NET.SilkTouch.Mods; /// VkBuffer*, usages of that pointer will be replaced by VkBufferHandle. For a 2-dimensional pointer, /// VkBuffer**, the resulting replacement is VkBufferHandle*. /// -/// -/// It is assumed that all handle types in the generated syntax do not require a using directive in order to be -/// in scope. That is, if a file with the namespace Silk.NET.OpenGL is encountered and it is referencing -/// Program, Program must be declared in Silk.NET.OpenGL, Silk.NET, or Silk. -/// [ModConfiguration] public class TransformHandles( IOptionsSnapshot config, @@ -41,16 +36,10 @@ ILogger logger /// public class Config { - /// - /// Whether it should be assumed that missing types are likely opaque if they are only used as a pointer type - /// and therefore should be subjected to handle transformations. - /// - public bool AssumeMissingTypesOpaque { get; init; } - /// /// Whether the DSL (i.e. nullptr) should be usable with handle types. /// - public bool UseDSL { get; init; } + public bool UseDsl { get; init; } } /// @@ -58,6 +47,7 @@ public override async Task ExecuteAsync(IModContext ctx, CancellationToken ct = { await base.ExecuteAsync(ctx, ct); + var cfg = config.Get(ctx.JobKey); var project = ctx.SourceProject; if (project == null) { @@ -70,45 +60,13 @@ public override async Task ExecuteAsync(IModContext ctx, CancellationToken ct = throw new InvalidOperationException("Failed to get compilation"); } - var cfg = config.Get(ctx.JobKey); - if (cfg.AssumeMissingTypesOpaque) - { - // Find missing handle types - var handleDiscoverer = new MissingHandleTypeDiscoverer(logger, compilation, ct); - var missingHandleTypes = handleDiscoverer.GetMissingHandleTypes(); - - // Generate syntax nodes containing empty structs to represent the missing handle types - var structGenerator = new EmptyStructGenerator(); - var syntaxNodes = structGenerator.GenerateSyntaxNodes(missingHandleTypes); - - // Add syntax nodes to the project as new documents - foreach (var (fullyQualifiedName, node) in syntaxNodes) - { - var relativePath = $"Handles/{PathForFullyQualified(fullyQualifiedName)}"; - project = project - .AddDocument( - Path.GetFileName(relativePath), - node.NormalizeWhitespace(), - filePath: project.FullPath(relativePath) - ) - .Project; - } - - // Update compilation - compilation = await project.GetCompilationAsync(ct); - if (compilation == null) - { - throw new InvalidOperationException("Failed to get compilation"); - } - } - // Find handle documents var handleTypeDiscoverer = new HandleTypeDiscoverer(project, compilation, ct); var handleTypes = await handleTypeDiscoverer.GetHandleTypesAsync(); // Store handle document IDs for later // We will use these IDs to know which documents to rewrite and rename - var handleTypeDocumentIds = new List<(string OriginalName, DocumentId DocumentId)>(); + var handleTypeDocumentIds = new List(); foreach (var handleTypeSymbol in handleTypes) { if (handleTypeSymbol.DeclaringSyntaxReferences.Length > 1) @@ -124,7 +82,7 @@ public override async Task ExecuteAsync(IModContext ctx, CancellationToken ct = var documentId = project.GetDocumentId(declaringSyntaxReference.SyntaxTree); if (documentId != null) { - handleTypeDocumentIds.Add((handleTypeSymbol.Name, documentId)); + handleTypeDocumentIds.Add(documentId); } } @@ -141,8 +99,8 @@ [new PointerDimensionReductionTransformer()], project = ctx.SourceProject; // Use document IDs from earlier - var handleTypeRewriter = new HandleTypeRewriter(cfg.UseDSL); - foreach (var (originalName, documentId) in handleTypeDocumentIds) + var handleTypeRewriter = new HandleTypeRewriter(cfg.UseDsl); + foreach (var documentId in handleTypeDocumentIds) { var document = project.GetDocument(documentId) @@ -165,270 +123,6 @@ [new PointerDimensionReductionTransformer()], } ctx.SourceProject = project; - - return; - } - - private class MissingHandleTypeDiscoverer( - ILogger logger, - Compilation compilation, - CancellationToken ct - ) : SymbolVisitor - { - private readonly HashSet _nonHandleTypes = - new(SymbolEqualityComparer.Default); - private readonly Dictionary _missingTypes = - new(SymbolEqualityComparer.Default); - - private string? _currentNamespace = null; - private int _pointerTypeDepth = 0; - - /// - /// Gets all missing handle types that are found and the namespace that they should be created in. - /// - public Dictionary GetMissingHandleTypes() - { - // We need to find and generate all missing handle types - // Handle types are types that are only referenced through a pointer - // We do this by parsing through the list of type errors - var typeErrors = compilation - .GetDiagnostics(ct) - .Where(d => d.Id == "CS0246") // Type errors - .ToList(); - - // Find symbols that contain ITypeErrorSymbols - // These symbols are not necessarily ITypeErrorSymbols - var symbolsFound = new HashSet(SymbolEqualityComparer.Default); - foreach (var typeError in typeErrors) - { - var syntaxTree = typeError.Location.SourceTree; - if (syntaxTree == null) - { - continue; - } - - var semanticModel = compilation.GetSemanticModel(syntaxTree); - - // Get the syntax node the type error corresponds to - var currentSyntax = syntaxTree.GetRoot().FindNode(typeError.Location.SourceSpan); - - // Search upwards to find a syntax node that we can call GetDeclaredSymbol on - // This is because calling GetDeclaredSymbol on the starting node will just return null - var isSuccess = false; - while (currentSyntax != null && currentSyntax is not TypeDeclarationSyntax) - { - switch (currentSyntax) - { - case VariableDeclarationSyntax variableDeclarationSyntax: - { - foreach (var declaratorSyntax in variableDeclarationSyntax.Variables) - { - var symbol = semanticModel.GetDeclaredSymbol(declaratorSyntax, ct); - if (symbol != null) - { - symbolsFound.Add(symbol); - isSuccess = true; - - // All of the declarators will have the same type, so getting the first symbol is enough - break; - } - } - - break; - } - case MemberDeclarationSyntax memberDeclarationSyntax: - { - var symbol = semanticModel.GetDeclaredSymbol( - memberDeclarationSyntax, - ct - ); - if (symbol != null) - { - symbolsFound.Add(symbol); - isSuccess = true; - } - - break; - } - // Skip syntaxes that will never contain handle types - case BaseTypeSyntax: - case AttributeSyntax: - { - isSuccess = true; - break; - } - } - - currentSyntax = currentSyntax.Parent; - } - - if (!isSuccess) - { - // This is to warn of unhandled cases - logger.LogWarning( - "Failed to find corresponding symbol for type error. There may be an unhandled case in the code" - ); - } - } - - // These symbols contain at least one IErrorTypeSymbol, we need to search downwards for them - foreach (var symbol in symbolsFound) - { - Visit(symbol); - } - - return new Dictionary( - _missingTypes.Where(kvp => !_nonHandleTypes.Contains(kvp.Key)), - SymbolEqualityComparer.Default - ); - } - - public override void VisitMethod(IMethodSymbol symbol) - { - base.VisitMethod(symbol); - - _currentNamespace = symbol.NamespaceFromSymbol(); - foreach (var parameterSymbol in symbol.Parameters) - { - Visit(parameterSymbol); - } - _currentNamespace = null; - } - - public override void VisitParameter(IParameterSymbol symbol) - { - base.VisitParameter(symbol); - - _currentNamespace = symbol.NamespaceFromSymbol(); - Visit(symbol.Type); - _currentNamespace = null; - } - - public override void VisitProperty(IPropertySymbol symbol) - { - base.VisitProperty(symbol); - - _currentNamespace = symbol.NamespaceFromSymbol(); - Visit(symbol.Type); - _currentNamespace = null; - } - - public override void VisitField(IFieldSymbol symbol) - { - base.VisitField(symbol); - - _currentNamespace = symbol.NamespaceFromSymbol(); - Visit(symbol.Type); - _currentNamespace = null; - } - - public override void VisitLocal(ILocalSymbol symbol) - { - base.VisitLocal(symbol); - - _currentNamespace = symbol.NamespaceFromSymbol(); - Visit(symbol.Type); - _currentNamespace = null; - } - - public override void VisitPointerType(IPointerTypeSymbol symbol) - { - base.VisitPointerType(symbol); - - _pointerTypeDepth++; - Visit(symbol.PointedAtType); - _pointerTypeDepth--; - } - - public override void VisitNamedType(INamedTypeSymbol symbol) - { - base.VisitNamedType(symbol); - - if (symbol is IErrorTypeSymbol errorTypeSymbol) - { - if (_currentNamespace == null) - { - throw new InvalidOperationException( - $"{nameof(_currentNamespace)} should not be null" - ); - } - - if (_pointerTypeDepth == 0) - { - _nonHandleTypes.Add(errorTypeSymbol); - } - - if (_missingTypes.TryGetValue(errorTypeSymbol, out var sharedNamespace)) - { - _missingTypes[errorTypeSymbol] = NameUtils - .FindCommonPrefix([sharedNamespace, _currentNamespace], true, false, true) - .Trim('.'); - } - else - { - _missingTypes[errorTypeSymbol] = _currentNamespace; - } - } - } - } - - private class EmptyStructGenerator - { - /// - /// Generates a syntax node for each specified type. - /// - /// Map from error type symbol to the namespace the type should be created in. - /// Map from the fully qualified name of the generated type to the syntax node containing code for that type. - public Dictionary GenerateSyntaxNodes( - Dictionary typesToGenerate - ) => - GenerateSyntaxNodes( - typesToGenerate - .Select(kvp => new KeyValuePair(kvp.Key.Name, kvp.Value)) - .ToDictionary() - ); - - /// - /// Generates a syntax node for each specified type. - /// - /// Map from type name to the namespace the type should be created in. - /// Map from the fully qualified name of the generated type to the syntax node containing code for that type. - public Dictionary GenerateSyntaxNodes( - Dictionary missingHandleTypes - ) - { - var results = new Dictionary(); - foreach (var (name, ns) in missingHandleTypes) - { - var fullyQualifiedName = string.IsNullOrWhiteSpace(ns) ? name : $"{ns}.{name}"; - var structDeclarationSyntax = StructDeclaration(name) - .WithModifiers( - TokenList( - Token(SyntaxKind.PublicKeyword), - Token(SyntaxKind.UnsafeKeyword), - Token(SyntaxKind.PartialKeyword) - ) - ); - - results[fullyQualifiedName] = CompilationUnit() - .WithMembers( - SingletonList( - string.IsNullOrWhiteSpace(ns) - ? structDeclarationSyntax - : FileScopedNamespaceDeclaration( - ModUtils.NamespaceIntoIdentifierName(ns) - ) - .WithMembers( - SingletonList( - structDeclarationSyntax - ) - ) - ) - ); - } - - return results; - } } private class HandleTypeDiscoverer( @@ -533,7 +227,7 @@ public override void VisitNamedType(INamedTypeSymbol symbol) } } - private class HandleTypeRewriter(bool useDSL) : CSharpSyntaxRewriter + private class HandleTypeRewriter(bool useDsl) : CSharpSyntaxRewriter { public override SyntaxNode VisitStructDeclaration(StructDeclarationSyntax node) { @@ -547,7 +241,7 @@ public override SyntaxNode VisitStructDeclaration(StructDeclarationSyntax node) .WithMembers( List( GetDefaultHandleMembers(structName) - .Concat(useDSL ? GetDSLHandleMembers(structName) : []) + .Concat(useDsl ? GetDslHandleMembers(structName) : []) ) ) .WithModifiers( @@ -629,7 +323,7 @@ string structName Identifier("Equals") ) .WithModifiers( - TokenList([Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.OverrideKeyword)]) + TokenList(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.OverrideKeyword)) ) .WithParameterList( ParameterList( @@ -668,7 +362,7 @@ string structName Identifier("GetHashCode") ) .WithModifiers( - TokenList([Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.OverrideKeyword)]) + TokenList(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.OverrideKeyword)) ) .WithExpressionBody( ArrowExpressionClause( @@ -700,7 +394,7 @@ string structName Token(SyntaxKind.EqualsEqualsToken) ) .WithModifiers( - TokenList([Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)]) + TokenList(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)) ) .WithParameterList( ParameterList( @@ -737,7 +431,7 @@ string structName Token(SyntaxKind.ExclamationEqualsToken) ) .WithModifiers( - TokenList([Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)]) + TokenList(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)) ) .WithParameterList( ParameterList( @@ -771,7 +465,7 @@ string structName .WithSemicolonToken(Token(SyntaxKind.SemicolonToken)); } - private static IEnumerable GetDSLHandleMembers(string structName) + private static IEnumerable GetDslHandleMembers(string structName) { yield return MethodDeclaration( PredefinedType(Token(SyntaxKind.BoolKeyword)), @@ -800,7 +494,7 @@ private static IEnumerable GetDSLHandleMembers(string s Token(SyntaxKind.EqualsEqualsToken) ) .WithModifiers( - TokenList([Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)]) + TokenList(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)) ) .WithParameterList( ParameterList( @@ -837,7 +531,7 @@ private static IEnumerable GetDSLHandleMembers(string s Token(SyntaxKind.ExclamationEqualsToken) ) .WithModifiers( - TokenList([Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)]) + TokenList(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)) ) .WithParameterList( ParameterList( @@ -875,7 +569,7 @@ private static IEnumerable GetDSLHandleMembers(string s IdentifierName(structName) ) .WithModifiers( - TokenList([Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)]) + TokenList(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)) ) .WithParameterList( ParameterList( diff --git a/sources/SilkTouch/SilkTouch/Naming/INameProcessor.cs b/sources/SilkTouch/SilkTouch/Naming/INameProcessor.cs new file mode 100644 index 0000000000..6adb7e687e --- /dev/null +++ b/sources/SilkTouch/SilkTouch/Naming/INameProcessor.cs @@ -0,0 +1,12 @@ +namespace Silk.NET.SilkTouch.Naming; + +/// +/// Represents a name processor. +/// +public interface INameProcessor +{ + /// + /// Process and transform the names within the given container. + /// + public void ProcessNames(NameProcessorContext context); +} diff --git a/sources/SilkTouch/SilkTouch/Naming/INameTrimmer.cs b/sources/SilkTouch/SilkTouch/Naming/INameTrimmer.cs deleted file mode 100644 index ec77fef58e..0000000000 --- a/sources/SilkTouch/SilkTouch/Naming/INameTrimmer.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Silk.NET.SilkTouch.Naming; - -/// -/// Represents a name trimmer. -/// -public interface INameTrimmer -{ - /// - /// Gets the name trimmer version i.e. the Silk.NET version that introduced this name trimming method. This is so - /// new bindings released with or after this version don't have to have older trimming methods executed (the name - /// version can be specified in the mod configuration) - /// - Version Version { get; } - - /// - /// Used to define the order that the trimmers will run in. - /// Higher values indicate that the trimmer should run later. - /// - int Order { get; } - - /// - /// Trims prefixes from the given constituent names within the given container. - /// - /// The arguments. - void Trim(NameTrimmerContext context); -} diff --git a/sources/SilkTouch/SilkTouch/Naming/NameAffix.cs b/sources/SilkTouch/SilkTouch/Naming/NameAffix.cs index c5c132a9fc..90be238ffa 100644 --- a/sources/SilkTouch/SilkTouch/Naming/NameAffix.cs +++ b/sources/SilkTouch/SilkTouch/Naming/NameAffix.cs @@ -13,9 +13,14 @@ namespace Silk.NET.SilkTouch.Naming; /// The order that the attribute was declared in. /// 0 is the first and indicates that the affix is on the inside of the name. /// +/// +/// Whether the affix uses the name of a referenced symbol. +/// See . +/// public record struct NameAffix( NameAffixType Type, string Category, string Affix, - int DeclarationOrder + int DeclarationOrder, + bool IsReference = false ); diff --git a/sources/SilkTouch/SilkTouch/Naming/NameAffixer.cs b/sources/SilkTouch/SilkTouch/Naming/NameAffixer.cs index a778a7d2dc..22fcfdd1f7 100644 --- a/sources/SilkTouch/SilkTouch/Naming/NameAffixer.cs +++ b/sources/SilkTouch/SilkTouch/Naming/NameAffixer.cs @@ -32,13 +32,21 @@ public static NameAffix[] GetNameAffixes(this SyntaxList at var argumentList = attribute.ArgumentList; if ( - argumentList != null - && argumentList.Arguments[0].Expression - is LiteralExpressionSyntax { Token.Value: string type } - && argumentList.Arguments[1].Expression - is LiteralExpressionSyntax { Token.Value: string category } - && argumentList.Arguments[2].Expression - is LiteralExpressionSyntax { Token.Value: string affix } + argumentList == null + || argumentList.Arguments[0].Expression + is not LiteralExpressionSyntax { Token.Value: string type } + || argumentList.Arguments[1].Expression + is not LiteralExpressionSyntax { Token.Value: string category } + ) + { + continue; + } + + if ( + argumentList.Arguments[2].Expression is LiteralExpressionSyntax + { + Token.Value: string affix + } ) { affixes = @@ -51,6 +59,36 @@ public static NameAffix[] GetNameAffixes(this SyntaxList at declarationOrder ), ]; + + declarationOrder++; + } + else if ( + argumentList.Arguments[2].Expression is InvocationExpressionSyntax + { + Expression: IdentifierNameSyntax { Identifier.ValueText: "nameof" }, + ArgumentList.Arguments: [ + { + Expression: IdentifierNameSyntax + { + Identifier.ValueText: var referencedAffix, + }, + }, + ], + } + ) + { + affixes = + [ + .. affixes, + new NameAffix( + type == "Prefix" ? NameAffixType.Prefix : NameAffixType.Suffix, + category, + referencedAffix, + declarationOrder, + true + ), + ]; + declarationOrder++; } } @@ -92,17 +130,92 @@ public static SyntaxList AddNameAffix( Literal($"\"{affixType}\"", affixType) ) ); + var categoryArgument = AttributeArgument( LiteralExpression( SyntaxKind.StringLiteralExpression, Literal($"\"{category}\"", category) ) ); + var affixArgument = AttributeArgument( LiteralExpression(SyntaxKind.StringLiteralExpression, Literal($"\"{affix}\"", affix)) ); + var argumentList = AttributeArgumentList([typeArgument, categoryArgument, affixArgument]); + var attribute = AttributeList([Attribute(IdentifierName("NameAffix"), argumentList)]); + + return addToInner ? [attribute, .. attributeLists] : [.. attributeLists, attribute]; + } + + /// + /// This is similar to + /// but allows the name of another symbol to be referenced. + /// + /// This ensures transformations applied to the referenced symbol's name + /// are also applied to this affix. + /// + /// + /// This allows compound names to be handled more cleanly. + /// + /// For simplicity, only names within the same name container are currently supported. + /// This lets us skip sorting across different containers. + /// This should cover most real world use cases since if something is nested and + /// has the parent name as a prefix, then the prefix is likely unnecessary. + /// + /// + /// For example, PerformanceCounterDescriptionARM can be used as a referenced prefix for PerformanceCounterDescriptionARMName. + /// If PerformanceCounterDescriptionARM becomes ARMPerformanceCounterDescription, + /// then PerformanceCounterDescriptionARMName will also be output as ARMPerformanceCounterDescriptionName. + /// + public static SyntaxList AddReferencedNameAffix( + this IEnumerable attributeLists, + NameAffixType type, + string category, + string referencedAffix, + bool addToInner = false + ) + { + var affixType = type switch + { + NameAffixType.Prefix => "Prefix", + NameAffixType.Suffix => "Suffix", + _ => throw new ArgumentOutOfRangeException(nameof(type)), + }; + + var typeArgument = AttributeArgument( + LiteralExpression( + SyntaxKind.StringLiteralExpression, + Literal($"\"{affixType}\"", affixType) + ) + ); + var categoryArgument = AttributeArgument( + LiteralExpression( + SyntaxKind.StringLiteralExpression, + Literal($"\"{category}\"", category) + ) + ); + + // nameof(referencedAffix) + var affixArgument = AttributeArgument( + InvocationExpression( + IdentifierName( + Identifier( + TriviaList(), + SyntaxKind.NameOfKeyword, + "nameof", + "nameof", + TriviaList() + ) + ) + ) + .WithArgumentList( + ArgumentList(SingletonSeparatedList(Argument(IdentifierName(referencedAffix)))) + ) + ); + + var argumentList = AttributeArgumentList([typeArgument, categoryArgument, affixArgument]); var attribute = AttributeList([Attribute(IdentifierName("NameAffix"), argumentList)]); return addToInner ? [attribute, .. attributeLists] : [.. attributeLists, attribute]; diff --git a/sources/SilkTouch/SilkTouch/Naming/NamePrettifier.cs b/sources/SilkTouch/SilkTouch/Naming/NamePrettifier.cs index 1e9f5387ea..71e91d7375 100644 --- a/sources/SilkTouch/SilkTouch/Naming/NamePrettifier.cs +++ b/sources/SilkTouch/SilkTouch/Naming/NamePrettifier.cs @@ -31,11 +31,6 @@ public class NamePrettifier(int longAcronymThreshold) /// Thrown when the input or output is an empty identifier. public string Prettify(string identifier, bool allowAllCaps = false) { - if (identifier.Length == 0) - { - throw new InvalidOperationException("Cannot prettify an empty identifier"); - } - var words = NameSplitter.BreakIntoWords(identifier); // Add "X" to separate out numbers @@ -50,15 +45,6 @@ public string Prettify(string identifier, bool allowAllCaps = false) } } - // Add "X" if first word is a number - if (words.Count > 0) - { - if (NameUtils.GetCharType(words[0][0]) is CharType.Number) - { - words.Insert(0, "X"); - } - } - // Pretend there is an underscore between each word // This is used as a heuristic for determining whether we can treat short, all uppercase words as acronyms // @@ -179,17 +165,11 @@ public string Prettify(string identifier, bool allowAllCaps = false) } } - var result = string.Join("", words); - if (result.Length == 0) - { - throw new InvalidOperationException( - $"Prettification for '{identifier}' led to an empty identifier" - ); - } + var result = string.Join(null, words); // Disallow all capitals var resultSpan = result.AsSpan(); - if (!allowAllCaps && IsAllCaps(result)) + if (result.Length > 0 && !allowAllCaps && IsAllCaps(result)) { Span caps = stackalloc char[resultSpan.Length - 1]; resultSpan[1..].ToLower(caps, CultureInfo.InvariantCulture); diff --git a/sources/SilkTouch/SilkTouch/Naming/NameTrimmerContext.cs b/sources/SilkTouch/SilkTouch/Naming/NameProcessorContext.cs similarity index 90% rename from sources/SilkTouch/SilkTouch/Naming/NameTrimmerContext.cs rename to sources/SilkTouch/SilkTouch/Naming/NameProcessorContext.cs index caede1740e..935d1a3b08 100644 --- a/sources/SilkTouch/SilkTouch/Naming/NameTrimmerContext.cs +++ b/sources/SilkTouch/SilkTouch/Naming/NameProcessorContext.cs @@ -6,9 +6,9 @@ namespace Silk.NET.SilkTouch.Naming; /// -/// State made available to implementations when determining a trimmed name. +/// State made available to implementations when determining a trimmed name. /// -public readonly struct NameTrimmerContext +public readonly struct NameProcessorContext { /// /// Gets the name of the "container" (e.g. a type name) of the APIs in . diff --git a/sources/SilkTouch/SilkTouch/Naming/NameTrimmer.cs b/sources/SilkTouch/SilkTouch/Naming/NameTrimmer.cs index 3bc9c92deb..71d80b1b72 100644 --- a/sources/SilkTouch/SilkTouch/Naming/NameTrimmer.cs +++ b/sources/SilkTouch/SilkTouch/Naming/NameTrimmer.cs @@ -1,22 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text.Json; - -namespace Silk.NET.SilkTouch.Naming; +namespace Silk.NET.SilkTouch.Naming; /// /// The default name trimmer ported from Silk.NET 2.18 with modifications for 3.0. /// -public class NameTrimmer : INameTrimmer +public class NameTrimmer : INameProcessor { - /// - public virtual Version Version => new(3, 0); - - /// - public virtual int Order => (int)TrimmerOrder.NameTrimmer; - /// /// Determines whether a second pass without using is warranted. /// @@ -32,7 +20,7 @@ public class NameTrimmer : INameTrimmer private static readonly HashSet s_forbiddenTrimmings = new() { "unsigned", "per" }; /// - public void Trim(NameTrimmerContext context) + public void ProcessNames(NameProcessorContext context) { string? identifiedPrefix = null; List localNames = null!; diff --git a/sources/SilkTouch/SilkTouch/Naming/NameTrimmer217.cs b/sources/SilkTouch/SilkTouch/Naming/NameTrimmer217.cs index e188daad90..391b10a347 100644 --- a/sources/SilkTouch/SilkTouch/Naming/NameTrimmer217.cs +++ b/sources/SilkTouch/SilkTouch/Naming/NameTrimmer217.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using Humanizer; +using Humanizer; namespace Silk.NET.SilkTouch.Naming; @@ -10,12 +8,6 @@ namespace Silk.NET.SilkTouch.Naming; [Obsolete("Use NameTrimmer instead for 3.0 names")] public class NameTrimmer217 : NameTrimmer { - /// - public override Version Version => new(2, 17); - - /// - public override int Order => (int)TrimmerOrder.NameTrimmer217; - /// protected override bool HasRawPass => false; diff --git a/sources/SilkTouch/SilkTouch/Naming/NameTrimmer218.cs b/sources/SilkTouch/SilkTouch/Naming/NameTrimmer218.cs index fd9a0b8fbf..5e206446fb 100644 --- a/sources/SilkTouch/SilkTouch/Naming/NameTrimmer218.cs +++ b/sources/SilkTouch/SilkTouch/Naming/NameTrimmer218.cs @@ -1,6 +1,4 @@ -using System; - -namespace Silk.NET.SilkTouch.Naming; +namespace Silk.NET.SilkTouch.Naming; /// /// The 2.18 name trimmer. @@ -8,12 +6,6 @@ namespace Silk.NET.SilkTouch.Naming; [Obsolete("Use NameTrimmer instead for 3.0 names")] public class NameTrimmer218 : NameTrimmer { - /// - public override Version Version => new(2, 18); - - /// - public override int Order => (int)TrimmerOrder.NameTrimmer218; - /// protected override bool HasRawPass => false; diff --git a/sources/SilkTouch/SilkTouch/Naming/NameUtils.cs b/sources/SilkTouch/SilkTouch/Naming/NameUtils.cs index 9f0b34e21c..67459499df 100644 --- a/sources/SilkTouch/SilkTouch/Naming/NameUtils.cs +++ b/sources/SilkTouch/SilkTouch/Naming/NameUtils.cs @@ -38,6 +38,19 @@ public static partial class NameUtils "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" ); + /// + /// Prefixes the given identifier with the specified prefix if it starts with a number. + /// + public static string PrefixIfStartsWithNumber(string identifier, string prefix = "X") + { + if (identifier.Length > 0 && char.IsDigit(identifier[0])) + { + return $"X{identifier}"; + } + + return identifier; + } + /// /// Gets the char type for the specified character according /// to the categorization defined by . diff --git a/sources/SilkTouch/SilkTouch/Naming/TrimmerOrder.cs b/sources/SilkTouch/SilkTouch/Naming/TrimmerOrder.cs deleted file mode 100644 index 1ec873a1e9..0000000000 --- a/sources/SilkTouch/SilkTouch/Naming/TrimmerOrder.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Silk.NET.SilkTouch.Naming; - -/// -/// Defines the order for SilkTouch's implementations. -/// -internal enum TrimmerOrder -{ - NameAffixerEarlyTrimmer = 100, - - NameTrimmer = 200, - NameTrimmer217 = 210, - NameTrimmer218 = 220, - - PrettifyNamesTrimmer = 400, - - NameAffixerLateTrimmer = 500, -} diff --git a/sources/SilkTouch/SilkTouch/ServiceCollectionExtensions.cs b/sources/SilkTouch/SilkTouch/ServiceCollectionExtensions.cs index 4809f51f0b..66bf03df6a 100644 --- a/sources/SilkTouch/SilkTouch/ServiceCollectionExtensions.cs +++ b/sources/SilkTouch/SilkTouch/ServiceCollectionExtensions.cs @@ -54,8 +54,6 @@ static ServiceCollectionExtensions() /// /// /// - /// - /// One or more s /// An appropriate implementation of /// Mod implementations referenced in the configurations /// @@ -96,16 +94,13 @@ IConfiguration config // - https://andrewlock.net/how-to-register-a-service-with-multiple-interfaces-for-in-asp-net-core-di/ // - https://discordapp.com/channels/143867839282020352/663803973119115264/1129546023388332075 (C# Discord) - // services.AddSingleton(); <-- this is a mod now services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.TryAddSingleton(s => s.GetRequiredService() ); - services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(s => s.GetRequiredService()); services.AddSingleton(s => s.GetRequiredService()); services.AddSingleton(typeof(IJobDependency<>), typeof(JobDependencies.Global<>)); services.TryAddSingleton(); diff --git a/sources/Vulkan/Vulkan/Vulkan/DebugMarkerMarkerInfoEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DebugMarkerMarkerInfoEXT.gen.cs index 13b4dabafe..77a76d9b27 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DebugMarkerMarkerInfoEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DebugMarkerMarkerInfoEXT.gen.cs @@ -26,5 +26,5 @@ public unsafe partial struct DebugMarkerMarkerInfoEXT [NativeName("color")] [SupportedApiProfile("vulkan", ["VK_EXT_debug_marker"], ImpliesSets = ["VK_EXT_debug_report"])] - public DebugMarkerMarkerInfoExtColor Color; + public DebugMarkerMarkerInfoEXTColor Color; } diff --git a/sources/Vulkan/Vulkan/Vulkan/DebugMarkerMarkerInfoExtColor.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DebugMarkerMarkerInfoEXTColor.gen.cs similarity index 91% rename from sources/Vulkan/Vulkan/Vulkan/DebugMarkerMarkerInfoExtColor.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/DebugMarkerMarkerInfoEXTColor.gen.cs index a087892818..d5f5533600 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DebugMarkerMarkerInfoExtColor.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DebugMarkerMarkerInfoEXTColor.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_color_e__FixedBuffer")] [InlineArray(4)] [SupportedApiProfile("vulkan")] -public partial struct DebugMarkerMarkerInfoExtColor +public partial struct DebugMarkerMarkerInfoEXTColor { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/DebugReportCallbackEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DebugReportCallbackEXT.gen.cs index 1fbcc76130..17ca5c46b9 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DebugReportCallbackEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DebugReportCallbackEXT.gen.cs @@ -52,7 +52,7 @@ public DebugReportCallbackEXT( ) => Pointer = ptr; [SupportedApiProfile("vulkan", ["VK_EXT_debug_report"])] - public DebugReportCallbackEXT(DebugReportCallbackDelegateEXT proc) => + public DebugReportCallbackEXT(DebugReportCallbackEXTDelegate proc) => Pointer = SilkMarshal.DelegateToPtr(proc); [SupportedApiProfile("vulkan", ["VK_EXT_debug_report"])] diff --git a/sources/Vulkan/Vulkan/Vulkan/DebugReportCallbackDelegateEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DebugReportCallbackEXTDelegate.gen.cs similarity index 91% rename from sources/Vulkan/Vulkan/Vulkan/DebugReportCallbackDelegateEXT.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/DebugReportCallbackEXTDelegate.gen.cs index 6d5f18666f..1fc82b973b 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DebugReportCallbackDelegateEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DebugReportCallbackEXTDelegate.gen.cs @@ -10,7 +10,7 @@ namespace Silk.NET.Vulkan; [NativeName("PFN_vkDebugReportCallbackEXT")] [SupportedApiProfile("vulkan")] -public unsafe delegate uint DebugReportCallbackDelegateEXT( +public unsafe delegate uint DebugReportCallbackEXTDelegate( DebugReportFlagsEXT arg0, DebugReportObjectTypeEXT arg1, ulong arg2, diff --git a/sources/Vulkan/Vulkan/Vulkan/DebugUtilsLabelEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DebugUtilsLabelEXT.gen.cs index 13684e4abe..ef3b1e23fd 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DebugUtilsLabelEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DebugUtilsLabelEXT.gen.cs @@ -26,5 +26,5 @@ public unsafe partial struct DebugUtilsLabelEXT [NativeName("color")] [SupportedApiProfile("vulkan", ["VK_EXT_debug_utils"])] - public DebugUtilsLabelExtColor Color; + public DebugUtilsLabelEXTColor Color; } diff --git a/sources/Vulkan/Vulkan/Vulkan/DebugUtilsLabelExtColor.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DebugUtilsLabelEXTColor.gen.cs similarity index 92% rename from sources/Vulkan/Vulkan/Vulkan/DebugUtilsLabelExtColor.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/DebugUtilsLabelEXTColor.gen.cs index ead85ca18f..26aabcef9d 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DebugUtilsLabelExtColor.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DebugUtilsLabelEXTColor.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_color_e__FixedBuffer")] [InlineArray(4)] [SupportedApiProfile("vulkan")] -public partial struct DebugUtilsLabelExtColor +public partial struct DebugUtilsLabelEXTColor { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/DebugUtilsMessengerCallbackEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DebugUtilsMessengerCallbackEXT.gen.cs index 282236565a..1ac52b77f8 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DebugUtilsMessengerCallbackEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DebugUtilsMessengerCallbackEXT.gen.cs @@ -40,7 +40,7 @@ public DebugUtilsMessengerCallbackEXT( ) => Pointer = ptr; [SupportedApiProfile("vulkan", ["VK_EXT_debug_utils"])] - public DebugUtilsMessengerCallbackEXT(DebugUtilsMessengerCallbackDelegateEXT proc) => + public DebugUtilsMessengerCallbackEXT(DebugUtilsMessengerCallbackEXTDelegate proc) => Pointer = SilkMarshal.DelegateToPtr(proc); [SupportedApiProfile("vulkan", ["VK_EXT_debug_utils"])] diff --git a/sources/Vulkan/Vulkan/Vulkan/DebugUtilsMessengerCallbackDelegateEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DebugUtilsMessengerCallbackEXTDelegate.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/DebugUtilsMessengerCallbackDelegateEXT.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/DebugUtilsMessengerCallbackEXTDelegate.gen.cs index 91a410e8c5..4b0d3d12ee 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DebugUtilsMessengerCallbackDelegateEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DebugUtilsMessengerCallbackEXTDelegate.gen.cs @@ -10,7 +10,7 @@ namespace Silk.NET.Vulkan; [NativeName("PFN_vkDebugUtilsMessengerCallbackEXT")] [SupportedApiProfile("vulkan")] -public unsafe delegate uint DebugUtilsMessengerCallbackDelegateEXT( +public unsafe delegate uint DebugUtilsMessengerCallbackEXTDelegate( DebugUtilsMessageSeverityFlagsEXT arg0, DebugUtilsMessageTypeFlagsEXT arg1, DebugUtilsMessengerCallbackDataEXT* arg2, diff --git a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultInfoEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultInfoEXT.gen.cs index c241a1bc4d..0428db281f 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultInfoEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultInfoEXT.gen.cs @@ -42,7 +42,7 @@ public unsafe partial struct DeviceFaultInfoEXT "VK_EXT_device_fault+VK_VERSION_1_1", ] )] - public DeviceFaultInfoExtDescription Description; + public DeviceFaultInfoEXTDescription Description; [NativeName("pAddressInfos")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultInfoExtDescription.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultInfoEXTDescription.gen.cs similarity index 92% rename from sources/Vulkan/Vulkan/Vulkan/DeviceFaultInfoExtDescription.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/DeviceFaultInfoEXTDescription.gen.cs index c4cbc58aa9..a2f27be648 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultInfoExtDescription.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultInfoEXTDescription.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_description_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct DeviceFaultInfoExtDescription +public partial struct DeviceFaultInfoEXTDescription { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorBinaryHeaderVersionOneEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorBinaryHeaderVersionOneEXT.gen.cs index 0a7a83c41a..603198dba3 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorBinaryHeaderVersionOneEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorBinaryHeaderVersionOneEXT.gen.cs @@ -75,7 +75,7 @@ public partial struct DeviceFaultVendorBinaryHeaderVersionOneEXT "VK_EXT_device_fault+VK_VERSION_1_1", ] )] - public DeviceFaultVendorBinaryHeaderVersionOneExtPipelineCacheUuid PipelineCacheUuid; + public DeviceFaultVendorBinaryHeaderVersionOneEXTPipelineCacheUuid PipelineCacheUuid; [NativeName("applicationNameOffset")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorBinaryHeaderVersionOneExtPipelineCacheUuid.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorBinaryHeaderVersionOneEXTPipelineCacheUuid.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorBinaryHeaderVersionOneExtPipelineCacheUuid.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorBinaryHeaderVersionOneEXTPipelineCacheUuid.gen.cs index ed9aa0c92f..6ce5eea9de 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorBinaryHeaderVersionOneExtPipelineCacheUuid.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorBinaryHeaderVersionOneEXTPipelineCacheUuid.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_pipelineCacheUUID_e__FixedBuffer")] [InlineArray(16)] [SupportedApiProfile("vulkan")] -public partial struct DeviceFaultVendorBinaryHeaderVersionOneExtPipelineCacheUuid +public partial struct DeviceFaultVendorBinaryHeaderVersionOneEXTPipelineCacheUuid { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorInfoEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorInfoEXT.gen.cs index b4e39a666c..753adcbc03 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorInfoEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorInfoEXT.gen.cs @@ -21,7 +21,7 @@ public partial struct DeviceFaultVendorInfoEXT "VK_EXT_device_fault+VK_VERSION_1_1", ] )] - public DeviceFaultVendorInfoExtDescription Description; + public DeviceFaultVendorInfoEXTDescription Description; [NativeName("vendorFaultCode")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorInfoExtDescription.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorInfoEXTDescription.gen.cs similarity index 91% rename from sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorInfoExtDescription.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorInfoEXTDescription.gen.cs index f84c0d4223..6f754dab2e 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorInfoExtDescription.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DeviceFaultVendorInfoEXTDescription.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_description_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct DeviceFaultVendorInfoExtDescription +public partial struct DeviceFaultVendorInfoEXTDescription { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/DeviceGroupPresentCapabilitiesKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DeviceGroupPresentCapabilitiesKHR.gen.cs index 44e75160f8..fed8459d69 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DeviceGroupPresentCapabilitiesKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DeviceGroupPresentCapabilitiesKHR.gen.cs @@ -37,7 +37,7 @@ public unsafe partial struct DeviceGroupPresentCapabilitiesKHR ImpliesSets = ["VK_KHR_surface"], RequireAll = true )] - public DeviceGroupPresentCapabilitiesKhrPresentMask PresentMask; + public DeviceGroupPresentCapabilitiesKHRPresentMask PresentMask; [NativeName("modes")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/DeviceGroupPresentCapabilitiesKhrPresentMask.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DeviceGroupPresentCapabilitiesKHRPresentMask.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/DeviceGroupPresentCapabilitiesKhrPresentMask.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/DeviceGroupPresentCapabilitiesKHRPresentMask.gen.cs index d6b865390b..ebee5fd756 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DeviceGroupPresentCapabilitiesKhrPresentMask.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DeviceGroupPresentCapabilitiesKHRPresentMask.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_presentMask_e__FixedBuffer")] [InlineArray(32)] [SupportedApiProfile("vulkan")] -public partial struct DeviceGroupPresentCapabilitiesKhrPresentMask +public partial struct DeviceGroupPresentCapabilitiesKHRPresentMask { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/DeviceMemoryReportCallbackEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DeviceMemoryReportCallbackEXT.gen.cs index 547894dd2f..9f9fa3e3e3 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DeviceMemoryReportCallbackEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DeviceMemoryReportCallbackEXT.gen.cs @@ -53,7 +53,7 @@ public DeviceMemoryReportCallbackEXT( "VK_EXT_device_memory_report+VK_VERSION_1_1", ] )] - public DeviceMemoryReportCallbackEXT(DeviceMemoryReportCallbackDelegateEXT proc) => + public DeviceMemoryReportCallbackEXT(DeviceMemoryReportCallbackEXTDelegate proc) => Pointer = SilkMarshal.DelegateToPtr(proc); [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/DeviceMemoryReportCallbackDelegateEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/DeviceMemoryReportCallbackEXTDelegate.gen.cs similarity index 89% rename from sources/Vulkan/Vulkan/Vulkan/DeviceMemoryReportCallbackDelegateEXT.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/DeviceMemoryReportCallbackEXTDelegate.gen.cs index deaccc8c73..c5ca8bf774 100644 --- a/sources/Vulkan/Vulkan/Vulkan/DeviceMemoryReportCallbackDelegateEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/DeviceMemoryReportCallbackEXTDelegate.gen.cs @@ -10,7 +10,7 @@ namespace Silk.NET.Vulkan; [NativeName("PFN_vkDeviceMemoryReportCallbackEXT")] [SupportedApiProfile("vulkan")] -public unsafe delegate void DeviceMemoryReportCallbackDelegateEXT( +public unsafe delegate void DeviceMemoryReportCallbackEXTDelegate( DeviceMemoryReportCallbackDataEXT* arg0, void* arg1 ); diff --git a/sources/Vulkan/Vulkan/Vulkan/GetInstanceProcAddrLUNARG.gen.cs b/sources/Vulkan/Vulkan/Vulkan/GetInstanceProcAddrLUNARG.gen.cs index efa078ca71..d6faa30480 100644 --- a/sources/Vulkan/Vulkan/Vulkan/GetInstanceProcAddrLUNARG.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/GetInstanceProcAddrLUNARG.gen.cs @@ -25,7 +25,7 @@ public GetInstanceProcAddrLUNARG( ) => Pointer = ptr; [SupportedApiProfile("vulkan", ["VK_LUNARG_direct_driver_loading"])] - public GetInstanceProcAddrLUNARG(GetInstanceProcAddrDelegateLUNARG proc) => + public GetInstanceProcAddrLUNARG(GetInstanceProcAddrLUNARGDelegate proc) => Pointer = SilkMarshal.DelegateToPtr(proc); [SupportedApiProfile("vulkan", ["VK_LUNARG_direct_driver_loading"])] diff --git a/sources/Vulkan/Vulkan/Vulkan/GetInstanceProcAddrDelegateLUNARG.gen.cs b/sources/Vulkan/Vulkan/Vulkan/GetInstanceProcAddrLUNARGDelegate.gen.cs similarity index 96% rename from sources/Vulkan/Vulkan/Vulkan/GetInstanceProcAddrDelegateLUNARG.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/GetInstanceProcAddrLUNARGDelegate.gen.cs index 3a8b09e9da..2f7915729f 100644 --- a/sources/Vulkan/Vulkan/Vulkan/GetInstanceProcAddrDelegateLUNARG.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/GetInstanceProcAddrLUNARGDelegate.gen.cs @@ -10,7 +10,7 @@ namespace Silk.NET.Vulkan; [NativeName("PFN_vkGetInstanceProcAddrLUNARG")] [SupportedApiProfile("vulkan")] -public unsafe delegate GetInstanceProcAddrLunargP2 GetInstanceProcAddrDelegateLUNARG( +public unsafe delegate GetInstanceProcAddrLunargP2 GetInstanceProcAddrLUNARGDelegate( InstanceHandle arg0, sbyte* arg1 ); diff --git a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionARM.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionARM.gen.cs index dec072b919..b97c601f2f 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionARM.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionARM.gen.cs @@ -54,5 +54,5 @@ public unsafe partial struct PerformanceCounterDescriptionARM "VK_ARM_performance_counters_by_region+VK_VERSION_1_1", ] )] - public PerformanceCounterDescriptionArmName Name; + public PerformanceCounterDescriptionARMName Name; } diff --git a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionArmName.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionARMName.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionArmName.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionARMName.gen.cs index e20908c4ce..5a86dc4127 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionArmName.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionARMName.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_name_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PerformanceCounterDescriptionArmName +public partial struct PerformanceCounterDescriptionARMName { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHR.gen.cs index 2eb342b252..d1652a9826 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHR.gen.cs @@ -53,7 +53,7 @@ public unsafe partial struct PerformanceCounterDescriptionKHR "VK_KHR_performance_query+VK_VERSION_1_1", ] )] - public PerformanceCounterDescriptionKhrName Name; + public PerformanceCounterDescriptionKHRName Name; [NativeName("category")] [SupportedApiProfile( @@ -64,7 +64,7 @@ public unsafe partial struct PerformanceCounterDescriptionKHR "VK_KHR_performance_query+VK_VERSION_1_1", ] )] - public PerformanceCounterDescriptionKhrCategory Category; + public PerformanceCounterDescriptionKHRCategory Category; [NativeName("description")] [SupportedApiProfile( @@ -75,5 +75,5 @@ public unsafe partial struct PerformanceCounterDescriptionKHR "VK_KHR_performance_query+VK_VERSION_1_1", ] )] - public PerformanceCounterDescriptionKhrDescription Description; + public PerformanceCounterDescriptionKHRDescription Description; } diff --git a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKhrCategory.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHRCategory.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKhrCategory.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHRCategory.gen.cs index ee58dfe571..41ebd3e9fe 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKhrCategory.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHRCategory.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_category_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PerformanceCounterDescriptionKhrCategory +public partial struct PerformanceCounterDescriptionKHRCategory { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/RenderPassSubpassFeedbackInfoExtDescription.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHRDescription.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/RenderPassSubpassFeedbackInfoExtDescription.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHRDescription.gen.cs index 5fe2577487..8a1728d76d 100644 --- a/sources/Vulkan/Vulkan/Vulkan/RenderPassSubpassFeedbackInfoExtDescription.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHRDescription.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_description_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct RenderPassSubpassFeedbackInfoExtDescription +public partial struct PerformanceCounterDescriptionKHRDescription { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKhrName.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHRName.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKhrName.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHRName.gen.cs index a35447ccba..f58216aeb8 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKhrName.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKHRName.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_name_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PerformanceCounterDescriptionKhrName +public partial struct PerformanceCounterDescriptionKHRName { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterKHR.gen.cs index 4802d80517..62d78a8919 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterKHR.gen.cs @@ -75,5 +75,5 @@ public unsafe partial struct PerformanceCounterKHR "VK_KHR_performance_query+VK_VERSION_1_1", ] )] - public PerformanceCounterKhrUuid Uuid; + public PerformanceCounterKHRUuid Uuid; } diff --git a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterKhrUuid.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterKHRUuid.gen.cs similarity index 92% rename from sources/Vulkan/Vulkan/Vulkan/PerformanceCounterKhrUuid.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PerformanceCounterKHRUuid.gen.cs index 3a78cef254..dbb1421f79 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterKhrUuid.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterKHRUuid.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_uuid_e__FixedBuffer")] [InlineArray(16)] [SupportedApiProfile("vulkan")] -public partial struct PerformanceCounterKhrUuid +public partial struct PerformanceCounterKHRUuid { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHUAWEI.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHUAWEI.gen.cs index b92c913fde..77b0b6c226 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHUAWEI.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHUAWEI.gen.cs @@ -43,7 +43,7 @@ public unsafe partial struct PhysicalDeviceClusterCullingShaderPropertiesHUAWEI "VK_HUAWEI_cluster_culling_shader+VK_VERSION_1_1", ] )] - public PhysicalDeviceClusterCullingShaderPropertiesHuaweiMaxWorkGroupCount MaxWorkGroupCount; + public PhysicalDeviceClusterCullingShaderPropertiesHUAWEIMaxWorkGroupCount MaxWorkGroupCount; [NativeName("maxWorkGroupSize")] [SupportedApiProfile( @@ -54,7 +54,7 @@ public unsafe partial struct PhysicalDeviceClusterCullingShaderPropertiesHUAWEI "VK_HUAWEI_cluster_culling_shader+VK_VERSION_1_1", ] )] - public PhysicalDeviceClusterCullingShaderPropertiesHuaweiMaxWorkGroupSize MaxWorkGroupSize; + public PhysicalDeviceClusterCullingShaderPropertiesHUAWEIMaxWorkGroupSize MaxWorkGroupSize; [NativeName("maxOutputClusterCount")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHuaweiMaxWorkGroupCount.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHUAWEIMaxWorkGroupCount.gen.cs similarity index 96% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHuaweiMaxWorkGroupCount.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHUAWEIMaxWorkGroupCount.gen.cs index 48dab6dbde..b7d88a6160 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHuaweiMaxWorkGroupCount.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHUAWEIMaxWorkGroupCount.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_maxWorkGroupCount_e__FixedBuffer")] [InlineArray(3)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceClusterCullingShaderPropertiesHuaweiMaxWorkGroupCount +public partial struct PhysicalDeviceClusterCullingShaderPropertiesHUAWEIMaxWorkGroupCount { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHuaweiMaxWorkGroupSize.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHUAWEIMaxWorkGroupSize.gen.cs similarity index 96% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHuaweiMaxWorkGroupSize.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHUAWEIMaxWorkGroupSize.gen.cs index 0485b6731f..65713a1cec 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHuaweiMaxWorkGroupSize.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceClusterCullingShaderPropertiesHUAWEIMaxWorkGroupSize.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_maxWorkGroupSize_e__FixedBuffer")] [InlineArray(3)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceClusterCullingShaderPropertiesHuaweiMaxWorkGroupSize +public partial struct PhysicalDeviceClusterCullingShaderPropertiesHUAWEIMaxWorkGroupSize { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceDataGraphOperationSupportARM.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceDataGraphOperationSupportARM.gen.cs index 8ba7a9716d..61f19560dd 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceDataGraphOperationSupportARM.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceDataGraphOperationSupportARM.gen.cs @@ -26,7 +26,7 @@ public partial struct PhysicalDeviceDataGraphOperationSupportARM ["VK_ARM_data_graph"], ImpliesSets = ["VK_KHR_deferred_host_operations", "VK_KHR_maintenance5", "VK_VERSION_1_3"] )] - public PhysicalDeviceDataGraphOperationSupportArmName Name; + public PhysicalDeviceDataGraphOperationSupportARMName Name; [NativeName("version")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceDataGraphOperationSupportArmName.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceDataGraphOperationSupportARMName.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceDataGraphOperationSupportArmName.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceDataGraphOperationSupportARMName.gen.cs index 2576ec8325..d9e71b528e 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceDataGraphOperationSupportArmName.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceDataGraphOperationSupportARMName.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_name_e__FixedBuffer")] [InlineArray(128)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceDataGraphOperationSupportArmName +public partial struct PhysicalDeviceDataGraphOperationSupportARMName { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceLayeredApiPropertiesKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceLayeredApiPropertiesKHR.gen.cs index 1c49013c9e..8cdd72e207 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceLayeredApiPropertiesKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceLayeredApiPropertiesKHR.gen.cs @@ -34,5 +34,5 @@ public unsafe partial struct PhysicalDeviceLayeredApiPropertiesKHR [NativeName("deviceName")] [SupportedApiProfile("vulkan", ["VK_KHR_maintenance7"], ImpliesSets = ["VK_VERSION_1_1"])] - public PhysicalDeviceLayeredApiPropertiesKhrDeviceName DeviceName; + public PhysicalDeviceLayeredApiPropertiesKHRDeviceName DeviceName; } diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceLayeredApiPropertiesKhrDeviceName.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceLayeredApiPropertiesKHRDeviceName.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceLayeredApiPropertiesKhrDeviceName.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceLayeredApiPropertiesKHRDeviceName.gen.cs index 865e576fb0..22f7aac188 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceLayeredApiPropertiesKhrDeviceName.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceLayeredApiPropertiesKHRDeviceName.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_deviceName_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceLayeredApiPropertiesKhrDeviceName +public partial struct PhysicalDeviceLayeredApiPropertiesKHRDeviceName { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesEXT.gen.cs index c90d993fb7..2ad35cf788 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesEXT.gen.cs @@ -43,7 +43,7 @@ public unsafe partial struct PhysicalDeviceMemoryBudgetPropertiesEXT "VK_EXT_memory_budget+VK_VERSION_1_1", ] )] - public PhysicalDeviceMemoryBudgetPropertiesExtHeapBudget HeapBudget; + public PhysicalDeviceMemoryBudgetPropertiesEXTHeapBudget HeapBudget; [NativeName("heapUsage")] [SupportedApiProfile( @@ -54,5 +54,5 @@ public unsafe partial struct PhysicalDeviceMemoryBudgetPropertiesEXT "VK_EXT_memory_budget+VK_VERSION_1_1", ] )] - public PhysicalDeviceMemoryBudgetPropertiesExtHeapUsage HeapUsage; + public PhysicalDeviceMemoryBudgetPropertiesEXTHeapUsage HeapUsage; } diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesExtHeapBudget.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesEXTHeapBudget.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesExtHeapBudget.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesEXTHeapBudget.gen.cs index 894f05aec0..ad7dd9f29d 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesExtHeapBudget.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesEXTHeapBudget.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_heapBudget_e__FixedBuffer")] [InlineArray(16)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceMemoryBudgetPropertiesExtHeapBudget +public partial struct PhysicalDeviceMemoryBudgetPropertiesEXTHeapBudget { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesExtHeapUsage.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesEXTHeapUsage.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesExtHeapUsage.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesEXTHeapUsage.gen.cs index d0a0f80ac0..0e4dba1860 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesExtHeapUsage.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMemoryBudgetPropertiesEXTHeapUsage.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_heapUsage_e__FixedBuffer")] [InlineArray(16)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceMemoryBudgetPropertiesExtHeapUsage +public partial struct PhysicalDeviceMemoryBudgetPropertiesEXTHeapUsage { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXT.gen.cs index cc7a986b13..e0de0c0c94 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXT.gen.cs @@ -42,7 +42,7 @@ public unsafe partial struct PhysicalDeviceMeshShaderPropertiesEXT ["VK_EXT_mesh_shader"], ImpliesSets = ["VK_EXT_mesh_shader+VK_KHR_spirv_1_4", "VK_EXT_mesh_shader+VK_VERSION_1_2"] )] - public PhysicalDeviceMeshShaderPropertiesExtMaxTaskWorkGroupCount MaxTaskWorkGroupCount; + public PhysicalDeviceMeshShaderPropertiesEXTMaxTaskWorkGroupCount MaxTaskWorkGroupCount; [NativeName("maxTaskWorkGroupInvocations")] [SupportedApiProfile( @@ -58,7 +58,7 @@ public unsafe partial struct PhysicalDeviceMeshShaderPropertiesEXT ["VK_EXT_mesh_shader"], ImpliesSets = ["VK_EXT_mesh_shader+VK_KHR_spirv_1_4", "VK_EXT_mesh_shader+VK_VERSION_1_2"] )] - public PhysicalDeviceMeshShaderPropertiesExtMaxTaskWorkGroupSize MaxTaskWorkGroupSize; + public PhysicalDeviceMeshShaderPropertiesEXTMaxTaskWorkGroupSize MaxTaskWorkGroupSize; [NativeName("maxTaskPayloadSize")] [SupportedApiProfile( @@ -98,7 +98,7 @@ public unsafe partial struct PhysicalDeviceMeshShaderPropertiesEXT ["VK_EXT_mesh_shader"], ImpliesSets = ["VK_EXT_mesh_shader+VK_KHR_spirv_1_4", "VK_EXT_mesh_shader+VK_VERSION_1_2"] )] - public PhysicalDeviceMeshShaderPropertiesExtMaxMeshWorkGroupCount MaxMeshWorkGroupCount; + public PhysicalDeviceMeshShaderPropertiesEXTMaxMeshWorkGroupCount MaxMeshWorkGroupCount; [NativeName("maxMeshWorkGroupInvocations")] [SupportedApiProfile( @@ -114,7 +114,7 @@ public unsafe partial struct PhysicalDeviceMeshShaderPropertiesEXT ["VK_EXT_mesh_shader"], ImpliesSets = ["VK_EXT_mesh_shader+VK_KHR_spirv_1_4", "VK_EXT_mesh_shader+VK_VERSION_1_2"] )] - public PhysicalDeviceMeshShaderPropertiesExtMaxMeshWorkGroupSize MaxMeshWorkGroupSize; + public PhysicalDeviceMeshShaderPropertiesEXTMaxMeshWorkGroupSize MaxMeshWorkGroupSize; [NativeName("maxMeshSharedMemorySize")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxMeshWorkGroupCount.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxMeshWorkGroupCount.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxMeshWorkGroupCount.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxMeshWorkGroupCount.gen.cs index d1f2310b36..977a31b1fa 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxMeshWorkGroupCount.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxMeshWorkGroupCount.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_maxMeshWorkGroupCount_e__FixedBuffer")] [InlineArray(3)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceMeshShaderPropertiesExtMaxMeshWorkGroupCount +public partial struct PhysicalDeviceMeshShaderPropertiesEXTMaxMeshWorkGroupCount { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxMeshWorkGroupSize.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxMeshWorkGroupSize.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxMeshWorkGroupSize.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxMeshWorkGroupSize.gen.cs index 12961ac8a9..b30925a2a9 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxMeshWorkGroupSize.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxMeshWorkGroupSize.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_maxMeshWorkGroupSize_e__FixedBuffer")] [InlineArray(3)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceMeshShaderPropertiesExtMaxMeshWorkGroupSize +public partial struct PhysicalDeviceMeshShaderPropertiesEXTMaxMeshWorkGroupSize { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxTaskWorkGroupCount.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxTaskWorkGroupCount.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxTaskWorkGroupCount.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxTaskWorkGroupCount.gen.cs index a557c05273..e41d505b44 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxTaskWorkGroupCount.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxTaskWorkGroupCount.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_maxTaskWorkGroupCount_e__FixedBuffer")] [InlineArray(3)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceMeshShaderPropertiesExtMaxTaskWorkGroupCount +public partial struct PhysicalDeviceMeshShaderPropertiesEXTMaxTaskWorkGroupCount { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxTaskWorkGroupSize.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxTaskWorkGroupSize.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxTaskWorkGroupSize.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxTaskWorkGroupSize.gen.cs index b06d3e34c6..2f4d299bac 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesExtMaxTaskWorkGroupSize.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceMeshShaderPropertiesEXTMaxTaskWorkGroupSize.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_maxTaskWorkGroupSize_e__FixedBuffer")] [InlineArray(3)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceMeshShaderPropertiesExtMaxTaskWorkGroupSize +public partial struct PhysicalDeviceMeshShaderPropertiesEXTMaxTaskWorkGroupSize { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceSampleLocationsPropertiesEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceSampleLocationsPropertiesEXT.gen.cs index 5ab9bde64a..3d88b2a27e 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceSampleLocationsPropertiesEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceSampleLocationsPropertiesEXT.gen.cs @@ -65,7 +65,7 @@ public unsafe partial struct PhysicalDeviceSampleLocationsPropertiesEXT "VK_EXT_sample_locations+VK_VERSION_1_1", ] )] - public PhysicalDeviceSampleLocationsPropertiesExtSampleLocationCoordinateRange SampleLocationCoordinateRange; + public PhysicalDeviceSampleLocationsPropertiesEXTSampleLocationCoordinateRange SampleLocationCoordinateRange; [NativeName("sampleLocationSubPixelBits")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceSampleLocationsPropertiesExtSampleLocationCoordinateRange.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceSampleLocationsPropertiesEXTSampleLocationCoordinateRange.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceSampleLocationsPropertiesExtSampleLocationCoordinateRange.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceSampleLocationsPropertiesEXTSampleLocationCoordinateRange.gen.cs index 3417743e63..4d369f33c8 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceSampleLocationsPropertiesExtSampleLocationCoordinateRange.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceSampleLocationsPropertiesEXTSampleLocationCoordinateRange.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_sampleLocationCoordinateRange_e__FixedBuffer")] [InlineArray(2)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceSampleLocationsPropertiesExtSampleLocationCoordinateRange +public partial struct PhysicalDeviceSampleLocationsPropertiesEXTSampleLocationCoordinateRange { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderModuleIdentifierPropertiesEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderModuleIdentifierPropertiesEXT.gen.cs index 0b5368f576..d5a8af6c6a 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderModuleIdentifierPropertiesEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderModuleIdentifierPropertiesEXT.gen.cs @@ -46,5 +46,5 @@ public unsafe partial struct PhysicalDeviceShaderModuleIdentifierPropertiesEXT "VK_VERSION_1_3", ] )] - public PhysicalDeviceShaderModuleIdentifierPropertiesExtShaderModuleIdentifierAlgorithmUuid ShaderModuleIdentifierAlgorithmUuid; + public PhysicalDeviceShaderModuleIdentifierPropertiesEXTShaderModuleIdentifierAlgorithmUuid ShaderModuleIdentifierAlgorithmUuid; } diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderModuleIdentifierPropertiesExtShaderModuleIdentifierAlgorithmUuid.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderModuleIdentifierPropertiesEXTShaderModuleIdentifierAlgorithmUuid.gen.cs similarity index 94% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderModuleIdentifierPropertiesExtShaderModuleIdentifierAlgorithmUuid.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderModuleIdentifierPropertiesEXTShaderModuleIdentifierAlgorithmUuid.gen.cs index a424c4fe84..f9eef0036e 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderModuleIdentifierPropertiesExtShaderModuleIdentifierAlgorithmUuid.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderModuleIdentifierPropertiesEXTShaderModuleIdentifierAlgorithmUuid.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_shaderModuleIdentifierAlgorithmUUID_e__FixedBuffer")] [InlineArray(16)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceShaderModuleIdentifierPropertiesExtShaderModuleIdentifierAlgorithmUuid +public partial struct PhysicalDeviceShaderModuleIdentifierPropertiesEXTShaderModuleIdentifierAlgorithmUuid { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderObjectPropertiesEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderObjectPropertiesEXT.gen.cs index fae13ddf43..69948c0476 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderObjectPropertiesEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderObjectPropertiesEXT.gen.cs @@ -46,7 +46,7 @@ public unsafe partial struct PhysicalDeviceShaderObjectPropertiesEXT "VK_VERSION_1_3", ] )] - public PhysicalDeviceShaderObjectPropertiesExtShaderBinaryUuid ShaderBinaryUuid; + public PhysicalDeviceShaderObjectPropertiesEXTShaderBinaryUuid ShaderBinaryUuid; [NativeName("shaderBinaryVersion")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderObjectPropertiesExtShaderBinaryUuid.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderObjectPropertiesEXTShaderBinaryUuid.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderObjectPropertiesExtShaderBinaryUuid.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderObjectPropertiesEXTShaderBinaryUuid.gen.cs index d5d7775d49..158faa64c8 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderObjectPropertiesExtShaderBinaryUuid.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PhysicalDeviceShaderObjectPropertiesEXTShaderBinaryUuid.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_shaderBinaryUUID_e__FixedBuffer")] [InlineArray(16)] [SupportedApiProfile("vulkan")] -public partial struct PhysicalDeviceShaderObjectPropertiesExtShaderBinaryUuid +public partial struct PhysicalDeviceShaderObjectPropertiesEXTShaderBinaryUuid { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineBinaryKeyKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineBinaryKeyKHR.gen.cs index 1b625fb2ad..8277e212c0 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineBinaryKeyKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineBinaryKeyKHR.gen.cs @@ -54,5 +54,5 @@ public unsafe partial struct PipelineBinaryKeyKHR "VK_KHR_pipeline_binary+VK_VERSION_1_4", ] )] - public PipelineBinaryKeyKhrKey Key; + public PipelineBinaryKeyKHRKey Key; } diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineBinaryKeyKhrKey.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineBinaryKeyKHRKey.gen.cs similarity index 92% rename from sources/Vulkan/Vulkan/Vulkan/PipelineBinaryKeyKhrKey.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PipelineBinaryKeyKHRKey.gen.cs index 2ebcc9e12b..64cc2768fe 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineBinaryKeyKhrKey.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineBinaryKeyKHRKey.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_key_e__FixedBuffer")] [InlineArray(32)] [SupportedApiProfile("vulkan")] -public partial struct PipelineBinaryKeyKhrKey +public partial struct PipelineBinaryKeyKHRKey { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineCacheHeaderVersionDataGraphQCOM.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineCacheHeaderVersionDataGraphQCOM.gen.cs index 4fd572d78c..a11b1850c3 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineCacheHeaderVersionDataGraphQCOM.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineCacheHeaderVersionDataGraphQCOM.gen.cs @@ -49,5 +49,5 @@ public partial struct PipelineCacheHeaderVersionDataGraphQCOM ["VK_QCOM_data_graph_model"], ImpliesSets = ["VK_ARM_data_graph"] )] - public PipelineCacheHeaderVersionDataGraphQcomToolchainVersion ToolchainVersion; + public PipelineCacheHeaderVersionDataGraphQCOMToolchainVersion ToolchainVersion; } diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineCacheHeaderVersionDataGraphQcomToolchainVersion.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineCacheHeaderVersionDataGraphQCOMToolchainVersion.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PipelineCacheHeaderVersionDataGraphQcomToolchainVersion.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PipelineCacheHeaderVersionDataGraphQCOMToolchainVersion.gen.cs index 6b3d5605f2..deb955425d 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineCacheHeaderVersionDataGraphQcomToolchainVersion.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineCacheHeaderVersionDataGraphQCOMToolchainVersion.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_toolchainVersion_e__FixedBuffer")] [InlineArray(3)] [SupportedApiProfile("vulkan")] -public partial struct PipelineCacheHeaderVersionDataGraphQcomToolchainVersion +public partial struct PipelineCacheHeaderVersionDataGraphQCOMToolchainVersion { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKHR.gen.cs index 185d3d494a..2bacc42a67 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKHR.gen.cs @@ -42,7 +42,7 @@ public unsafe partial struct PipelineExecutableInternalRepresentationKHR "VK_KHR_pipeline_executable_properties+VK_VERSION_1_1", ] )] - public PipelineExecutableInternalRepresentationKhrName Name; + public PipelineExecutableInternalRepresentationKHRName Name; [NativeName("description")] [SupportedApiProfile( @@ -53,7 +53,7 @@ public unsafe partial struct PipelineExecutableInternalRepresentationKHR "VK_KHR_pipeline_executable_properties+VK_VERSION_1_1", ] )] - public PipelineExecutableInternalRepresentationKhrDescription Description; + public PipelineExecutableInternalRepresentationKHRDescription Description; [NativeName("isText")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKhrDescription.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKHRDescription.gen.cs similarity index 88% rename from sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKhrDescription.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKHRDescription.gen.cs index 312e53184c..c67b997886 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKhrDescription.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKHRDescription.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_description_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PipelineExecutableInternalRepresentationKhrDescription +public partial struct PipelineExecutableInternalRepresentationKHRDescription { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKhrName.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKHRName.gen.cs similarity index 89% rename from sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKhrName.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKHRName.gen.cs index 0349deb036..b6a86fbd66 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKhrName.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableInternalRepresentationKHRName.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_name_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PipelineExecutableInternalRepresentationKhrName +public partial struct PipelineExecutableInternalRepresentationKHRName { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKHR.gen.cs index f3df15140f..39c513e0de 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKHR.gen.cs @@ -54,7 +54,7 @@ public unsafe partial struct PipelineExecutablePropertiesKHR "VK_KHR_pipeline_executable_properties+VK_VERSION_1_1", ] )] - public PipelineExecutablePropertiesKhrName Name; + public PipelineExecutablePropertiesKHRName Name; [NativeName("description")] [SupportedApiProfile( @@ -65,7 +65,7 @@ public unsafe partial struct PipelineExecutablePropertiesKHR "VK_KHR_pipeline_executable_properties+VK_VERSION_1_1", ] )] - public PipelineExecutablePropertiesKhrDescription Description; + public PipelineExecutablePropertiesKHRDescription Description; [NativeName("subgroupSize")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKhrDescription.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKHRDescription.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKhrDescription.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKHRDescription.gen.cs index 98a785eccc..5087c7a96f 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKhrDescription.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKHRDescription.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_description_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PipelineExecutablePropertiesKhrDescription +public partial struct PipelineExecutablePropertiesKHRDescription { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKhrName.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKHRName.gen.cs similarity index 91% rename from sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKhrName.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKHRName.gen.cs index 2ef8155c5c..34610b935b 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKhrName.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutablePropertiesKHRName.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_name_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PipelineExecutablePropertiesKhrName +public partial struct PipelineExecutablePropertiesKHRName { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKHR.gen.cs index afd8dd8105..68684fac74 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKHR.gen.cs @@ -43,7 +43,7 @@ public unsafe partial struct PipelineExecutableStatisticKHR "VK_KHR_pipeline_executable_properties+VK_VERSION_1_1", ] )] - public PipelineExecutableStatisticKhrName Name; + public PipelineExecutableStatisticKHRName Name; [NativeName("description")] [SupportedApiProfile( @@ -54,7 +54,7 @@ public unsafe partial struct PipelineExecutableStatisticKHR "VK_KHR_pipeline_executable_properties+VK_VERSION_1_1", ] )] - public PipelineExecutableStatisticKhrDescription Description; + public PipelineExecutableStatisticKHRDescription Description; [NativeName("format")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKhrDescription.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKHRDescription.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKhrDescription.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKHRDescription.gen.cs index f0ac80cbde..415856170c 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKhrDescription.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKHRDescription.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_description_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PipelineExecutableStatisticKhrDescription +public partial struct PipelineExecutableStatisticKHRDescription { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKhrName.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKHRName.gen.cs similarity index 91% rename from sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKhrName.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKHRName.gen.cs index a375d53881..83ad7e8b27 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKhrName.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineExecutableStatisticKHRName.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_name_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PipelineExecutableStatisticKhrName +public partial struct PipelineExecutableStatisticKHRName { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineFragmentShadingRateStateCreateInfoKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineFragmentShadingRateStateCreateInfoKHR.gen.cs index 6bbf687e7a..501fbdc92e 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineFragmentShadingRateStateCreateInfoKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineFragmentShadingRateStateCreateInfoKHR.gen.cs @@ -58,5 +58,5 @@ public unsafe partial struct PipelineFragmentShadingRateStateCreateInfoKHR "VK_VERSION_1_2", ] )] - public PipelineFragmentShadingRateStateCreateInfoKhrCombinerOps CombinerOps; + public PipelineFragmentShadingRateStateCreateInfoKHRCombinerOps CombinerOps; } diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelineFragmentShadingRateStateCreateInfoKhrCombinerOps.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelineFragmentShadingRateStateCreateInfoKHRCombinerOps.gen.cs similarity index 97% rename from sources/Vulkan/Vulkan/Vulkan/PipelineFragmentShadingRateStateCreateInfoKhrCombinerOps.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PipelineFragmentShadingRateStateCreateInfoKHRCombinerOps.gen.cs index 610ce41098..09d0f5a570 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelineFragmentShadingRateStateCreateInfoKhrCombinerOps.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelineFragmentShadingRateStateCreateInfoKHRCombinerOps.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_combinerOps_e__FixedBuffer")] [InlineArray(2)] [SupportedApiProfile("vulkan")] -public partial struct PipelineFragmentShadingRateStateCreateInfoKhrCombinerOps +public partial struct PipelineFragmentShadingRateStateCreateInfoKHRCombinerOps { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelinePropertiesIdentifierEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelinePropertiesIdentifierEXT.gen.cs index 3399de1e61..033a8f07e2 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelinePropertiesIdentifierEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelinePropertiesIdentifierEXT.gen.cs @@ -42,5 +42,5 @@ public unsafe partial struct PipelinePropertiesIdentifierEXT "VK_EXT_pipeline_properties+VK_VERSION_1_1", ] )] - public PipelinePropertiesIdentifierExtPipelineIdentifier PipelineIdentifier; + public PipelinePropertiesIdentifierEXTPipelineIdentifier PipelineIdentifier; } diff --git a/sources/Vulkan/Vulkan/Vulkan/PipelinePropertiesIdentifierExtPipelineIdentifier.gen.cs b/sources/Vulkan/Vulkan/Vulkan/PipelinePropertiesIdentifierEXTPipelineIdentifier.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PipelinePropertiesIdentifierExtPipelineIdentifier.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/PipelinePropertiesIdentifierEXTPipelineIdentifier.gen.cs index 5ea1bbef40..094bcb22ea 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PipelinePropertiesIdentifierExtPipelineIdentifier.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/PipelinePropertiesIdentifierEXTPipelineIdentifier.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_pipelineIdentifier_e__FixedBuffer")] [InlineArray(16)] [SupportedApiProfile("vulkan")] -public partial struct PipelinePropertiesIdentifierExtPipelineIdentifier +public partial struct PipelinePropertiesIdentifierEXTPipelineIdentifier { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/RenderPassSubpassFeedbackInfoEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/RenderPassSubpassFeedbackInfoEXT.gen.cs index e438d100dc..0b5bac773a 100644 --- a/sources/Vulkan/Vulkan/Vulkan/RenderPassSubpassFeedbackInfoEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/RenderPassSubpassFeedbackInfoEXT.gen.cs @@ -31,7 +31,7 @@ public partial struct RenderPassSubpassFeedbackInfoEXT "VK_EXT_subpass_merge_feedback+VK_VERSION_1_1", ] )] - public RenderPassSubpassFeedbackInfoExtDescription Description; + public RenderPassSubpassFeedbackInfoEXTDescription Description; [NativeName("postMergeIndex")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKhrDescription.gen.cs b/sources/Vulkan/Vulkan/Vulkan/RenderPassSubpassFeedbackInfoEXTDescription.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKhrDescription.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/RenderPassSubpassFeedbackInfoEXTDescription.gen.cs index e3dfc1c0dd..524f869655 100644 --- a/sources/Vulkan/Vulkan/Vulkan/PerformanceCounterDescriptionKhrDescription.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/RenderPassSubpassFeedbackInfoEXTDescription.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_description_e__FixedBuffer")] [InlineArray(256)] [SupportedApiProfile("vulkan")] -public partial struct PerformanceCounterDescriptionKhrDescription +public partial struct RenderPassSubpassFeedbackInfoEXTDescription { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/ShaderModuleIdentifierEXT.gen.cs b/sources/Vulkan/Vulkan/Vulkan/ShaderModuleIdentifierEXT.gen.cs index 03390913c3..fd46feafdb 100644 --- a/sources/Vulkan/Vulkan/Vulkan/ShaderModuleIdentifierEXT.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/ShaderModuleIdentifierEXT.gen.cs @@ -58,5 +58,5 @@ public unsafe partial struct ShaderModuleIdentifierEXT "VK_VERSION_1_3", ] )] - public ShaderModuleIdentifierExtIdentifier Identifier; + public ShaderModuleIdentifierEXTIdentifier Identifier; } diff --git a/sources/Vulkan/Vulkan/Vulkan/ShaderModuleIdentifierExtIdentifier.gen.cs b/sources/Vulkan/Vulkan/Vulkan/ShaderModuleIdentifierEXTIdentifier.gen.cs similarity index 91% rename from sources/Vulkan/Vulkan/Vulkan/ShaderModuleIdentifierExtIdentifier.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/ShaderModuleIdentifierEXTIdentifier.gen.cs index 0bdc1fbe07..bd65d09623 100644 --- a/sources/Vulkan/Vulkan/Vulkan/ShaderModuleIdentifierExtIdentifier.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/ShaderModuleIdentifierEXTIdentifier.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_identifier_e__FixedBuffer")] [InlineArray(32)] [SupportedApiProfile("vulkan")] -public partial struct ShaderModuleIdentifierExtIdentifier +public partial struct ShaderModuleIdentifierEXTIdentifier { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/ShaderStatisticsInfoAMD.gen.cs b/sources/Vulkan/Vulkan/Vulkan/ShaderStatisticsInfoAMD.gen.cs index ff42a5f68d..90b1d3d7e1 100644 --- a/sources/Vulkan/Vulkan/Vulkan/ShaderStatisticsInfoAMD.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/ShaderStatisticsInfoAMD.gen.cs @@ -38,5 +38,5 @@ public partial struct ShaderStatisticsInfoAMD [NativeName("computeWorkGroupSize")] [SupportedApiProfile("vulkan", ["VK_AMD_shader_info"])] - public ShaderStatisticsInfoAmdComputeWorkGroupSize ComputeWorkGroupSize; + public ShaderStatisticsInfoAMDComputeWorkGroupSize ComputeWorkGroupSize; } diff --git a/sources/Vulkan/Vulkan/Vulkan/ShaderStatisticsInfoAmdComputeWorkGroupSize.gen.cs b/sources/Vulkan/Vulkan/Vulkan/ShaderStatisticsInfoAMDComputeWorkGroupSize.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/ShaderStatisticsInfoAmdComputeWorkGroupSize.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/ShaderStatisticsInfoAMDComputeWorkGroupSize.gen.cs index 27cb1d8d62..bd4f621b25 100644 --- a/sources/Vulkan/Vulkan/Vulkan/ShaderStatisticsInfoAmdComputeWorkGroupSize.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/ShaderStatisticsInfoAMDComputeWorkGroupSize.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_computeWorkGroupSize_e__FixedBuffer")] [InlineArray(3)] [SupportedApiProfile("vulkan")] -public partial struct ShaderStatisticsInfoAmdComputeWorkGroupSize +public partial struct ShaderStatisticsInfoAMDComputeWorkGroupSize { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/TransformMatrixKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/TransformMatrixKHR.gen.cs index f4738cc432..d607fcd235 100644 --- a/sources/Vulkan/Vulkan/Vulkan/TransformMatrixKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/TransformMatrixKHR.gen.cs @@ -21,5 +21,5 @@ public partial struct TransformMatrixKHR "VK_KHR_deferred_host_operations+VK_VERSION_1_2", ] )] - public TransformMatrixKhrMatrix Matrix; + public TransformMatrixKHRMatrix Matrix; } diff --git a/sources/Vulkan/Vulkan/Vulkan/TransformMatrixKhrMatrix.gen.cs b/sources/Vulkan/Vulkan/Vulkan/TransformMatrixKHRMatrix.gen.cs similarity index 92% rename from sources/Vulkan/Vulkan/Vulkan/TransformMatrixKhrMatrix.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/TransformMatrixKHRMatrix.gen.cs index 4e4539a9a0..50e6bcdcfc 100644 --- a/sources/Vulkan/Vulkan/Vulkan/TransformMatrixKhrMatrix.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/TransformMatrixKHRMatrix.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_matrix_e__FixedBuffer")] [InlineArray(3 * 4)] [SupportedApiProfile("vulkan")] -public partial struct TransformMatrixKhrMatrix +public partial struct TransformMatrixKHRMatrix { [NativeName("e0_0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/VideoDecodeAv1PictureInfoKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/VideoDecodeAv1PictureInfoKHR.gen.cs index 5a0f43fb19..90fbb40509 100644 --- a/sources/Vulkan/Vulkan/Vulkan/VideoDecodeAv1PictureInfoKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/VideoDecodeAv1PictureInfoKHR.gen.cs @@ -42,7 +42,7 @@ public unsafe partial struct VideoDecodeAv1PictureInfoKHR ["VK_KHR_video_decode_av1"], ImpliesSets = ["VK_KHR_video_decode_queue"] )] - public VideoDecodeAv1PictureInfoKhrReferenceNameSlotIndices ReferenceNameSlotIndices; + public VideoDecodeAv1PictureInfoKHRReferenceNameSlotIndices ReferenceNameSlotIndices; [NativeName("frameHeaderOffset")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/VideoDecodeAv1PictureInfoKhrReferenceNameSlotIndices.gen.cs b/sources/Vulkan/Vulkan/Vulkan/VideoDecodeAv1PictureInfoKHRReferenceNameSlotIndices.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/VideoDecodeAv1PictureInfoKhrReferenceNameSlotIndices.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/VideoDecodeAv1PictureInfoKHRReferenceNameSlotIndices.gen.cs index 2366c0fb58..b2393cbd5f 100644 --- a/sources/Vulkan/Vulkan/Vulkan/VideoDecodeAv1PictureInfoKhrReferenceNameSlotIndices.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/VideoDecodeAv1PictureInfoKHRReferenceNameSlotIndices.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_referenceNameSlotIndices_e__FixedBuffer")] [InlineArray(7)] [SupportedApiProfile("vulkan")] -public partial struct VideoDecodeAv1PictureInfoKhrReferenceNameSlotIndices +public partial struct VideoDecodeAv1PictureInfoKHRReferenceNameSlotIndices { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/VideoDecodeVp9PictureInfoKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/VideoDecodeVp9PictureInfoKHR.gen.cs index 5d182704e4..c6a7ff5ab9 100644 --- a/sources/Vulkan/Vulkan/Vulkan/VideoDecodeVp9PictureInfoKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/VideoDecodeVp9PictureInfoKHR.gen.cs @@ -41,7 +41,7 @@ public unsafe partial struct VideoDecodeVp9PictureInfoKHR ["VK_KHR_video_decode_vp9"], ImpliesSets = ["VK_KHR_video_decode_queue"] )] - public VideoDecodeVp9PictureInfoKhrReferenceNameSlotIndices ReferenceNameSlotIndices; + public VideoDecodeVp9PictureInfoKHRReferenceNameSlotIndices ReferenceNameSlotIndices; [NativeName("uncompressedHeaderOffset")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/VideoDecodeVp9PictureInfoKhrReferenceNameSlotIndices.gen.cs b/sources/Vulkan/Vulkan/Vulkan/VideoDecodeVp9PictureInfoKHRReferenceNameSlotIndices.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/VideoDecodeVp9PictureInfoKhrReferenceNameSlotIndices.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/VideoDecodeVp9PictureInfoKHRReferenceNameSlotIndices.gen.cs index 440db46db7..78b884b45f 100644 --- a/sources/Vulkan/Vulkan/Vulkan/VideoDecodeVp9PictureInfoKhrReferenceNameSlotIndices.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/VideoDecodeVp9PictureInfoKHRReferenceNameSlotIndices.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_referenceNameSlotIndices_e__FixedBuffer")] [InlineArray(3)] [SupportedApiProfile("vulkan")] -public partial struct VideoDecodeVp9PictureInfoKhrReferenceNameSlotIndices +public partial struct VideoDecodeVp9PictureInfoKHRReferenceNameSlotIndices { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/sources/Vulkan/Vulkan/Vulkan/VideoEncodeAv1PictureInfoKHR.gen.cs b/sources/Vulkan/Vulkan/Vulkan/VideoEncodeAv1PictureInfoKHR.gen.cs index dbf5460fb2..ef8754bab0 100644 --- a/sources/Vulkan/Vulkan/Vulkan/VideoEncodeAv1PictureInfoKHR.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/VideoEncodeAv1PictureInfoKHR.gen.cs @@ -65,7 +65,7 @@ public unsafe partial struct VideoEncodeAv1PictureInfoKHR ["VK_KHR_video_encode_av1"], ImpliesSets = ["VK_KHR_video_encode_queue"] )] - public VideoEncodeAv1PictureInfoKhrReferenceNameSlotIndices ReferenceNameSlotIndices; + public VideoEncodeAv1PictureInfoKHRReferenceNameSlotIndices ReferenceNameSlotIndices; [NativeName("primaryReferenceCdfOnly")] [SupportedApiProfile( diff --git a/sources/Vulkan/Vulkan/Vulkan/VideoEncodeAv1PictureInfoKhrReferenceNameSlotIndices.gen.cs b/sources/Vulkan/Vulkan/Vulkan/VideoEncodeAv1PictureInfoKHRReferenceNameSlotIndices.gen.cs similarity index 90% rename from sources/Vulkan/Vulkan/Vulkan/VideoEncodeAv1PictureInfoKhrReferenceNameSlotIndices.gen.cs rename to sources/Vulkan/Vulkan/Vulkan/VideoEncodeAv1PictureInfoKHRReferenceNameSlotIndices.gen.cs index d166afde1d..10a02cf16c 100644 --- a/sources/Vulkan/Vulkan/Vulkan/VideoEncodeAv1PictureInfoKhrReferenceNameSlotIndices.gen.cs +++ b/sources/Vulkan/Vulkan/Vulkan/VideoEncodeAv1PictureInfoKHRReferenceNameSlotIndices.gen.cs @@ -11,7 +11,7 @@ namespace Silk.NET.Vulkan; [NativeName("_referenceNameSlotIndices_e__FixedBuffer")] [InlineArray(7)] [SupportedApiProfile("vulkan")] -public partial struct VideoEncodeAv1PictureInfoKhrReferenceNameSlotIndices +public partial struct VideoEncodeAv1PictureInfoKHRReferenceNameSlotIndices { [NativeName("e0")] [SupportedApiProfile("vulkan")] diff --git a/tests/SilkTouch/SilkTouch/Naming/NamePrettifierTests.cs b/tests/SilkTouch/SilkTouch/Naming/NamePrettifierTests.cs index 206162a001..b60e81f769 100644 --- a/tests/SilkTouch/SilkTouch/Naming/NamePrettifierTests.cs +++ b/tests/SilkTouch/SilkTouch/Naming/NamePrettifierTests.cs @@ -71,17 +71,21 @@ public string AcronymsWithNumbers2(string input, int longAcronymThreshold = 0) = public string ConsecutiveAcronyms(string input, int longAcronymThreshold = 0) => new NamePrettifier(longAcronymThreshold).Prettify(input); + /// + /// C# identifiers cannot start with numbers, but no longer handles this + /// in favor of calling separately. + /// [Theory] - // C# identifiers cannot start with numbers - [TestCase("123", ExpectedResult = "X123")] - [TestCase("123Hello", ExpectedResult = "X123Hello")] + [TestCase("123", ExpectedResult = "123")] + [TestCase("123Hello", ExpectedResult = "123Hello")] public string StartsWithNumber(string input, int longAcronymThreshold = 0) => new NamePrettifier(longAcronymThreshold).Prettify(input); [Theory] // Add x between numbers to maintain separation - [TestCase("123_123_123", ExpectedResult = "X123x123x123")] + [TestCase("123_123_123", ExpectedResult = "123x123x123")] [TestCase("Hello123_123_123", ExpectedResult = "Hello123x123x123")] + [TestCase("Hello123X123X123", ExpectedResult = "Hello123x123x123")] public string ConsecutiveNumbers(string input, int longAcronymThreshold = 0) => new NamePrettifier(longAcronymThreshold).Prettify(input); @@ -171,4 +175,18 @@ public void Lowercase_AfterNumber_IsPartOf_NewWord() Assert.That(nameTransformer.Prettify("MONO16f"), Is.EqualTo("Mono16F")); } } + + [Test] + public void EmptyInput_IsAllowed() + { + var nameTransformer = new NamePrettifier(4); + nameTransformer.Prettify(""); + } + + [Test] + public void EmptyOutput_IsAllowed() + { + var nameTransformer = new NamePrettifier(4); + nameTransformer.Prettify("_"); + } } diff --git a/tests/SilkTouch/SilkTouch/Naming/NameTrimmerTests.cs b/tests/SilkTouch/SilkTouch/Naming/NameTrimmerTests.cs index c2dcdae2f8..6b0ff019fe 100644 --- a/tests/SilkTouch/SilkTouch/Naming/NameTrimmerTests.cs +++ b/tests/SilkTouch/SilkTouch/Naming/NameTrimmerTests.cs @@ -27,8 +27,8 @@ public void SimpleGlfwTestDetermination(string? hint) GetPrefix(null, hint, test, null, null, false, true)?.Prefix, Is.EqualTo("GLFW") ); - Trim( - new NameTrimmerContext + ProcessNames( + new NameProcessorContext { Configuration = new PrettifyNames.Configuration { @@ -66,8 +66,8 @@ public void RegressionFragmentShaderColorModMaskATI() { "GL_NEGATE_BIT_ATI", new CandidateNames("GL_NEGATE_BIT_ATI", []) }, { "GL_BIAS_BIT_ATI", new CandidateNames("GL_BIAS_BIT_ATI", []) }, }; - Trim( - new NameTrimmerContext + ProcessNames( + new NameProcessorContext { Container = "FragmentShaderColorModMaskATI", Configuration = new PrettifyNames.Configuration { GlobalPrefixHints = ["gl"] }, @@ -77,7 +77,7 @@ public void RegressionFragmentShaderColorModMaskATI() ); var expected = new Dictionary { - { "GL_2X_BIT_ATI", "X2XBitAti" }, + { "GL_2X_BIT_ATI", "2XBitAti" }, { "GL_COMP_BIT_ATI", "CompBitAti" }, { "GL_NEGATE_BIT_ATI", "NegateBitAti" }, { "GL_BIAS_BIT_ATI", "BiasBitAti" }, @@ -96,8 +96,8 @@ public void RegressionEvalTargetNV() { "GL_EVAL_2D_NV", new CandidateNames("GL_EVAL_2D_NV", []) }, { "GL_EVAL_TRIANGULAR_2D_NV", new CandidateNames("GL_EVAL_TRIANGULAR_2D_NV", []) }, }; - Trim( - new NameTrimmerContext + ProcessNames( + new NameProcessorContext { Container = "EvalTargetNV", Configuration = new PrettifyNames.Configuration { GlobalPrefixHints = ["gl"] }, @@ -123,7 +123,7 @@ public void RegressionSingleMemberEnumUsesGlobalPrefixHint() { { "GL_FILL_NV", new CandidateNames("GL_FILL_NV", []) }, }; - var ctx = new NameTrimmerContext + var ctx = new NameProcessorContext { Configuration = new PrettifyNames.Configuration { GlobalPrefixHints = ["gl"] }, Container = "EvalMapsModeNV", @@ -131,7 +131,7 @@ public void RegressionSingleMemberEnumUsesGlobalPrefixHint() Names = names, }; var uut = new NameTrimmer(); - uut.Trim(ctx); + uut.ProcessNames(ctx); Assert.That(names["GL_FILL_NV"].Primary, Is.EqualTo("FILL_NV")); } @@ -142,7 +142,7 @@ public void MultipleGlobalPrefixHints() { { "ALC_CONTEXT_DEBUG_BIT_EXT", new CandidateNames("ALC_CONTEXT_DEBUG_BIT_EXT", []) }, }; - var ctx = new NameTrimmerContext + var ctx = new NameProcessorContext { Configuration = new PrettifyNames.Configuration { GlobalPrefixHints = ["alc", "al"] }, Container = "ContextFlagsEXT", @@ -150,7 +150,7 @@ public void MultipleGlobalPrefixHints() Names = names, }; var uut = new NameTrimmer(); - uut.Trim(ctx); + uut.ProcessNames(ctx); Assert.That( names["ALC_CONTEXT_DEBUG_BIT_EXT"].Primary, Is.EqualTo("CONTEXT_DEBUG_BIT_EXT") diff --git a/tests/SilkTouch/SilkTouch/Naming/PrettifyNamesTests.SuccessfullyUsesReferencedAffixes.verified.txt b/tests/SilkTouch/SilkTouch/Naming/PrettifyNamesTests.SuccessfullyUsesReferencedAffixes.verified.txt new file mode 100644 index 0000000000..df3e0cb7be --- /dev/null +++ b/tests/SilkTouch/SilkTouch/Naming/PrettifyNamesTests.SuccessfullyUsesReferencedAffixes.verified.txt @@ -0,0 +1,14 @@ +[NameAffix("Suffix", "Test", "ShouldBeInOutputName")] +public struct GamepadBindingShouldBeInOutputName +{ +} + +[NameAffix("Prefix", "NestedStructParent", nameof(GamepadBindingShouldBeInOutputName))] +public struct GamepadBindingShouldBeInOutputNameInput +{ +} + +[NameAffix("Prefix", "NestedStructParent", nameof(GamepadBindingShouldBeInOutputNameInput))] +public struct GamepadBindingShouldBeInOutputNameInputAxis +{ +} \ No newline at end of file diff --git a/tests/SilkTouch/SilkTouch/Naming/PrettifyNamesTests.cs b/tests/SilkTouch/SilkTouch/Naming/PrettifyNamesTests.cs index d4576a8c84..7013d0e78a 100644 --- a/tests/SilkTouch/SilkTouch/Naming/PrettifyNamesTests.cs +++ b/tests/SilkTouch/SilkTouch/Naming/PrettifyNamesTests.cs @@ -4,7 +4,6 @@ using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging.Abstractions; using Silk.NET.SilkTouch.Mods; -using Silk.NET.SilkTouch.Naming; namespace Silk.NET.SilkTouch.UnitTests.Naming; @@ -39,8 +38,7 @@ public enum OcclusionQueryParameterNameNV var prettifyNames = new PrettifyNames( NullLogger.Instance, - new DummyOptions(new PrettifyNames.Configuration()), - [new DummyJobDependency([new NameTrimmer()])] + new DummyOptions(new PrettifyNames.Configuration()) ); await prettifyNames.ExecuteAsync(context); @@ -73,8 +71,7 @@ public enum VocalMorpherPhoneme var prettifyNames = new PrettifyNames( NullLogger.Instance, - new DummyOptions(new PrettifyNames.Configuration()), - [new DummyJobDependency([new NameTrimmer()])] + new DummyOptions(new PrettifyNames.Configuration()) ); await prettifyNames.ExecuteAsync(context); @@ -103,8 +100,7 @@ public enum VkPresentIdKHR { } var prettifyNames = new PrettifyNames( NullLogger.Instance, - new DummyOptions(new PrettifyNames.Configuration()), - [new DummyJobDependency([new NameTrimmer()])] + new DummyOptions(new PrettifyNames.Configuration()) ); await prettifyNames.ExecuteAsync(context); @@ -138,8 +134,7 @@ public enum OcclusionQueryParameterNameNV var prettifyNames = new PrettifyNames( NullLogger.Instance, - new DummyOptions(new PrettifyNames.Configuration()), - [new DummyJobDependency([new NameTrimmer()])] + new DummyOptions(new PrettifyNames.Configuration()) ); await prettifyNames.ExecuteAsync(context); @@ -181,8 +176,7 @@ public enum OcclusionQueryParameterNameNV NullLogger.Instance, new DummyOptions( new PrettifyNames.Configuration() { GlobalPrefixHints = ["gl"] } - ), - [new DummyJobDependency([new NameTrimmer()])] + ) ); await prettifyNames.ExecuteAsync(context); @@ -210,8 +204,7 @@ public enum OcclusionQueryParameterNameNV var prettifyNames = new PrettifyNames( NullLogger.Instance, - new DummyOptions(new PrettifyNames.Configuration()), - [new DummyJobDependency([new NameTrimmer()])] + new DummyOptions(new PrettifyNames.Configuration()) ); await prettifyNames.ExecuteAsync(context); @@ -255,8 +248,7 @@ public enum OcclusionQueryParameterNameNV NullLogger.Instance, new DummyOptions( new PrettifyNames.Configuration() { GlobalPrefixHints = ["gl"] } - ), - [new DummyJobDependency([new NameTrimmer()])] + ) ); await prettifyNames.ExecuteAsync(context); @@ -287,8 +279,7 @@ public enum OcclusionQueryParameterNameNV var prettifyNames = new PrettifyNames( NullLogger.Instance, - new DummyOptions(new PrettifyNames.Configuration()), - [new DummyJobDependency([new NameTrimmer()])] + new DummyOptions(new PrettifyNames.Configuration()) ); await prettifyNames.ExecuteAsync(context); @@ -327,8 +318,7 @@ public enum VkPresentModeKHR var prettifyNames = new PrettifyNames( NullLogger.Instance, - new DummyOptions(new PrettifyNames.Configuration()), - [new DummyJobDependency([new NameTrimmer()])] + new DummyOptions(new PrettifyNames.Configuration()) ); await prettifyNames.ExecuteAsync(context); @@ -354,8 +344,7 @@ public async Task TrimsPrefix_WhenMatchingHint() NullLogger.Instance, new DummyOptions( new PrettifyNames.Configuration() { GlobalPrefixHints = ["vk"] } - ), - [new DummyJobDependency([new NameTrimmer()])] + ) ); await prettifyNames.ExecuteAsync(context); @@ -382,8 +371,7 @@ public async Task DoesNotTrimTypeName_WhenNotMatchingHint_AndOnlyOneType() NullLogger.Instance, new DummyOptions( new PrettifyNames.Configuration() { GlobalPrefixHints = ["gl"] } - ), - [new DummyJobDependency([new NameTrimmer()])] + ) ); await prettifyNames.ExecuteAsync(context); @@ -419,8 +407,7 @@ public enum InternalFormat NullLogger.Instance, new DummyOptions( new PrettifyNames.Configuration() { LongAcronymThreshold = 3 } - ), - [new DummyJobDependency([new NameTrimmer()])] + ) ); await prettifyNames.ExecuteAsync(context); @@ -470,8 +457,7 @@ public enum ALEnum NullLogger.Instance, new DummyOptions( new PrettifyNames.Configuration() { LongAcronymThreshold = 4 } - ), - [new DummyJobDependency([new NameTrimmer()])] + ) ); await prettifyNames.ExecuteAsync(context); @@ -529,8 +515,7 @@ public void alFilteri() { } }, }, } - ), - [new DummyJobDependency([new NameTrimmer()])] + ) ); await prettifyNames.ExecuteAsync(context); @@ -562,8 +547,7 @@ public enum GLEnum { } NullLogger.Instance, new DummyOptions( new PrettifyNames.Configuration() { GlobalPrefixHints = ["gl"] } - ), - [new DummyJobDependency([new NameTrimmer()])] + ) ); await prettifyNames.ExecuteAsync(context); @@ -572,4 +556,126 @@ [new DummyJobDependency([new NameTrimmer()])] var result = await context.SourceProject.Documents.First().GetSyntaxRootAsync(); await Verify(result!.NormalizeWhitespace().ToString()); } + + [Test] + public async Task SuccessfullyUsesReferencedAffixes() + { + var project = TestUtils + .CreateTestProject() + .AddDocument( + "SDL.gen.cs", + """ + [NameAffix("Suffix", "Test", "ShouldBeInOutputName")] + public struct GamepadBinding { } + + [NameAffix("Prefix", "NestedStructParent", nameof(GamepadBinding))] + public struct GamepadBindingInput { } + + [NameAffix("Prefix", "NestedStructParent", nameof(GamepadBindingInput))] + public struct GamepadBindingInputAxis { } + """ + ) + .Project; + + var context = new DummyModContext() { SourceProject = project }; + + var prettifyNames = new PrettifyNames( + NullLogger.Instance, + new DummyOptions(new PrettifyNames.Configuration()) + ); + + await prettifyNames.ExecuteAsync(context); + + // All names should start with GamepadBindingShouldBeInOutputName + var result = await context.SourceProject.Documents.First().GetSyntaxRootAsync(); + await Verify(result!.NormalizeWhitespace().ToString()); + } + + [Test] + public void CycleInReferencedAffixes_Throws() + { + var project = TestUtils + .CreateTestProject() + .AddDocument( + "Test.gen.cs", + """ + [NameAffix("Suffix", "Test", nameof(B))] + public struct A { } + + [NameAffix("Suffix", "Test", nameof(A))] + public struct B { } + """ + ) + .Project; + + var context = new DummyModContext() { SourceProject = project }; + + var prettifyNames = new PrettifyNames( + NullLogger.Instance, + new DummyOptions(new PrettifyNames.Configuration()) + ); + + Assert.ThrowsAsync(async () => + { + await prettifyNames.ExecuteAsync(context); + }); + } + + [Test] + public void MissingReferencedAffix_Throws() + { + var project = TestUtils + .CreateTestProject() + .AddDocument( + "Test.gen.cs", + """ + [NameAffix("Suffix", "Test", nameof(B))] + public struct A { } + """ + ) + .Project; + + var context = new DummyModContext() { SourceProject = project }; + + var prettifyNames = new PrettifyNames( + NullLogger.Instance, + new DummyOptions(new PrettifyNames.Configuration()) + ); + + Assert.ThrowsAsync(async () => + { + await prettifyNames.ExecuteAsync(context); + }); + } + + [Test] + public void ReferencedAffixExists_ButInDifferentContainer_Throws() + { + // This test is here because referencing names in different containers is currently not supported + var project = TestUtils + .CreateTestProject() + .AddDocument( + "Test.gen.cs", + """ + public struct A + { + [NameAffix("Suffix", "Test", nameof(A))] + public static int B; + } + """ + ) + .Project; + + var context = new DummyModContext() { SourceProject = project }; + + var prettifyNames = new PrettifyNames( + NullLogger.Instance, + new DummyOptions(new PrettifyNames.Configuration()) + ); + + Assert.ThrowsAsync(async () => + { + await prettifyNames.ExecuteAsync(context); + }); + } }