Skip to content

Commit

Permalink
Pull upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
SunSerega committed Apr 3, 2024
1 parent 35ad6f4 commit 5789628
Show file tree
Hide file tree
Showing 18 changed files with 314 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DataScraping/Reps/OpenCL-Docs
Submodule OpenCL-Docs updated from a4b828 to d83dfe
Binary file modified DataScraping/XML/OpenCL/funcs.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions Log/OpenCL.log
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Dumping Id
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Dumping Struct items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Dumping Delegate items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: PascalBasicType: Packed 12 items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Group: Packed 112 items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Group: Packed 113 items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: IdClass: Packed 28 items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Struct: Packed 17 items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Delegate: Packed 7 items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Func: Packed 241 items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Feature: Packed 1 items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Extension: Packed 130 items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Extension: Packed 134 items
Template[OpenCL]: TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]: Cleanup
Template[OpenCL]: Finished runing TemplateCommand[LowLvl/OpenCL/Pack Essentials.exe]
Finished runing Template[OpenCL]
Expand Down
6 changes: 3 additions & 3 deletions Log/PullUpstream.log
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ ScrapXML[OpenCL]: Parsing "cl"
ScrapXML[OpenCL]: Constructing named items
ScrapXML[OpenCL]: Saving as binary
ScrapXML[OpenCL]: VendorSuffix: Saved 11 items
ScrapXML[OpenCL]: Enum: Saved 1129 items
ScrapXML[OpenCL]: Enum: Saved 1133 items
ScrapXML[OpenCL]: BasicType: Saved 30 items
ScrapXML[OpenCL]: Group: Saved 120 items
ScrapXML[OpenCL]: Group: Saved 121 items
ScrapXML[OpenCL]: IdClass: Saved 18 items
ScrapXML[OpenCL]: Struct: Saved 16 items
ScrapXML[OpenCL]: Delegate: Saved 8 items
ScrapXML[OpenCL]: Func: Saved 241 items
ScrapXML[OpenCL]: Feature: Saved 7 items
ScrapXML[OpenCL]: Extension: Saved 130 items
ScrapXML[OpenCL]: Extension: Saved 134 items
ScrapXML[OpenCL]: Done
Finished runing ScrapXML[OpenCL]
Runing ScrapXML[OpenGL]
Expand Down
87 changes: 87 additions & 0 deletions Modules.Packed/OpenCL.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,7 @@ clDeviceInfo = record
public static property DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES: clDeviceInfo read new clDeviceInfo($1073);
public static property DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT: clDeviceInfo read new clDeviceInfo($1074);
public static property DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED: clDeviceInfo read new clDeviceInfo($1075);
public static property DEVICE_KERNEL_CLOCK_CAPABILITIES: clDeviceInfo read new clDeviceInfo($1076);
public static property DEVICE_COMMAND_BUFFER_CAPABILITIES: clDeviceInfo read new clDeviceInfo($12A9);
public static property DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES: clDeviceInfo read new clDeviceInfo($12AA);
public static property DEVICE_COMMAND_BUFFER_NUM_SYNC_DEVICES: clDeviceInfo read new clDeviceInfo($12AB);
Expand Down Expand Up @@ -2135,6 +2136,8 @@ clDeviceInfo = record
Result := 'DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT' else
if DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED = self then
Result := 'DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED' else
if DEVICE_KERNEL_CLOCK_CAPABILITIES = self then
Result := 'DEVICE_KERNEL_CLOCK_CAPABILITIES' else
if DEVICE_COMMAND_BUFFER_CAPABILITIES = self then
Result := 'DEVICE_COMMAND_BUFFER_CAPABILITIES' else
if DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES = self then
Expand Down Expand Up @@ -2355,6 +2358,61 @@ clDeviceIntegerDotProductCapabilities = record

end;

///
clDeviceKernelClockCapabilities = record
public val: UInt64;
public constructor(val: UInt64) := self.val := val;

public static property DEVICE_KERNEL_CLOCK_SCOPE_DEVICE: clDeviceKernelClockCapabilities read new clDeviceKernelClockCapabilities(1 shl 0);
public static property DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP: clDeviceKernelClockCapabilities read new clDeviceKernelClockCapabilities(1 shl 1);
public static property DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP: clDeviceKernelClockCapabilities read new clDeviceKernelClockCapabilities(1 shl 2);

public static function operator+(v1, v2: clDeviceKernelClockCapabilities) := new clDeviceKernelClockCapabilities(v1.val or v2.val);
public static function operator or(v1, v2: clDeviceKernelClockCapabilities) := new clDeviceKernelClockCapabilities(v1.val or v2.val);

public static function operator-(v1, v2: clDeviceKernelClockCapabilities) := new clDeviceKernelClockCapabilities(v1.val and not v2.val);

public static procedure operator+=(var v1: clDeviceKernelClockCapabilities; v2: clDeviceKernelClockCapabilities) := v1 := v1+v2;
public static procedure operator-=(var v1: clDeviceKernelClockCapabilities; v2: clDeviceKernelClockCapabilities) := v1 := v1-v2;

public static function operator in(v1, v2: clDeviceKernelClockCapabilities) := v1.val and v2.val = v1.val;

public function ToString: string; override;
begin
var res := new StringBuilder;
var left_val := self.val;
if left_val=0 then
begin
Result := 'clDeviceKernelClockCapabilities[0]';
exit;
end;
if DEVICE_KERNEL_CLOCK_SCOPE_DEVICE in self then
begin
res += 'DEVICE_KERNEL_CLOCK_SCOPE_DEVICE+';
left_val := left_val and not DEVICE_KERNEL_CLOCK_SCOPE_DEVICE.val;
end;
if DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP in self then
begin
res += 'DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP+';
left_val := left_val and not DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP.val;
end;
if DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP in self then
begin
res += 'DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP+';
left_val := left_val and not DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP.val;
end;
if left_val<>0 then
begin
res += 'clDeviceKernelClockCapabilities[';
res += self.val.ToString;
res += ']+';
end;
res.Length -= 1;
Result := res.ToString;
end;

end;

///
clDeviceLocalMemType = record
public val: UInt32;
Expand Down Expand Up @@ -10966,6 +11024,14 @@ cl_queue_family_properties = record
if param_value_validate_size and (param_value_ret_size<>param_value_sz) then
raise new InvalidOperationException($'Implementation returned a size of {param_value_ret_size} instead of {param_value_sz}');
end;
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo_DEVICE_KERNEL_CLOCK_CAPABILITIES(device: cl_device_id; var param_value: clDeviceKernelClockCapabilities; param_value_validate_size: boolean := false): clErrorCode;
begin
var param_value_sz := new UIntPtr(Marshal.SizeOf&<clDeviceKernelClockCapabilities>);
var param_value_ret_size: UIntPtr;
Result := GetDeviceInfo(device, clDeviceInfo.DEVICE_KERNEL_CLOCK_CAPABILITIES, param_value_sz,param_value,param_value_ret_size);
if param_value_validate_size and (param_value_ret_size<>param_value_sz) then
raise new InvalidOperationException($'Implementation returned a size of {param_value_ret_size} instead of {param_value_sz}');
end;
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo_DEVICE_COMMAND_BUFFER_CAPABILITIES(device: cl_device_id; var param_value: clDeviceCommandBufferCapabilities; param_value_validate_size: boolean := false): clErrorCode;
begin
var param_value_sz := new UIntPtr(Marshal.SizeOf&<clDeviceCommandBufferCapabilities>);
Expand Down Expand Up @@ -19574,6 +19640,12 @@ cl_queue_family_properties = record
public const ExtensionString = 'cl_khr_integer_dot_product';
end;

/// id: cl_khr_kernel_clock
/// version: provisional
clKernelClockKHR = static class
public const ExtensionString = 'cl_khr_kernel_clock';
end;

/// id: cl_khr_local_int32_base_atomics
/// promoted to: cl 1.1
clLocalInt32BaseAtomicsKHR = static class
Expand Down Expand Up @@ -19620,6 +19692,21 @@ cl_queue_family_properties = record
public const ExtensionString = 'cl_khr_spir';
end;

/// id: cl_khr_spirv_extended_debug_info
clSpirvExtendedDebugInfoKHR = static class
public const ExtensionString = 'cl_khr_spirv_extended_debug_info';
end;

/// id: cl_khr_spirv_linkonce_odr
clSpirvLinkonceOdrKHR = static class
public const ExtensionString = 'cl_khr_spirv_linkonce_odr';
end;

/// id: cl_khr_spirv_no_integer_wrap_decoration
clSpirvNoIntegerWrapDecorationKHR = static class
public const ExtensionString = 'cl_khr_spirv_no_integer_wrap_decoration';
end;

/// id: cl_khr_srgb_image_writes
clSrgbImageWritesKHR = static class
public const ExtensionString = 'cl_khr_srgb_image_writes';
Expand Down
8 changes: 7 additions & 1 deletion Modules.Packed/OpenCLABC.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2413,6 +2413,10 @@ CLDeviceProperties = class
begin
cl.GetDeviceInfo_DEVICE_MEMORY_CAPABILITIES(self.ntv, Result).RaiseIfError;
end;
private function GetKernelClockCapabilities: clDeviceKernelClockCapabilities;
begin
cl.GetDeviceInfo_DEVICE_KERNEL_CLOCK_CAPABILITIES(self.ntv, Result).RaiseIfError;
end;

public property &Type: clDeviceType read GetType;
public property VendorId: clKhronosVendorId read GetVendorId;
Expand Down Expand Up @@ -2592,6 +2596,7 @@ CLDeviceProperties = class
public property NumThreadsPerEu: UInt32 read GetNumThreadsPerEu;
public property FeatureCapabilities: clDeviceFeatureCapabilities read GetFeatureCapabilities;
public property MemoryCapabilities: clMemAllocFlagsIMG read GetMemoryCapabilities;
public property KernelClockCapabilities: clDeviceKernelClockCapabilities read GetKernelClockCapabilities;

private static procedure AddProp<T>(res: StringBuilder; get_prop: ()->T) :=
try
Expand Down Expand Up @@ -2779,7 +2784,8 @@ CLDeviceProperties = class
res += 'NumEusPerSubSlice = '; AddProp(res, GetNumEusPerSubSlice ); res += #10;
res += 'NumThreadsPerEu = '; AddProp(res, GetNumThreadsPerEu ); res += #10;
res += 'FeatureCapabilities = '; AddProp(res, GetFeatureCapabilities ); res += #10;
res += 'MemoryCapabilities = '; AddProp(res, GetMemoryCapabilities );
res += 'MemoryCapabilities = '; AddProp(res, GetMemoryCapabilities ); res += #10;
res += 'KernelClockCapabilities = '; AddProp(res, GetKernelClockCapabilities );
end;
public function ToString: string; override;
begin
Expand Down
87 changes: 87 additions & 0 deletions Packing/Descriptions/OpenCL.predoc
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,7 @@ type
public static property DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES: clDeviceInfo read new clDeviceInfo($1073);
public static property DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT: clDeviceInfo read new clDeviceInfo($1074);
public static property DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED: clDeviceInfo read new clDeviceInfo($1075);
public static property DEVICE_KERNEL_CLOCK_CAPABILITIES: clDeviceInfo read new clDeviceInfo($1076);
public static property DEVICE_COMMAND_BUFFER_CAPABILITIES: clDeviceInfo read new clDeviceInfo($12A9);
public static property DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES: clDeviceInfo read new clDeviceInfo($12AA);
public static property DEVICE_COMMAND_BUFFER_NUM_SYNC_DEVICES: clDeviceInfo read new clDeviceInfo($12AB);
Expand Down Expand Up @@ -2127,6 +2128,8 @@ type
Result := 'DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT' else
if DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED = self then
Result := 'DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED' else
if DEVICE_KERNEL_CLOCK_CAPABILITIES = self then
Result := 'DEVICE_KERNEL_CLOCK_CAPABILITIES' else
if DEVICE_COMMAND_BUFFER_CAPABILITIES = self then
Result := 'DEVICE_COMMAND_BUFFER_CAPABILITIES' else
if DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES = self then
Expand Down Expand Up @@ -2347,6 +2350,61 @@ type

end;

///
clDeviceKernelClockCapabilities = record
public val: UInt64;
public constructor(val: UInt64) := self.val := val;

public static property DEVICE_KERNEL_CLOCK_SCOPE_DEVICE: clDeviceKernelClockCapabilities read new clDeviceKernelClockCapabilities(1 shl 0);
public static property DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP: clDeviceKernelClockCapabilities read new clDeviceKernelClockCapabilities(1 shl 1);
public static property DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP: clDeviceKernelClockCapabilities read new clDeviceKernelClockCapabilities(1 shl 2);

public static function operator+(v1, v2: clDeviceKernelClockCapabilities) := new clDeviceKernelClockCapabilities(v1.val or v2.val);
public static function operator or(v1, v2: clDeviceKernelClockCapabilities) := new clDeviceKernelClockCapabilities(v1.val or v2.val);

public static function operator-(v1, v2: clDeviceKernelClockCapabilities) := new clDeviceKernelClockCapabilities(v1.val and not v2.val);

public static procedure operator+=(var v1: clDeviceKernelClockCapabilities; v2: clDeviceKernelClockCapabilities) := v1 := v1+v2;
public static procedure operator-=(var v1: clDeviceKernelClockCapabilities; v2: clDeviceKernelClockCapabilities) := v1 := v1-v2;

public static function operator in(v1, v2: clDeviceKernelClockCapabilities) := v1.val and v2.val = v1.val;

public function ToString: string; override;
begin
var res := new StringBuilder;
var left_val := self.val;
if left_val=0 then
begin
Result := 'clDeviceKernelClockCapabilities[0]';
exit;
end;
if DEVICE_KERNEL_CLOCK_SCOPE_DEVICE in self then
begin
res += 'DEVICE_KERNEL_CLOCK_SCOPE_DEVICE+';
left_val := left_val and not DEVICE_KERNEL_CLOCK_SCOPE_DEVICE.val;
end;
if DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP in self then
begin
res += 'DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP+';
left_val := left_val and not DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP.val;
end;
if DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP in self then
begin
res += 'DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP+';
left_val := left_val and not DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP.val;
end;
if left_val<>0 then
begin
res += 'clDeviceKernelClockCapabilities[';
res += self.val.ToString;
res += ']+';
end;
res.Length -= 1;
Result := res.ToString;
end;

end;

///
clDeviceLocalMemType = record
public val: UInt32;
Expand Down Expand Up @@ -10954,6 +11012,14 @@ type
if param_value_validate_size and (param_value_ret_size<>param_value_sz) then
raise new InvalidOperationException($'Implementation returned a size of {param_value_ret_size} instead of {param_value_sz}');
end;
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo_DEVICE_KERNEL_CLOCK_CAPABILITIES(device: cl_device_id; var param_value: clDeviceKernelClockCapabilities; param_value_validate_size: boolean := false): clErrorCode;
begin
var param_value_sz := new UIntPtr(Marshal.SizeOf&<clDeviceKernelClockCapabilities>);
var param_value_ret_size: UIntPtr;
Result := GetDeviceInfo(device, clDeviceInfo.DEVICE_KERNEL_CLOCK_CAPABILITIES, param_value_sz,param_value,param_value_ret_size);
if param_value_validate_size and (param_value_ret_size<>param_value_sz) then
raise new InvalidOperationException($'Implementation returned a size of {param_value_ret_size} instead of {param_value_sz}');
end;
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo_DEVICE_COMMAND_BUFFER_CAPABILITIES(device: cl_device_id; var param_value: clDeviceCommandBufferCapabilities; param_value_validate_size: boolean := false): clErrorCode;
begin
var param_value_sz := new UIntPtr(Marshal.SizeOf&<clDeviceCommandBufferCapabilities>);
Expand Down Expand Up @@ -19562,6 +19628,12 @@ type
public const ExtensionString = 'cl_khr_integer_dot_product';
end;

/// id: cl_khr_kernel_clock
/// version: provisional
clKernelClockKHR = static class
public const ExtensionString = 'cl_khr_kernel_clock';
end;

/// id: cl_khr_local_int32_base_atomics
/// promoted to: cl 1.1
clLocalInt32BaseAtomicsKHR = static class
Expand Down Expand Up @@ -19608,6 +19680,21 @@ type
public const ExtensionString = 'cl_khr_spir';
end;

/// id: cl_khr_spirv_extended_debug_info
clSpirvExtendedDebugInfoKHR = static class
public const ExtensionString = 'cl_khr_spirv_extended_debug_info';
end;

/// id: cl_khr_spirv_linkonce_odr
clSpirvLinkonceOdrKHR = static class
public const ExtensionString = 'cl_khr_spirv_linkonce_odr';
end;

/// id: cl_khr_spirv_no_integer_wrap_decoration
clSpirvNoIntegerWrapDecorationKHR = static class
public const ExtensionString = 'cl_khr_spirv_no_integer_wrap_decoration';
end;

/// id: cl_khr_srgb_image_writes
clSrgbImageWritesKHR = static class
public const ExtensionString = 'cl_khr_srgb_image_writes';
Expand Down
Loading

0 comments on commit 5789628

Please sign in to comment.