Skip to content

Commit 21df0a8

Browse files
committed
Globally replace FlagBits with Flags in identifier names
Bit invasive, but since all FlagBits enums are already treated the same way, this ensures that everything is processed consistently. This also avoids the need to tell ClangSharp to remap these enums.
1 parent 360b77c commit 21df0a8

File tree

51 files changed

+198
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+198
-196
lines changed

.silktouch/ce8a69a66cd3bd3f.stout

0 Bytes
Binary file not shown.

sources/SilkTouch/SilkTouch/Mods/MixKhronosData.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,6 +1884,8 @@ private class Rewriter(JobData job, ILogger logger) : CSharpSyntaxRewriter(true)
18841884

18851885
return base.VisitFieldDeclaration(node);
18861886
}
1887+
1888+
public override SyntaxNode? VisitIdentifierName(IdentifierNameSyntax node) => IdentifierName(node.Identifier.ToString().Replace("FlagBits", "Flags"));
18871889
}
18881890

18891891
[SuppressMessage("ReSharper", "MoveLocalFunctionAfterJumpStatement")]

sources/Vulkan/Vulkan/Vulkan/AttachmentDescription.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public partial struct AttachmentDescription
3232
["VK_VERSION_1_0", "VK_VERSION_1_1", "VK_VERSION_1_2", "VK_VERSION_1_3", "VK_VERSION_1_4"],
3333
MinVersion = "1.0"
3434
)]
35-
public VkSampleCountFlagBits Samples;
35+
public SampleCountFlags Samples;
3636

3737
[SupportedApiProfile(
3838
"vulkan",

sources/Vulkan/Vulkan/Vulkan/AttachmentDescription2.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public unsafe partial struct AttachmentDescription2
4747
["VK_VERSION_1_2", "VK_VERSION_1_3", "VK_VERSION_1_4"],
4848
MinVersion = "1.2"
4949
)]
50-
public VkSampleCountFlagBits Samples;
50+
public SampleCountFlags Samples;
5151

5252
[SupportedApiProfile(
5353
"vulkan",

sources/Vulkan/Vulkan/Vulkan/AttachmentSampleCountInfoAMD.gen.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public unsafe partial struct AttachmentSampleCountInfoAMD
4949
"VK_AMD_mixed_attachment_samples+VK_VERSION_1_3",
5050
]
5151
)]
52-
public VkSampleCountFlagBits* PColorAttachmentSamples;
52+
public SampleCountFlags* PColorAttachmentSamples;
5353

5454
[SupportedApiProfile(
5555
"vulkan",
@@ -58,5 +58,5 @@ public unsafe partial struct AttachmentSampleCountInfoAMD
5858
"VK_AMD_mixed_attachment_samples+VK_VERSION_1_3",
5959
]
6060
)]
61-
public VkSampleCountFlagBits DepthStencilAttachmentSamples;
61+
public SampleCountFlags DepthStencilAttachmentSamples;
6262
}

sources/Vulkan/Vulkan/Vulkan/BindImagePlaneMemoryInfo.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ public unsafe partial struct BindImagePlaneMemoryInfo
3232
["VK_VERSION_1_1", "VK_VERSION_1_2", "VK_VERSION_1_3", "VK_VERSION_1_4"],
3333
MinVersion = "1.1"
3434
)]
35-
public VkImageAspectFlagBits PlaneAspect;
35+
public ImageAspectFlags PlaneAspect;
3636
}

sources/Vulkan/Vulkan/Vulkan/CheckpointDataNV.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public unsafe partial struct CheckpointDataNV
4040
"VK_NV_device_diagnostic_checkpoints+VK_VERSION_1_1",
4141
]
4242
)]
43-
public VkPipelineStageFlagBits Stage;
43+
public PipelineStageFlags Stage;
4444

4545
[SupportedApiProfile(
4646
"vulkan",

sources/Vulkan/Vulkan/Vulkan/CommandBufferInheritanceRenderPassTransformInfoQCOM.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public unsafe partial struct CommandBufferInheritanceRenderPassTransformInfoQCOM
1919
public void* PNext;
2020

2121
[SupportedApiProfile("vulkan", ["VK_QCOM_render_pass_transform"])]
22-
public VkSurfaceTransformFlagBitsKHR Transform;
22+
public SurfaceTransformFlagsKHR Transform;
2323

2424
[SupportedApiProfile("vulkan", ["VK_QCOM_render_pass_transform"])]
2525
public Rect2D RenderArea;

sources/Vulkan/Vulkan/Vulkan/CommandBufferInheritanceRenderingInfo.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ public unsafe partial struct CommandBufferInheritanceRenderingInfo
4242
public Format StencilAttachmentFormat;
4343

4444
[SupportedApiProfile("vulkan", ["VK_VERSION_1_3", "VK_VERSION_1_4"], MinVersion = "1.3")]
45-
public VkSampleCountFlagBits RasterizationSamples;
45+
public SampleCountFlags RasterizationSamples;
4646
}

sources/Vulkan/Vulkan/Vulkan/CopyCommandTransformInfoQCOM.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ public unsafe partial struct CopyCommandTransformInfoQCOM
4141
"VK_QCOM_rotated_copy_commands+VK_VERSION_1_3",
4242
]
4343
)]
44-
public VkSurfaceTransformFlagBitsKHR Transform;
44+
public SurfaceTransformFlagsKHR Transform;
4545
}

0 commit comments

Comments
 (0)