@@ -12,14 +12,26 @@ Capitalization Conventions: https://learn.microsoft.com/en-us/dotnet/standard/de
1212
1313## High-Level Overview
1414
15- This section explains how names flow through the SilkTouch generator pipeline:
15+ This section explains how names flow through the SilkTouch generator pipeline.
16+ This section uses ` vkCreateSwapchainKHR ` from Vulkan as an example.
17+
18+ 1 . Names enter the pipeline from native sources (eg: C header files).
19+ - Eg: ` vkCreateSwapchainKHR ` as input from Vulkan during the ` ClangScraper ` mod.
1620
17- 1 . Names enter the pipeline from native sources (eg: C header files)
18- - Eg: ``
19212 . Mods add metadata to each name as C# attributes.
20- - Eg: ` [NativeName] ` , ` [NameAffix] `
22+ - ` [NativeName("vkCreateSwapchainKHR")] ` from ` MarkNativeNames `
23+ - ` [NameAffix("Suffix", "KhronosVendor", "KHR")] ` from ` MixKhronosData `
24+ - ` [NameAffix("Prefix", "SharedPrefix", "vk")] ` from ` IdentifySharedPrefixes `
25+
21263 . ` PrettifyNames ` uses the metadata to transform the names according to user-provided configuration.
22- 4 . Metadata is stripped from the generated bindings.
27+ - The affixes are first stripped → ` CreateSwapchain `
28+ - The base name is "prettified" (pascal-casing, removal of underscores) → ` CreateSwapchain ` (No change)
29+ - Affixes are reapplied according to user configuration → ` CreateSwapchainKHR `
30+ - We usually remove shared prefixes and preserve Khronos vendor suffixes.
31+
32+ 4 . Unwanted metadata is stripped from the generated bindings to keep the output clean.
33+ - ` [NativeName] ` is kept. ` [NameAffix] ` is removed.
34+ - Tip: Disabling the ` StripAttributes ` mod can be helpful for debugging unwanted outputs.
2335
2436(TODO: Elaborate more and provide examples)
2537
0 commit comments