Skip to content

Commit 8baad9b

Browse files
authored
Prevent empty "ungroupable" enums from being output and fix EnumGroupRegression test case (#2525)
This fixes the Constants_* and enums_* groups from being output for the OpenCL XML spec in the EnumGroupRegression test case. The change to cl_compiler_mode_altera is justifiable since it is an empty enum.
1 parent 1b20646 commit 8baad9b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

sources/SilkTouch/SilkTouch/Mods/MixKhronosData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,7 @@ var group in (groupName is null ? Enumerable.Empty<string>() : [groupName])
22782278
}
22792279

22802280
// Some enum groups don't have members, meaning that the code above won't catch them
2281-
if (groupName != null && !data.Groups.ContainsKey(groupName))
2281+
if (groupName != null && !IsUngroupable(groupName) && !data.Groups.ContainsKey(groupName))
22822282
{
22832283
data.Groups[groupName] = new EnumGroup(
22842284
groupName,

tests/SilkTouch/SilkTouch/Khronos/MixKhronosDataTests.EnumGroupRegression.cl.xml.verified.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Added Group: cl_arm_svm_alloc_flags
1515
Existing Group: cl_command_queue_properties
1616
Added: CL_QUEUE_RESERVED_QCOM
1717

18+
Added Group: cl_compiler_mode_altera
19+
1820
Added Group: cl_device_command_buffer_capabilities_khr
1921
Added: CL_COMMAND_BUFFER_CAPABILITY_DEVICE_SIDE_ENQUEUE_KHR
2022
Added: CL_COMMAND_BUFFER_CAPABILITY_KERNEL_PRINTF_KHR

0 commit comments

Comments
 (0)