diff --git a/loader/icd_dispatch_generated.c b/loader/icd_dispatch_generated.c index 3aa788ac..605c6da4 100644 --- a/loader/icd_dispatch_generated.c +++ b/loader/icd_dispatch_generated.c @@ -6823,6 +6823,59 @@ static cl_int CL_API_CALL clGetKernelSubGroupInfoKHR_disp( /////////////////////////////////////////////////////////////////////////////// +// cl_khr_suggested_local_work_size + +CL_API_ENTRY cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSizeKHR( + cl_command_queue command_queue, + cl_kernel kernel, + cl_uint work_dim, + const size_t* global_work_offset, + const size_t* global_work_size, + size_t* suggested_local_work_size) +{ +#if defined(CL_ENABLE_LAYERS) + if (khrFirstLayer) + return khrFirstLayer->dispatch.clGetKernelSuggestedLocalWorkSizeKHR( + command_queue, + kernel, + work_dim, + global_work_offset, + global_work_size, + suggested_local_work_size); +#endif // defined(CL_ENABLE_LAYERS) + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE); + KHR_ICD_VALIDATE_POINTER_RETURN_ERROR(command_queue->dispatch->clGetKernelSuggestedLocalWorkSizeKHR); + return command_queue->dispatch->clGetKernelSuggestedLocalWorkSizeKHR( + command_queue, + kernel, + work_dim, + global_work_offset, + global_work_size, + suggested_local_work_size); +} +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSizeKHR_disp( + cl_command_queue command_queue, + cl_kernel kernel, + cl_uint work_dim, + const size_t* global_work_offset, + const size_t* global_work_size, + size_t* suggested_local_work_size) +{ + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE); + KHR_ICD_VALIDATE_POINTER_RETURN_ERROR(command_queue->dispatch->clGetKernelSuggestedLocalWorkSizeKHR); + return command_queue->dispatch->clGetKernelSuggestedLocalWorkSizeKHR( + command_queue, + kernel, + work_dim, + global_work_offset, + global_work_size, + suggested_local_work_size); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// + #if defined(CL_ENABLE_LAYERS) struct _cl_icd_dispatch khrMasterDispatch = { &clGetPlatformIDs_disp, @@ -7027,6 +7080,9 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clCreateBufferWithProperties_disp, &clCreateImageWithProperties_disp, &clSetContextDestructorCallback_disp + + /* cl_khr_suggested_local_work_size */ + &clGetKernelSuggestedLocalWorkSizeKHR_disp, }; #endif // defined(CL_ENABLE_LAYERS) #ifdef __cplusplus diff --git a/scripts/icd_dispatch_generated.c.mako b/scripts/icd_dispatch_generated.c.mako index 05a26fc5..004f011c 100644 --- a/scripts/icd_dispatch_generated.c.mako +++ b/scripts/icd_dispatch_generated.c.mako @@ -184,7 +184,8 @@ icdextensions = [ 'cl_khr_egl_image', 'cl_khr_gl_event', 'cl_khr_gl_sharing', - 'cl_khr_subgroups' + 'cl_khr_subgroups', + 'cl_khr_suggested_local_work_size' ] win32extensions = { 'cl_khr_d3d10_sharing', @@ -482,6 +483,9 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clCreateBufferWithProperties_disp, &clCreateImageWithProperties_disp, &clSetContextDestructorCallback_disp + + /* cl_khr_suggested_local_work_size */ + &clGetKernelSuggestedLocalWorkSizeKHR_disp, }; #endif // defined(CL_ENABLE_LAYERS) #ifdef __cplusplus diff --git a/scripts/icd_print_layer_generated.c.mako b/scripts/icd_print_layer_generated.c.mako index 3ef38d53..388f2042 100644 --- a/scripts/icd_print_layer_generated.c.mako +++ b/scripts/icd_print_layer_generated.c.mako @@ -59,7 +59,8 @@ icdextensions = [ 'cl_khr_egl_image', 'cl_khr_gl_event', 'cl_khr_gl_sharing', - 'cl_khr_subgroups' + 'cl_khr_subgroups', + 'cl_khr_suggested_local_work_size' ] win32extensions = { 'cl_khr_d3d10_sharing', @@ -307,4 +308,7 @@ void _init_dispatch(void) { dispatch.clCreateBufferWithProperties = &clCreateBufferWithProperties_wrap; dispatch.clCreateImageWithProperties = &clCreateImageWithProperties_wrap; dispatch.clSetContextDestructorCallback = &clSetContextDestructorCallback_wrap; + + /* cl_khr_suggested_local_work_size */ + dispatch.clGetKernelSuggestedLocalWorkSizeKHR = &clGetKernelSuggestedLocalWorkSizeKHR_wrap; } diff --git a/test/layer/icd_print_layer_generated.c b/test/layer/icd_print_layer_generated.c index ee9d19e5..cac0b91f 100644 --- a/test/layer/icd_print_layer_generated.c +++ b/test/layer/icd_print_layer_generated.c @@ -2540,6 +2540,27 @@ return tdispatch->clGetKernelSubGroupInfoKHR( /////////////////////////////////////////////////////////////////////////////// +// cl_khr_suggested_local_work_size +static cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSizeKHR_wrap( + cl_command_queue command_queue, + cl_kernel kernel, + cl_uint work_dim, + const size_t* global_work_offset, + const size_t* global_work_size, + size_t* suggested_local_work_size) CL_API_SUFFIX__VERSION_3_0 +{ +printf("clGetKernelSuggestedLocalWorkSizeKHR\n"); +return tdispatch->clGetKernelSuggestedLocalWorkSizeKHR( + command_queue, + kernel, + work_dim, + global_work_offset, + global_work_size, + suggested_local_work_size); +} + +/////////////////////////////////////////////////////////////////////////////// + void _init_dispatch(void) { dispatch.clGetPlatformIDs = &clGetPlatformIDs_wrap; dispatch.clGetPlatformInfo = &clGetPlatformInfo_wrap; @@ -2743,4 +2764,7 @@ void _init_dispatch(void) { dispatch.clCreateBufferWithProperties = &clCreateBufferWithProperties_wrap; dispatch.clCreateImageWithProperties = &clCreateImageWithProperties_wrap; dispatch.clSetContextDestructorCallback = &clSetContextDestructorCallback_wrap; + + /* cl_khr_suggested_local_work_size */ + dispatch.clGetKernelSuggestedLocalWorkSizeKHR = &clGetKernelSuggestedLocalWorkSizeKHR_wrap; }