Skip to content

Commit 9c5094a

Browse files
authored
add enum mappings for a few recently added extensions (#194)
1 parent 7ea5da7 commit 9c5094a

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

intercept/src/cli_ext.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,11 @@ cl_int CL_API_CALL clGetKernelSubGroupInfoKHR(
523523
#define CL_DEVICE_SCHEDULING_KERNEL_BATCHING_ARM (1 << 0)
524524
#define CL_DEVICE_SCHEDULING_WORKGROUP_BATCH_SIZE_ARM (1 << 1)
525525
#define CL_DEVICE_SCHEDULING_WORKGROUP_BATCH_SIZE_MODIFIER_ARM (1 << 2)
526+
#define CL_DEVICE_SCHEDULING_DEFERRED_FLUSH_ARM (1 << 3)
526527
#define CL_KERNEL_EXEC_INFO_WORKGROUP_BATCH_SIZE_ARM 0x41E5
527528
#define CL_KERNEL_EXEC_INFO_WORKGROUP_BATCH_SIZE_MODIFIER_ARM 0x41E6
528529
#define CL_QUEUE_KERNEL_BATCHING_ARM 0x41E7
530+
#define CL_QUEUE_DEFERRED_FLUSH_ARM 0x41EC
529531

530532
///////////////////////////////////////////////////////////////////////////////
531533
// cl_intel_accelerator
@@ -579,6 +581,40 @@ cl_int CL_API_CALL clReleaseAcceleratorINTEL(
579581
#define CL_ME_VERSION_LEGACY_INTEL 0x0
580582
#define CL_ME_VERSION_ADVANCED_VER_1_INTEL 0x1
581583

584+
///////////////////////////////////////////////////////////////////////////////
585+
// cl_intel_command_queue_families
586+
typedef cl_bitfield cl_command_queue_capabilities_intel;
587+
588+
#define CL_QUEUE_FAMILY_MAX_NAME_SIZE_INTEL 64
589+
typedef struct _cl_queue_family_properties_intel {
590+
cl_command_queue_properties properties;
591+
cl_command_queue_capabilities_intel capabilities;
592+
cl_uint count;
593+
char name[CL_QUEUE_FAMILY_MAX_NAME_SIZE_INTEL];
594+
} cl_queue_family_properties_intel;
595+
596+
#define CL_DEVICE_QUEUE_FAMILY_PROPERTIES_INTEL 0x418B
597+
#define CL_QUEUE_FAMILY_INTEL 0x418C
598+
#define CL_QUEUE_INDEX_INTEL 0x418D
599+
600+
#define CL_QUEUE_DEFAULT_CAPABILITIES_INTEL 0
601+
#define CL_QUEUE_CAPABILITY_CREATE_SINGLE_QUEUE_EVENTS_INTEL (1 << 0)
602+
#define CL_QUEUE_CAPABILITY_CREATE_CROSS_QUEUE_EVENTS_INTEL (1 << 1)
603+
#define CL_QUEUE_CAPABILITY_SINGLE_QUEUE_EVENT_WAIT_LIST_INTEL (1 << 2)
604+
#define CL_QUEUE_CAPABILITY_CROSS_QUEUE_EVENT_WAIT_LIST_INTEL (1 << 3)
605+
#define CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_INTEL (1 << 8)
606+
#define CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_RECT_INTEL (1 << 9)
607+
#define CL_QUEUE_CAPABILITY_MAP_BUFFER_INTEL (1 << 10)
608+
#define CL_QUEUE_CAPABILITY_FILL_BUFFER_INTEL (1 << 11)
609+
#define CL_QUEUE_CAPABILITY_TRANSFER_IMAGE_INTEL (1 << 12)
610+
#define CL_QUEUE_CAPABILITY_MAP_IMAGE_INTEL (1 << 13)
611+
#define CL_QUEUE_CAPABILITY_FILL_IMAGE_INTEL (1 << 14)
612+
#define CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_IMAGE_INTEL (1 << 15)
613+
#define CL_QUEUE_CAPABILITY_TRANSFER_IMAGE_BUFFER_INTEL (1 << 16)
614+
#define CL_QUEUE_CAPABILITY_MARKER_INTEL (1 << 24)
615+
#define CL_QUEUE_CAPABILITY_BARRIER_INTEL (1 << 25)
616+
#define CL_QUEUE_CAPABILITY_KERNEL_INTEL (1 << 26)
617+
582618
///////////////////////////////////////////////////////////////////////////////
583619
// cl_intel_driver_diagnostics
584620

@@ -665,6 +701,11 @@ cl_int CL_API_CALL clEnqueueReleaseDX9ObjectsINTEL(
665701

666702
#define CL_EGL_YUV_PLANE_INTEL 0x4107
667703

704+
///////////////////////////////////////////////////////////////////////////////
705+
// cl_intel_mem_channel_property
706+
707+
#define CL_MEM_CHANNEL_INTEL 0x4213
708+
668709
///////////////////////////////////////////////////////////////////////////////
669710
// cl_intel_mem_force_host_memory
670711

intercept/src/enummap.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ CEnumNameMap::CEnumNameMap()
810810
ADD_ENUM_NAME( m_cl_int, CL_KERNEL_EXEC_INFO_WORKGROUP_BATCH_SIZE_ARM );
811811
ADD_ENUM_NAME( m_cl_int, CL_KERNEL_EXEC_INFO_WORKGROUP_BATCH_SIZE_MODIFIER_ARM );
812812
ADD_ENUM_NAME( m_cl_int, CL_QUEUE_KERNEL_BATCHING_ARM );
813+
ADD_ENUM_NAME( m_cl_int, CL_QUEUE_DEFERRED_FLUSH_ARM );
813814

814815
// cl_intel_accelerator
815816
ADD_ENUM_NAME( m_cl_int, CL_INVALID_ACCELERATOR_INTEL );
@@ -826,6 +827,28 @@ CEnumNameMap::CEnumNameMap()
826827
// cl_intel_advanced_motion_estimation
827828
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_ME_VERSION_INTEL );
828829

830+
// cl_intel_command_queue_families
831+
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_QUEUE_FAMILY_PROPERTIES_INTEL );
832+
ADD_ENUM_NAME( m_cl_int, CL_QUEUE_FAMILY_INTEL );
833+
ADD_ENUM_NAME( m_cl_int, CL_QUEUE_INDEX_INTEL );
834+
835+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_CREATE_SINGLE_QUEUE_EVENTS_INTEL );
836+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_CREATE_CROSS_QUEUE_EVENTS_INTEL );
837+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_SINGLE_QUEUE_EVENT_WAIT_LIST_INTEL );
838+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_CROSS_QUEUE_EVENT_WAIT_LIST_INTEL );
839+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_INTEL );
840+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_RECT_INTEL );
841+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_MAP_BUFFER_INTEL );
842+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_FILL_BUFFER_INTEL );
843+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_TRANSFER_IMAGE_INTEL );
844+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_MAP_IMAGE_INTEL );
845+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_FILL_IMAGE_INTEL );
846+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_IMAGE_INTEL );
847+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_TRANSFER_IMAGE_BUFFER_INTEL );
848+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_MARKER_INTEL );
849+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_BARRIER_INTEL );
850+
ADD_ENUM_NAME( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_KERNEL_INTEL );
851+
829852
// cl_intel_driver_diagnostics
830853
ADD_ENUM_NAME( m_cl_int, CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL );
831854

@@ -856,6 +879,9 @@ CEnumNameMap::CEnumNameMap()
856879
// cl_intel_egl_image_yuv
857880
ADD_ENUM_NAME( m_cl_int, CL_EGL_YUV_PLANE_INTEL );
858881

882+
// cl_intel_mem_channel_property
883+
ADD_ENUM_NAME( m_cl_int, CL_MEM_CHANNEL_INTEL );
884+
859885
// cl_intel_mem_force_host_memory
860886
ADD_ENUM_NAME( m_cl_mem_flags, CL_MEM_FORCE_HOST_MEMORY_INTEL );
861887

intercept/src/enummap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ class CEnumNameMap
106106
GENERATE_MAP_AND_FUNC( name_build_status, cl_build_status );
107107
GENERATE_MAP_AND_FUNC( name_command_exec_status, cl_command_exec_status );
108108
GENERATE_MAP_AND_BITFIELD_FUNC( name_command_queue_properties, cl_command_queue_properties );
109+
GENERATE_MAP_AND_BITFIELD_FUNC( name_command_queue_capabilities, cl_command_queue_capabilities_intel );
109110
GENERATE_MAP_AND_BITFIELD_FUNC( name_device_affinity_domain, cl_device_affinity_domain );
110111
GENERATE_MAP_AND_BITFIELD_FUNC( name_device_atomic_capabilities, cl_device_atomic_capabilities );
111112
GENERATE_MAP_AND_BITFIELD_FUNC( name_device_device_enqueue_capabilities, cl_device_device_enqueue_capabilities );

0 commit comments

Comments
 (0)