Skip to content

Commit d5152c7

Browse files
authored
add support for common extensions (#21)
Some new extensions like the new loader info extension are common extensions, not tied to any specific platform. They should be queried using clGetExtensionFunctionAddress, not the per-platform clGetExtensionFunctionAddressForPlatform, and they can use a single global dispatch table rather than a per-platform dispatch table.
1 parent fbf45db commit d5152c7

File tree

5 files changed

+421
-225
lines changed

5 files changed

+421
-225
lines changed

scripts/call_all.c.mako

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ defaultValueForType = {
5353
'cl_dx9_media_adapter_set_khr' : 'CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR',
5454
'cl_dx9_media_adapter_type_khr' : 'CL_ADAPTER_D3D9_KHR',
5555
'cl_external_semaphore_handle_type_khr' : '0',
56+
'cl_icdl_info' : 'CL_ICDL_OCL_VERSION',
5657
'cl_image_pitch_info_qcom' : 'CL_IMAGE_ROW_ALIGNMENT_QCOM',
5758
'cl_image_requirements_info_ext' : 'CL_IMAGE_REQUIREMENTS_SIZE_EXT',
5859
'cl_kernel_exec_info_arm' : 'CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM',
@@ -158,9 +159,12 @@ def getCallArgs(params):
158159
#include <CL/cl_va_api_media_sharing_intel.h>
159160
#endif
160161

161-
// Some headers to not include function prototypes for the DX sharing extensions.
162+
// Some headers do not include function prototypes for the DX sharing extensions.
162163
#include "dx_sharing_prototypes.h"
163164

165+
// Some headers do not include function prototypes for the loader info extension.
166+
#include "loader_info_prototypes.h"
167+
164168
void call_all(void)
165169
{
166170
%for extension in sorted(spec.findall('extensions/extension'), key=getExtensionSortKey):

0 commit comments

Comments
 (0)