Skip to content

Commit

Permalink
add enums for recently added extensions (#353)
Browse files Browse the repository at this point in the history
cl_khr_kernel_clock
cl_img_cached_allocations
cl_img_cancel_command
cl_img_generate_mipmap
cl_img_mem_properties
cl_img_yuv_image
  • Loading branch information
bashbaug committed Apr 17, 2024
1 parent d9ebd67 commit edfb3ef
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
40 changes: 40 additions & 0 deletions intercept/src/cli_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,17 @@ typedef cl_bitfield cl_device_integer_dot_product_capabilities_khr;

#define CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES_KHR 0x1073

///////////////////////////////////////////////////////////////////////////////
// cl_khr_kernel_clock

typedef cl_bitfield cl_device_kernel_clock_capabilities_khr;

#define CL_DEVICE_KERNEL_CLOCK_CAPABILITIES_KHR 0x1076

#define CL_DEVICE_KERNEL_CLOCK_SCOPE_DEVICE_KHR (1 << 0)
#define CL_DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP_KHR (1 << 1)
#define CL_DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP_KHR (1 << 2)

///////////////////////////////////////////////////////////////////////////////
// cl_khr_pci_bus_info

Expand Down Expand Up @@ -1116,6 +1127,35 @@ cl_int CL_API_CALL clGetImageRequirementsInfoEXT(
#define CL_QUEUE_DEFERRED_FLUSH_ARM 0x41EC
#define CL_QUEUE_COMPUTE_UNIT_LIMIT_ARM 0x41F3

///////////////////////////////////////////////////////////////////////////////
// cl_img_cached_allocations

#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26)
#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27)

///////////////////////////////////////////////////////////////////////////////
// cl_img_cancel_command

#define CL_CANCELLED_IMG -1126

///////////////////////////////////////////////////////////////////////////////
// cl_img_generate_mipmap

#define CL_COMMAND_GENERATE_MIPMAP_IMG 0x40D6

///////////////////////////////////////////////////////////////////////////////
// cl_img_mem_properties

#define CL_MEM_ALLOC_FLAGS_IMG 0x40D7

#define CL_DEVICE_MEMORY_CAPABILITIES_IMG 0x40D8

///////////////////////////////////////////////////////////////////////////////
// cl_img_yuv_image

#define CL_NV21_IMG 0x40D0
#define CL_YV12_IMG 0x40D1

///////////////////////////////////////////////////////////////////////////////
// cl_intel_accelerator

Expand Down
21 changes: 21 additions & 0 deletions intercept/src/enummap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,9 @@ CEnumNameMap::CEnumNameMap()
// cl_khr_integer_dot_product
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES_KHR );

// cl_khr_kernel_clock
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_KERNEL_CLOCK_CAPABILITIES_KHR );

// cl_khr_pci_bus_info extension
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_PCI_BUS_INFO_KHR );

Expand Down Expand Up @@ -964,6 +967,24 @@ CEnumNameMap::CEnumNameMap()
ADD_ENUM_NAME( m_cl_int, CL_QUEUE_DEFERRED_FLUSH_ARM );
ADD_ENUM_NAME( m_cl_int, CL_QUEUE_COMPUTE_UNIT_LIMIT_ARM );

// cl_img_cached_allocations
ADD_ENUM_NAME( m_cl_mem_flags, CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG );
ADD_ENUM_NAME( m_cl_mem_flags, CL_MEM_USE_CACHED_CPU_MEMORY_IMG );

// cl_img_cancel_command
ADD_ENUM_NAME( m_cl_int, CL_CANCELLED_IMG );

// cl_img_generate_mipmap
ADD_ENUM_NAME( m_cl_int, CL_COMMAND_GENERATE_MIPMAP_IMG );

// cl_img_mem_properties
ADD_ENUM_NAME( m_cl_int, CL_MEM_ALLOC_FLAGS_IMG );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_MEMORY_CAPABILITIES_IMG );

// cl_img_yuv_image
ADD_ENUM_NAME( m_cl_int, CL_NV21_IMG );
ADD_ENUM_NAME( m_cl_int, CL_YV12_IMG );

// cl_intel_accelerator
ADD_ENUM_NAME( m_cl_int, CL_INVALID_ACCELERATOR_INTEL );
ADD_ENUM_NAME( m_cl_int, CL_INVALID_ACCELERATOR_TYPE_INTEL );
Expand Down

0 comments on commit edfb3ef

Please sign in to comment.