diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cb30797..7c784f2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -219,6 +219,31 @@ if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR OPENCL_ICD_LOADER_BUILD_TESTING) add_subdirectory (test) endif() +if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) + find_package(Python3 COMPONENTS Interpreter) + set(OPENCL_ICD_LOADER_XML_PATH CACHE FILEPATH "Path to cl.xml for OpenCL ICD Loader code generation") + set(OPENCL_ICD_LOADER_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated) + add_custom_target(icd_loader_generate + COMMAND ${CMAKE_COMMAND} -E make_directory ${OPENCL_ICD_LOADER_OUTPUT_DIRECTORY} + COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}/scripts + ${Python3_EXECUTABLE} gen_loader.py + -registry ${OPENCL_ICD_LOADER_XML_PATH} + -o ${OPENCL_ICD_LOADER_OUTPUT_DIRECTORY} + COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}/scripts + ${Python3_EXECUTABLE} gen_print_layer.py + -registry ${OPENCL_ICD_LOADER_XML_PATH} + -o ${OPENCL_ICD_LOADER_OUTPUT_DIRECTORY} + ) + add_custom_target(icd_loader_copy + COMMAND ${CMAKE_COMMAND} -E copy + ${OPENCL_ICD_LOADER_OUTPUT_DIRECTORY}/icd_dispatch_generated.c + ${CMAKE_CURRENT_SOURCE_DIR}/loader + COMMAND ${CMAKE_COMMAND} -E copy + ${OPENCL_ICD_LOADER_OUTPUT_DIRECTORY}/icd_print_layer_generated.c + ${CMAKE_CURRENT_SOURCE_DIR}/test/layer + ) +endif() + include (GNUInstallDirs) install( diff --git a/loader/icd.c b/loader/icd.c index bbd6ec3a..e07cc0c5 100644 --- a/loader/icd.c +++ b/loader/icd.c @@ -303,10 +303,10 @@ void khrIcdLayerAdd(const char *libraryName) if (khrFirstLayer) { targetDispatch = &(khrFirstLayer->dispatch); } else { - targetDispatch = &khrMasterDispatch; + targetDispatch = &khrActualDispatch; } - loaderDispatchNumEntries = sizeof(khrMasterDispatch)/sizeof(void*); + loaderDispatchNumEntries = sizeof(khrActualDispatch)/sizeof(void*); result = p_clInitLayer( loaderDispatchNumEntries, targetDispatch, @@ -430,3 +430,65 @@ void khrIcdContextPropertiesGetPlatform(const cl_context_properties *properties, } } +#if defined(CL_ENABLE_LAYERS) +extern struct _cl_icd_dispatch khrShutdownDispatch; +static struct KHRLayer shutdown_layer = {0}; +#endif + +void khrIcdShutdown(void) +{ + KHRicdVendor* prevVendor = NULL; + KHRicdVendor* vendor = NULL; + +#if defined(CL_ENABLE_LAYERS) + struct KHRLayer* layer = khrFirstLayer; + struct KHRLayer* nextLayer = NULL; +#endif + + KHR_ICD_TRACE("Shutdown starting\n"); + +#if defined(CL_ENABLE_LAYERS) + KHR_ICD_TRACE("Installing shutdown layer\n"); + shutdown_layer.dispatch = khrShutdownDispatch; + khrFirstLayer = &shutdown_layer; +#endif + +#if defined(CL_ENABLE_LAYERS) + // Layers are freed in the reverse order they were added, + // so front-to-back. + KHR_ICD_TRACE("Cleaning up Layers\n"); + // Handle the case where shutdown is called twice: + if (layer != &shutdown_layer) { + while (layer) { + nextLayer = layer->next; +#if defined(CL_LAYER_INFO) + free(layer->libraryName); +#endif + free(layer); + layer = nextLayer; + } + } +#endif + + // Vendors are freed in the reverse order they were added, + // so back-to-front. + KHR_ICD_TRACE("Cleaning up Vendors\n"); + while (khrIcdVendors) { + if (khrIcdVendors->next == NULL) { + vendor = khrIcdVendors; + khrIcdVendors = NULL; + } else { + prevVendor = khrIcdVendors; + vendor = khrIcdVendors->next; + while (vendor->next) { + prevVendor = vendor; + vendor = vendor->next; + } + prevVendor->next = NULL; + } + free(vendor->suffix); + free(vendor); + } + + KHR_ICD_TRACE("Shutdown complete\n"); +} diff --git a/loader/icd.h b/loader/icd.h index 93723aaf..3c0d85da 100644 --- a/loader/icd.h +++ b/loader/icd.h @@ -117,14 +117,14 @@ struct KHRLayer #ifdef CL_LAYER_INFO // The layer library name char *libraryName; - // the pointer to the clGetLayerInfo funciton + // the pointer to the clGetLayerInfo function void *p_clGetLayerInfo; #endif }; // the global layer state extern struct KHRLayer * khrFirstLayer; -extern struct _cl_icd_dispatch khrMasterDispatch; +extern struct _cl_icd_dispatch khrActualDispatch; #endif // defined(CL_ENABLE_LAYERS) /* @@ -175,6 +175,8 @@ void khrIcdContextPropertiesGetPlatform( const cl_context_properties *properties, cl_platform_id *outPlatform); +void khrIcdShutdown(void); + // internal tracing macros #define KHR_ICD_TRACE(...) \ do \ diff --git a/loader/icd_dispatch.c b/loader/icd_dispatch.c index 3eb18d27..4f3d73c4 100644 --- a/loader/icd_dispatch.c +++ b/loader/icd_dispatch.c @@ -65,6 +65,13 @@ clGetICDLoaderInfoOCLICD( return CL_SUCCESS; } +// !!! TODO: Switch this to use the function typedef when it's in the headers! +static cl_int CL_API_CALL clShutdownOCLICD(void) +{ + khrIcdShutdown(); + return CL_SUCCESS; +} + static void* khrIcdGetExtensionFunctionAddress(const char* function_name) { // Most extensions, including multi-vendor KHR and EXT extensions, @@ -139,6 +146,9 @@ static void* khrIcdGetExtensionFunctionAddress(const char* function_name) // cl_icdl KHR_ICD_CHECK_EXTENSION_FUNCTION(clGetICDLoaderInfoOCLICD); + // cl_icd_shutdown + KHR_ICD_CHECK_EXTENSION_FUNCTION(clShutdownOCLICD); + #undef KHR_ICD_CHECK_EXTENSION_FUNCTION return NULL; diff --git a/loader/icd_dispatch_generated.c b/loader/icd_dispatch_generated.c index 3aa788ac..04d5fed0 100644 --- a/loader/icd_dispatch_generated.c +++ b/loader/icd_dispatch_generated.c @@ -24,7 +24,7 @@ extern "C" { #endif /////////////////////////////////////////////////////////////////////////////// -// Core APIs: + #if defined(CL_ENABLE_LAYERS) extern cl_int CL_API_CALL clGetPlatformIDs_disp( cl_uint num_entries, @@ -32,6 +32,21 @@ extern cl_int CL_API_CALL clGetPlatformIDs_disp( cl_uint* num_platforms) CL_API_SUFFIX__VERSION_1_0; #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetPlatformIDs_shutdown( + cl_uint num_entries, + cl_platform_id* platforms, + cl_uint* num_platforms) +{ + (void)num_entries; + (void)platforms; + (void)num_platforms; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// + CL_API_ENTRY cl_int CL_API_CALL clGetPlatformInfo( cl_platform_id platform, cl_platform_info param_name, @@ -57,7 +72,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetPlatformInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetPlatformInfo_disp( cl_platform_id platform, @@ -76,6 +90,23 @@ static cl_int CL_API_CALL clGetPlatformInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetPlatformInfo_shutdown( + cl_platform_id platform, + cl_platform_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)platform; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDs( @@ -103,7 +134,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDs( num_devices); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetDeviceIDs_disp( cl_platform_id platform, @@ -122,6 +152,23 @@ static cl_int CL_API_CALL clGetDeviceIDs_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetDeviceIDs_shutdown( + cl_platform_id platform, + cl_device_type device_type, + cl_uint num_entries, + cl_device_id* devices, + cl_uint* num_devices) +{ + (void)platform; + (void)device_type; + (void)num_entries; + (void)devices; + (void)num_devices; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetDeviceInfo( @@ -149,7 +196,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetDeviceInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetDeviceInfo_disp( cl_device_id device, @@ -168,6 +214,23 @@ static cl_int CL_API_CALL clGetDeviceInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetDeviceInfo_shutdown( + cl_device_id device, + cl_device_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)device; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_context CL_API_CALL clCreateContext( @@ -201,7 +264,6 @@ CL_API_ENTRY cl_context CL_API_CALL clCreateContext( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_context CL_API_CALL clCreateContext_disp( const cl_context_properties* properties, @@ -225,6 +287,24 @@ static cl_context CL_API_CALL clCreateContext_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_context CL_API_CALL clCreateContext_shutdown( + const cl_context_properties* properties, + cl_uint num_devices, + const cl_device_id* devices, + void (CL_CALLBACK* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data), + void* user_data, + cl_int* errcode_ret) +{ + (void)properties; + (void)num_devices; + (void)devices; + (void)pfn_notify; + (void)user_data; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_context CL_API_CALL clCreateContextFromType( @@ -255,7 +335,6 @@ CL_API_ENTRY cl_context CL_API_CALL clCreateContextFromType( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_context CL_API_CALL clCreateContextFromType_disp( const cl_context_properties* properties, @@ -277,6 +356,22 @@ static cl_context CL_API_CALL clCreateContextFromType_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_context CL_API_CALL clCreateContextFromType_shutdown( + const cl_context_properties* properties, + cl_device_type device_type, + void (CL_CALLBACK* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data), + void* user_data, + cl_int* errcode_ret) +{ + (void)properties; + (void)device_type; + (void)pfn_notify; + (void)user_data; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clRetainContext( @@ -292,7 +387,6 @@ CL_API_ENTRY cl_int CL_API_CALL clRetainContext( context); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clRetainContext_disp( cl_context context) @@ -303,6 +397,15 @@ static cl_int CL_API_CALL clRetainContext_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clRetainContext_shutdown( + cl_context context) +{ + (void)context; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clReleaseContext( @@ -318,7 +421,6 @@ CL_API_ENTRY cl_int CL_API_CALL clReleaseContext( context); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clReleaseContext_disp( cl_context context) @@ -329,6 +431,15 @@ static cl_int CL_API_CALL clReleaseContext_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clReleaseContext_shutdown( + cl_context context) +{ + (void)context; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetContextInfo( @@ -356,7 +467,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetContextInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetContextInfo_disp( cl_context context, @@ -375,6 +485,23 @@ static cl_int CL_API_CALL clGetContextInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetContextInfo_shutdown( + cl_context context, + cl_context_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)context; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clRetainCommandQueue( @@ -390,7 +517,6 @@ CL_API_ENTRY cl_int CL_API_CALL clRetainCommandQueue( command_queue); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clRetainCommandQueue_disp( cl_command_queue command_queue) @@ -401,6 +527,15 @@ static cl_int CL_API_CALL clRetainCommandQueue_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clRetainCommandQueue_shutdown( + cl_command_queue command_queue) +{ + (void)command_queue; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clReleaseCommandQueue( @@ -416,7 +551,6 @@ CL_API_ENTRY cl_int CL_API_CALL clReleaseCommandQueue( command_queue); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clReleaseCommandQueue_disp( cl_command_queue command_queue) @@ -427,6 +561,15 @@ static cl_int CL_API_CALL clReleaseCommandQueue_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clReleaseCommandQueue_shutdown( + cl_command_queue command_queue) +{ + (void)command_queue; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetCommandQueueInfo( @@ -454,7 +597,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetCommandQueueInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetCommandQueueInfo_disp( cl_command_queue command_queue, @@ -473,6 +615,23 @@ static cl_int CL_API_CALL clGetCommandQueueInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetCommandQueueInfo_shutdown( + cl_command_queue command_queue, + cl_command_queue_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)command_queue; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_mem CL_API_CALL clCreateBuffer( @@ -500,7 +659,6 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateBuffer( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateBuffer_disp( cl_context context, @@ -519,6 +677,22 @@ static cl_mem CL_API_CALL clCreateBuffer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateBuffer_shutdown( + cl_context context, + cl_mem_flags flags, + size_t size, + void* host_ptr, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)size; + (void)host_ptr; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clRetainMemObject( @@ -534,7 +708,6 @@ CL_API_ENTRY cl_int CL_API_CALL clRetainMemObject( memobj); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clRetainMemObject_disp( cl_mem memobj) @@ -545,6 +718,15 @@ static cl_int CL_API_CALL clRetainMemObject_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clRetainMemObject_shutdown( + cl_mem memobj) +{ + (void)memobj; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clReleaseMemObject( @@ -560,7 +742,6 @@ CL_API_ENTRY cl_int CL_API_CALL clReleaseMemObject( memobj); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clReleaseMemObject_disp( cl_mem memobj) @@ -571,6 +752,15 @@ static cl_int CL_API_CALL clReleaseMemObject_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clReleaseMemObject_shutdown( + cl_mem memobj) +{ + (void)memobj; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetSupportedImageFormats( @@ -601,7 +791,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetSupportedImageFormats( num_image_formats); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetSupportedImageFormats_disp( cl_context context, @@ -622,6 +811,25 @@ static cl_int CL_API_CALL clGetSupportedImageFormats_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetSupportedImageFormats_shutdown( + cl_context context, + cl_mem_flags flags, + cl_mem_object_type image_type, + cl_uint num_entries, + cl_image_format* image_formats, + cl_uint* num_image_formats) +{ + (void)context; + (void)flags; + (void)image_type; + (void)num_entries; + (void)image_formats; + (void)num_image_formats; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetMemObjectInfo( @@ -649,7 +857,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetMemObjectInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetMemObjectInfo_disp( cl_mem memobj, @@ -668,6 +875,23 @@ static cl_int CL_API_CALL clGetMemObjectInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetMemObjectInfo_shutdown( + cl_mem memobj, + cl_mem_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)memobj; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetImageInfo( @@ -695,7 +919,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetImageInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetImageInfo_disp( cl_mem image, @@ -714,6 +937,23 @@ static cl_int CL_API_CALL clGetImageInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetImageInfo_shutdown( + cl_mem image, + cl_image_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)image; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clRetainSampler( @@ -729,7 +969,6 @@ CL_API_ENTRY cl_int CL_API_CALL clRetainSampler( sampler); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clRetainSampler_disp( cl_sampler sampler) @@ -740,6 +979,15 @@ static cl_int CL_API_CALL clRetainSampler_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clRetainSampler_shutdown( + cl_sampler sampler) +{ + (void)sampler; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clReleaseSampler( @@ -755,7 +1003,6 @@ CL_API_ENTRY cl_int CL_API_CALL clReleaseSampler( sampler); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clReleaseSampler_disp( cl_sampler sampler) @@ -766,6 +1013,15 @@ static cl_int CL_API_CALL clReleaseSampler_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clReleaseSampler_shutdown( + cl_sampler sampler) +{ + (void)sampler; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetSamplerInfo( @@ -793,7 +1049,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetSamplerInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetSamplerInfo_disp( cl_sampler sampler, @@ -812,6 +1067,23 @@ static cl_int CL_API_CALL clGetSamplerInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetSamplerInfo_shutdown( + cl_sampler sampler, + cl_sampler_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)sampler; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithSource( @@ -839,7 +1111,6 @@ CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithSource( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_program CL_API_CALL clCreateProgramWithSource_disp( cl_context context, @@ -858,6 +1129,22 @@ static cl_program CL_API_CALL clCreateProgramWithSource_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_program CL_API_CALL clCreateProgramWithSource_shutdown( + cl_context context, + cl_uint count, + const char** strings, + const size_t* lengths, + cl_int* errcode_ret) +{ + (void)context; + (void)count; + (void)strings; + (void)lengths; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithBinary( @@ -891,7 +1178,6 @@ CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithBinary( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_program CL_API_CALL clCreateProgramWithBinary_disp( cl_context context, @@ -914,6 +1200,26 @@ static cl_program CL_API_CALL clCreateProgramWithBinary_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_program CL_API_CALL clCreateProgramWithBinary_shutdown( + cl_context context, + cl_uint num_devices, + const cl_device_id* device_list, + const size_t* lengths, + const unsigned char** binaries, + cl_int* binary_status, + cl_int* errcode_ret) +{ + (void)context; + (void)num_devices; + (void)device_list; + (void)lengths; + (void)binaries; + (void)binary_status; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clRetainProgram( @@ -929,7 +1235,6 @@ CL_API_ENTRY cl_int CL_API_CALL clRetainProgram( program); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clRetainProgram_disp( cl_program program) @@ -940,6 +1245,15 @@ static cl_int CL_API_CALL clRetainProgram_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clRetainProgram_shutdown( + cl_program program) +{ + (void)program; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clReleaseProgram( @@ -955,7 +1269,6 @@ CL_API_ENTRY cl_int CL_API_CALL clReleaseProgram( program); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clReleaseProgram_disp( cl_program program) @@ -966,6 +1279,15 @@ static cl_int CL_API_CALL clReleaseProgram_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clReleaseProgram_shutdown( + cl_program program) +{ + (void)program; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clBuildProgram( @@ -996,7 +1318,6 @@ CL_API_ENTRY cl_int CL_API_CALL clBuildProgram( user_data); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clBuildProgram_disp( cl_program program, @@ -1017,6 +1338,25 @@ static cl_int CL_API_CALL clBuildProgram_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clBuildProgram_shutdown( + cl_program program, + cl_uint num_devices, + const cl_device_id* device_list, + const char* options, + void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), + void* user_data) +{ + (void)program; + (void)num_devices; + (void)device_list; + (void)options; + (void)pfn_notify; + (void)user_data; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetProgramInfo( @@ -1044,7 +1384,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetProgramInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetProgramInfo_disp( cl_program program, @@ -1063,11 +1402,28 @@ static cl_int CL_API_CALL clGetProgramInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) -/////////////////////////////////////////////////////////////////////////////// - -CL_API_ENTRY cl_int CL_API_CALL clGetProgramBuildInfo( +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetProgramInfo_shutdown( cl_program program, - cl_device_id device, + cl_program_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)program; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// + +CL_API_ENTRY cl_int CL_API_CALL clGetProgramBuildInfo( + cl_program program, + cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void* param_value, @@ -1093,7 +1449,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetProgramBuildInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetProgramBuildInfo_disp( cl_program program, @@ -1114,6 +1469,25 @@ static cl_int CL_API_CALL clGetProgramBuildInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetProgramBuildInfo_shutdown( + cl_program program, + cl_device_id device, + cl_program_build_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)program; + (void)device; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_kernel CL_API_CALL clCreateKernel( @@ -1135,7 +1509,6 @@ CL_API_ENTRY cl_kernel CL_API_CALL clCreateKernel( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_kernel CL_API_CALL clCreateKernel_disp( cl_program program, @@ -1150,6 +1523,18 @@ static cl_kernel CL_API_CALL clCreateKernel_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_kernel CL_API_CALL clCreateKernel_shutdown( + cl_program program, + const char* kernel_name, + cl_int* errcode_ret) +{ + (void)program; + (void)kernel_name; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clCreateKernelsInProgram( @@ -1174,7 +1559,6 @@ CL_API_ENTRY cl_int CL_API_CALL clCreateKernelsInProgram( num_kernels_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clCreateKernelsInProgram_disp( cl_program program, @@ -1191,6 +1575,21 @@ static cl_int CL_API_CALL clCreateKernelsInProgram_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clCreateKernelsInProgram_shutdown( + cl_program program, + cl_uint num_kernels, + cl_kernel* kernels, + cl_uint* num_kernels_ret) +{ + (void)program; + (void)num_kernels; + (void)kernels; + (void)num_kernels_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clRetainKernel( @@ -1206,7 +1605,6 @@ CL_API_ENTRY cl_int CL_API_CALL clRetainKernel( kernel); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clRetainKernel_disp( cl_kernel kernel) @@ -1217,6 +1615,15 @@ static cl_int CL_API_CALL clRetainKernel_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clRetainKernel_shutdown( + cl_kernel kernel) +{ + (void)kernel; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clReleaseKernel( @@ -1232,7 +1639,6 @@ CL_API_ENTRY cl_int CL_API_CALL clReleaseKernel( kernel); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clReleaseKernel_disp( cl_kernel kernel) @@ -1243,6 +1649,15 @@ static cl_int CL_API_CALL clReleaseKernel_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clReleaseKernel_shutdown( + cl_kernel kernel) +{ + (void)kernel; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetKernelArg( @@ -1267,7 +1682,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetKernelArg( arg_value); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetKernelArg_disp( cl_kernel kernel, @@ -1284,6 +1698,21 @@ static cl_int CL_API_CALL clSetKernelArg_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetKernelArg_shutdown( + cl_kernel kernel, + cl_uint arg_index, + size_t arg_size, + const void* arg_value) +{ + (void)kernel; + (void)arg_index; + (void)arg_size; + (void)arg_value; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetKernelInfo( @@ -1311,7 +1740,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetKernelInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetKernelInfo_disp( cl_kernel kernel, @@ -1330,6 +1758,23 @@ static cl_int CL_API_CALL clGetKernelInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetKernelInfo_shutdown( + cl_kernel kernel, + cl_kernel_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)kernel; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetKernelWorkGroupInfo( @@ -1360,7 +1805,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetKernelWorkGroupInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetKernelWorkGroupInfo_disp( cl_kernel kernel, @@ -1381,6 +1825,25 @@ static cl_int CL_API_CALL clGetKernelWorkGroupInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetKernelWorkGroupInfo_shutdown( + cl_kernel kernel, + cl_device_id device, + cl_kernel_work_group_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)kernel; + (void)device; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clWaitForEvents( @@ -1402,7 +1865,6 @@ CL_API_ENTRY cl_int CL_API_CALL clWaitForEvents( event_list); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clWaitForEvents_disp( cl_uint num_events, @@ -1418,6 +1880,17 @@ static cl_int CL_API_CALL clWaitForEvents_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clWaitForEvents_shutdown( + cl_uint num_events, + const cl_event* event_list) +{ + (void)num_events; + (void)event_list; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetEventInfo( @@ -1445,7 +1918,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetEventInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetEventInfo_disp( cl_event event, @@ -1464,6 +1936,23 @@ static cl_int CL_API_CALL clGetEventInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetEventInfo_shutdown( + cl_event event, + cl_event_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)event; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clRetainEvent( @@ -1479,7 +1968,6 @@ CL_API_ENTRY cl_int CL_API_CALL clRetainEvent( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clRetainEvent_disp( cl_event event) @@ -1490,6 +1978,15 @@ static cl_int CL_API_CALL clRetainEvent_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clRetainEvent_shutdown( + cl_event event) +{ + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clReleaseEvent( @@ -1505,7 +2002,6 @@ CL_API_ENTRY cl_int CL_API_CALL clReleaseEvent( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clReleaseEvent_disp( cl_event event) @@ -1516,6 +2012,15 @@ static cl_int CL_API_CALL clReleaseEvent_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clReleaseEvent_shutdown( + cl_event event) +{ + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetEventProfilingInfo( @@ -1543,7 +2048,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetEventProfilingInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetEventProfilingInfo_disp( cl_event event, @@ -1562,6 +2066,23 @@ static cl_int CL_API_CALL clGetEventProfilingInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetEventProfilingInfo_shutdown( + cl_event event, + cl_profiling_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)event; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clFlush( @@ -1577,7 +2098,6 @@ CL_API_ENTRY cl_int CL_API_CALL clFlush( command_queue); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clFlush_disp( cl_command_queue command_queue) @@ -1588,6 +2108,15 @@ static cl_int CL_API_CALL clFlush_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clFlush_shutdown( + cl_command_queue command_queue) +{ + (void)command_queue; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clFinish( @@ -1603,7 +2132,6 @@ CL_API_ENTRY cl_int CL_API_CALL clFinish( command_queue); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clFinish_disp( cl_command_queue command_queue) @@ -1614,6 +2142,15 @@ static cl_int CL_API_CALL clFinish_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clFinish_shutdown( + cl_command_queue command_queue) +{ + (void)command_queue; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadBuffer( @@ -1653,7 +2190,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadBuffer( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueReadBuffer_disp( cl_command_queue command_queue, @@ -1680,6 +2216,31 @@ static cl_int CL_API_CALL clEnqueueReadBuffer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueReadBuffer_shutdown( + cl_command_queue command_queue, + cl_mem buffer, + cl_bool blocking_read, + size_t offset, + size_t size, + void* ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)buffer; + (void)blocking_read; + (void)offset; + (void)size; + (void)ptr; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteBuffer( @@ -1719,7 +2280,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteBuffer( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueWriteBuffer_disp( cl_command_queue command_queue, @@ -1746,6 +2306,31 @@ static cl_int CL_API_CALL clEnqueueWriteBuffer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueWriteBuffer_shutdown( + cl_command_queue command_queue, + cl_mem buffer, + cl_bool blocking_write, + size_t offset, + size_t size, + const void* ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)buffer; + (void)blocking_write; + (void)offset; + (void)size; + (void)ptr; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyBuffer( @@ -1785,7 +2370,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyBuffer( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueCopyBuffer_disp( cl_command_queue command_queue, @@ -1812,6 +2396,31 @@ static cl_int CL_API_CALL clEnqueueCopyBuffer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueCopyBuffer_shutdown( + cl_command_queue command_queue, + cl_mem src_buffer, + cl_mem dst_buffer, + size_t src_offset, + size_t dst_offset, + size_t size, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)src_buffer; + (void)dst_buffer; + (void)src_offset; + (void)dst_offset; + (void)size; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadImage( @@ -1857,7 +2466,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadImage( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueReadImage_disp( cl_command_queue command_queue, @@ -1888,6 +2496,35 @@ static cl_int CL_API_CALL clEnqueueReadImage_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueReadImage_shutdown( + cl_command_queue command_queue, + cl_mem image, + cl_bool blocking_read, + const size_t* origin, + const size_t* region, + size_t row_pitch, + size_t slice_pitch, + void* ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)image; + (void)blocking_read; + (void)origin; + (void)region; + (void)row_pitch; + (void)slice_pitch; + (void)ptr; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteImage( @@ -1933,7 +2570,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteImage( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueWriteImage_disp( cl_command_queue command_queue, @@ -1964,6 +2600,35 @@ static cl_int CL_API_CALL clEnqueueWriteImage_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueWriteImage_shutdown( + cl_command_queue command_queue, + cl_mem image, + cl_bool blocking_write, + const size_t* origin, + const size_t* region, + size_t input_row_pitch, + size_t input_slice_pitch, + const void* ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)image; + (void)blocking_write; + (void)origin; + (void)region; + (void)input_row_pitch; + (void)input_slice_pitch; + (void)ptr; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyImage( @@ -2003,7 +2668,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyImage( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueCopyImage_disp( cl_command_queue command_queue, @@ -2030,6 +2694,31 @@ static cl_int CL_API_CALL clEnqueueCopyImage_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueCopyImage_shutdown( + cl_command_queue command_queue, + cl_mem src_image, + cl_mem dst_image, + const size_t* src_origin, + const size_t* dst_origin, + const size_t* region, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)src_image; + (void)dst_image; + (void)src_origin; + (void)dst_origin; + (void)region; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyImageToBuffer( @@ -2069,7 +2758,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyImageToBuffer( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueCopyImageToBuffer_disp( cl_command_queue command_queue, @@ -2096,14 +2784,39 @@ static cl_int CL_API_CALL clEnqueueCopyImageToBuffer_disp( } #endif // defined(CL_ENABLE_LAYERS) -/////////////////////////////////////////////////////////////////////////////// - -CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyBufferToImage( +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueCopyImageToBuffer_shutdown( cl_command_queue command_queue, - cl_mem src_buffer, - cl_mem dst_image, - size_t src_offset, - const size_t* dst_origin, + cl_mem src_image, + cl_mem dst_buffer, + const size_t* src_origin, + const size_t* region, + size_t dst_offset, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)src_image; + (void)dst_buffer; + (void)src_origin; + (void)region; + (void)dst_offset; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// + +CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyBufferToImage( + cl_command_queue command_queue, + cl_mem src_buffer, + cl_mem dst_image, + size_t src_offset, + const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, @@ -2135,7 +2848,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyBufferToImage( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueCopyBufferToImage_disp( cl_command_queue command_queue, @@ -2162,6 +2874,31 @@ static cl_int CL_API_CALL clEnqueueCopyBufferToImage_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueCopyBufferToImage_shutdown( + cl_command_queue command_queue, + cl_mem src_buffer, + cl_mem dst_image, + size_t src_offset, + const size_t* dst_origin, + const size_t* region, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)src_buffer; + (void)dst_image; + (void)src_offset; + (void)dst_origin; + (void)region; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY void* CL_API_CALL clEnqueueMapBuffer( @@ -2204,7 +2941,6 @@ CL_API_ENTRY void* CL_API_CALL clEnqueueMapBuffer( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static void* CL_API_CALL clEnqueueMapBuffer_disp( cl_command_queue command_queue, @@ -2233,6 +2969,32 @@ static void* CL_API_CALL clEnqueueMapBuffer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static void* CL_API_CALL clEnqueueMapBuffer_shutdown( + cl_command_queue command_queue, + cl_mem buffer, + cl_bool blocking_map, + cl_map_flags map_flags, + size_t offset, + size_t size, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event, + cl_int* errcode_ret) +{ + (void)command_queue; + (void)buffer; + (void)blocking_map; + (void)map_flags; + (void)offset; + (void)size; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY void* CL_API_CALL clEnqueueMapImage( @@ -2281,7 +3043,6 @@ CL_API_ENTRY void* CL_API_CALL clEnqueueMapImage( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static void* CL_API_CALL clEnqueueMapImage_disp( cl_command_queue command_queue, @@ -2314,6 +3075,36 @@ static void* CL_API_CALL clEnqueueMapImage_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static void* CL_API_CALL clEnqueueMapImage_shutdown( + cl_command_queue command_queue, + cl_mem image, + cl_bool blocking_map, + cl_map_flags map_flags, + const size_t* origin, + const size_t* region, + size_t* image_row_pitch, + size_t* image_slice_pitch, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event, + cl_int* errcode_ret) +{ + (void)command_queue; + (void)image; + (void)blocking_map; + (void)map_flags; + (void)origin; + (void)region; + (void)image_row_pitch; + (void)image_slice_pitch; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueUnmapMemObject( @@ -2344,7 +3135,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueUnmapMemObject( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueUnmapMemObject_disp( cl_command_queue command_queue, @@ -2365,6 +3155,25 @@ static cl_int CL_API_CALL clEnqueueUnmapMemObject_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueUnmapMemObject_shutdown( + cl_command_queue command_queue, + cl_mem memobj, + void* mapped_ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)memobj; + (void)mapped_ptr; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueNDRangeKernel( @@ -2404,7 +3213,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueNDRangeKernel( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueNDRangeKernel_disp( cl_command_queue command_queue, @@ -2431,6 +3239,31 @@ static cl_int CL_API_CALL clEnqueueNDRangeKernel_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueNDRangeKernel_shutdown( + cl_command_queue command_queue, + cl_kernel kernel, + cl_uint work_dim, + const size_t* global_work_offset, + const size_t* global_work_size, + const size_t* local_work_size, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)kernel; + (void)work_dim; + (void)global_work_offset; + (void)global_work_size; + (void)local_work_size; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueNativeKernel( @@ -2473,7 +3306,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueNativeKernel( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueNativeKernel_disp( cl_command_queue command_queue, @@ -2502,6 +3334,33 @@ static cl_int CL_API_CALL clEnqueueNativeKernel_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueNativeKernel_shutdown( + cl_command_queue command_queue, + void (CL_CALLBACK* user_func)(void*), + void* args, + size_t cb_args, + cl_uint num_mem_objects, + const cl_mem* mem_list, + const void** args_mem_loc, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)user_func; + (void)args; + (void)cb_args; + (void)num_mem_objects; + (void)mem_list; + (void)args_mem_loc; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetCommandQueueProperty( @@ -2526,7 +3385,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetCommandQueueProperty( old_properties); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetCommandQueueProperty_disp( cl_command_queue command_queue, @@ -2543,6 +3401,21 @@ static cl_int CL_API_CALL clSetCommandQueueProperty_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetCommandQueueProperty_shutdown( + cl_command_queue command_queue, + cl_command_queue_properties properties, + cl_bool enable, + cl_command_queue_properties* old_properties) +{ + (void)command_queue; + (void)properties; + (void)enable; + (void)old_properties; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_mem CL_API_CALL clCreateImage2D( @@ -2579,7 +3452,6 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateImage2D( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateImage2D_disp( cl_context context, @@ -2604,6 +3476,28 @@ static cl_mem CL_API_CALL clCreateImage2D_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateImage2D_shutdown( + cl_context context, + cl_mem_flags flags, + const cl_image_format* image_format, + size_t image_width, + size_t image_height, + size_t image_row_pitch, + void* host_ptr, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)image_format; + (void)image_width; + (void)image_height; + (void)image_row_pitch; + (void)host_ptr; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_mem CL_API_CALL clCreateImage3D( @@ -2646,7 +3540,6 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateImage3D( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateImage3D_disp( cl_context context, @@ -2675,6 +3568,32 @@ static cl_mem CL_API_CALL clCreateImage3D_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateImage3D_shutdown( + cl_context context, + cl_mem_flags flags, + const cl_image_format* image_format, + size_t image_width, + size_t image_height, + size_t image_depth, + size_t image_row_pitch, + size_t image_slice_pitch, + void* host_ptr, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)image_format; + (void)image_width; + (void)image_height; + (void)image_depth; + (void)image_row_pitch; + (void)image_slice_pitch; + (void)host_ptr; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueMarker( @@ -2693,7 +3612,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueMarker( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueMarker_disp( cl_command_queue command_queue, @@ -2706,6 +3624,17 @@ static cl_int CL_API_CALL clEnqueueMarker_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueMarker_shutdown( + cl_command_queue command_queue, + cl_event* event) +{ + (void)command_queue; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueWaitForEvents( @@ -2727,7 +3656,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueWaitForEvents( event_list); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueWaitForEvents_disp( cl_command_queue command_queue, @@ -2742,6 +3670,19 @@ static cl_int CL_API_CALL clEnqueueWaitForEvents_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueWaitForEvents_shutdown( + cl_command_queue command_queue, + cl_uint num_events, + const cl_event* event_list) +{ + (void)command_queue; + (void)num_events; + (void)event_list; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueBarrier( @@ -2757,7 +3698,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueBarrier( command_queue); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueBarrier_disp( cl_command_queue command_queue) @@ -2768,6 +3708,15 @@ static cl_int CL_API_CALL clEnqueueBarrier_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueBarrier_shutdown( + cl_command_queue command_queue) +{ + (void)command_queue; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clUnloadCompiler( @@ -2782,7 +3731,6 @@ CL_API_ENTRY cl_int CL_API_CALL clUnloadCompiler( return CL_SUCCESS; } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clUnloadCompiler_disp( void ) @@ -2792,12 +3740,32 @@ static cl_int CL_API_CALL clUnloadCompiler_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clUnloadCompiler_shutdown( + void ) +{ + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// + #if defined(CL_ENABLE_LAYERS) extern void* CL_API_CALL clGetExtensionFunctionAddress_disp( const char* func_name) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static void* CL_API_CALL clGetExtensionFunctionAddress_shutdown( + const char* func_name) +{ + (void)func_name; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, NULL); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// + CL_API_ENTRY cl_command_queue CL_API_CALL clCreateCommandQueue( cl_context context, cl_device_id device, @@ -2820,7 +3788,6 @@ CL_API_ENTRY cl_command_queue CL_API_CALL clCreateCommandQueue( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_command_queue CL_API_CALL clCreateCommandQueue_disp( cl_context context, @@ -2837,6 +3804,20 @@ static cl_command_queue CL_API_CALL clCreateCommandQueue_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_command_queue CL_API_CALL clCreateCommandQueue_shutdown( + cl_context context, + cl_device_id device, + cl_command_queue_properties properties, + cl_int* errcode_ret) +{ + (void)context; + (void)device; + (void)properties; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_sampler CL_API_CALL clCreateSampler( @@ -2864,7 +3845,6 @@ CL_API_ENTRY cl_sampler CL_API_CALL clCreateSampler( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_sampler CL_API_CALL clCreateSampler_disp( cl_context context, @@ -2883,6 +3863,22 @@ static cl_sampler CL_API_CALL clCreateSampler_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_sampler CL_API_CALL clCreateSampler_shutdown( + cl_context context, + cl_bool normalized_coords, + cl_addressing_mode addressing_mode, + cl_filter_mode filter_mode, + cl_int* errcode_ret) +{ + (void)context; + (void)normalized_coords; + (void)addressing_mode; + (void)filter_mode; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueTask( @@ -2910,7 +3906,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueTask( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueTask_disp( cl_command_queue command_queue, @@ -2929,6 +3924,23 @@ static cl_int CL_API_CALL clEnqueueTask_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueTask_shutdown( + cl_command_queue command_queue, + cl_kernel kernel, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)kernel; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_mem CL_API_CALL clCreateSubBuffer( @@ -2956,7 +3968,6 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateSubBuffer( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateSubBuffer_disp( cl_mem buffer, @@ -2975,6 +3986,22 @@ static cl_mem CL_API_CALL clCreateSubBuffer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateSubBuffer_shutdown( + cl_mem buffer, + cl_mem_flags flags, + cl_buffer_create_type buffer_create_type, + const void* buffer_create_info, + cl_int* errcode_ret) +{ + (void)buffer; + (void)flags; + (void)buffer_create_type; + (void)buffer_create_info; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetMemObjectDestructorCallback( @@ -2996,7 +4023,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetMemObjectDestructorCallback( user_data); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetMemObjectDestructorCallback_disp( cl_mem memobj, @@ -3011,6 +4037,19 @@ static cl_int CL_API_CALL clSetMemObjectDestructorCallback_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetMemObjectDestructorCallback_shutdown( + cl_mem memobj, + void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data), + void* user_data) +{ + (void)memobj; + (void)pfn_notify; + (void)user_data; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_event CL_API_CALL clCreateUserEvent( @@ -3029,7 +4068,6 @@ CL_API_ENTRY cl_event CL_API_CALL clCreateUserEvent( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_event CL_API_CALL clCreateUserEvent_disp( cl_context context, @@ -3042,6 +4080,16 @@ static cl_event CL_API_CALL clCreateUserEvent_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_event CL_API_CALL clCreateUserEvent_shutdown( + cl_context context, + cl_int* errcode_ret) +{ + (void)context; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetUserEventStatus( @@ -3060,7 +4108,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetUserEventStatus( execution_status); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetUserEventStatus_disp( cl_event event, @@ -3073,6 +4120,17 @@ static cl_int CL_API_CALL clSetUserEventStatus_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetUserEventStatus_shutdown( + cl_event event, + cl_int execution_status) +{ + (void)event; + (void)execution_status; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetEventCallback( @@ -3097,7 +4155,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetEventCallback( user_data); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetEventCallback_disp( cl_event event, @@ -3114,6 +4171,21 @@ static cl_int CL_API_CALL clSetEventCallback_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetEventCallback_shutdown( + cl_event event, + cl_int command_exec_callback_type, + void (CL_CALLBACK* pfn_notify)(cl_event event, cl_int event_command_status, void *user_data), + void* user_data) +{ + (void)event; + (void)command_exec_callback_type; + (void)pfn_notify; + (void)user_data; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadBufferRect( @@ -3168,7 +4240,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadBufferRect( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueReadBufferRect_disp( cl_command_queue command_queue, @@ -3205,6 +4276,41 @@ static cl_int CL_API_CALL clEnqueueReadBufferRect_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueReadBufferRect_shutdown( + cl_command_queue command_queue, + cl_mem buffer, + cl_bool blocking_read, + const size_t* buffer_origin, + const size_t* host_origin, + const size_t* region, + size_t buffer_row_pitch, + size_t buffer_slice_pitch, + size_t host_row_pitch, + size_t host_slice_pitch, + void* ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)buffer; + (void)blocking_read; + (void)buffer_origin; + (void)host_origin; + (void)region; + (void)buffer_row_pitch; + (void)buffer_slice_pitch; + (void)host_row_pitch; + (void)host_slice_pitch; + (void)ptr; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteBufferRect( @@ -3259,7 +4365,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteBufferRect( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueWriteBufferRect_disp( cl_command_queue command_queue, @@ -3296,6 +4401,41 @@ static cl_int CL_API_CALL clEnqueueWriteBufferRect_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueWriteBufferRect_shutdown( + cl_command_queue command_queue, + cl_mem buffer, + cl_bool blocking_write, + const size_t* buffer_origin, + const size_t* host_origin, + const size_t* region, + size_t buffer_row_pitch, + size_t buffer_slice_pitch, + size_t host_row_pitch, + size_t host_slice_pitch, + const void* ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)buffer; + (void)blocking_write; + (void)buffer_origin; + (void)host_origin; + (void)region; + (void)buffer_row_pitch; + (void)buffer_slice_pitch; + (void)host_row_pitch; + (void)host_slice_pitch; + (void)ptr; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyBufferRect( @@ -3347,7 +4487,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyBufferRect( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueCopyBufferRect_disp( cl_command_queue command_queue, @@ -3382,6 +4521,39 @@ static cl_int CL_API_CALL clEnqueueCopyBufferRect_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueCopyBufferRect_shutdown( + cl_command_queue command_queue, + cl_mem src_buffer, + cl_mem dst_buffer, + const size_t* src_origin, + const size_t* dst_origin, + const size_t* region, + size_t src_row_pitch, + size_t src_slice_pitch, + size_t dst_row_pitch, + size_t dst_slice_pitch, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)src_buffer; + (void)dst_buffer; + (void)src_origin; + (void)dst_origin; + (void)region; + (void)src_row_pitch; + (void)src_slice_pitch; + (void)dst_row_pitch; + (void)dst_slice_pitch; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clCreateSubDevices( @@ -3409,7 +4581,6 @@ CL_API_ENTRY cl_int CL_API_CALL clCreateSubDevices( num_devices_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clCreateSubDevices_disp( cl_device_id in_device, @@ -3428,6 +4599,23 @@ static cl_int CL_API_CALL clCreateSubDevices_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clCreateSubDevices_shutdown( + cl_device_id in_device, + const cl_device_partition_property* properties, + cl_uint num_devices, + cl_device_id* out_devices, + cl_uint* num_devices_ret) +{ + (void)in_device; + (void)properties; + (void)num_devices; + (void)out_devices; + (void)num_devices_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clRetainDevice( @@ -3443,7 +4631,6 @@ CL_API_ENTRY cl_int CL_API_CALL clRetainDevice( device); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clRetainDevice_disp( cl_device_id device) @@ -3454,6 +4641,15 @@ static cl_int CL_API_CALL clRetainDevice_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clRetainDevice_shutdown( + cl_device_id device) +{ + (void)device; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clReleaseDevice( @@ -3469,7 +4665,6 @@ CL_API_ENTRY cl_int CL_API_CALL clReleaseDevice( device); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clReleaseDevice_disp( cl_device_id device) @@ -3480,6 +4675,15 @@ static cl_int CL_API_CALL clReleaseDevice_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clReleaseDevice_shutdown( + cl_device_id device) +{ + (void)device; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_mem CL_API_CALL clCreateImage( @@ -3510,7 +4714,6 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateImage( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateImage_disp( cl_context context, @@ -3531,6 +4734,24 @@ static cl_mem CL_API_CALL clCreateImage_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateImage_shutdown( + cl_context context, + cl_mem_flags flags, + const cl_image_format* image_format, + const cl_image_desc* image_desc, + void* host_ptr, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)image_format; + (void)image_desc; + (void)host_ptr; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithBuiltInKernels( @@ -3558,7 +4779,6 @@ CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithBuiltInKernels( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_program CL_API_CALL clCreateProgramWithBuiltInKernels_disp( cl_context context, @@ -3577,6 +4797,22 @@ static cl_program CL_API_CALL clCreateProgramWithBuiltInKernels_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_program CL_API_CALL clCreateProgramWithBuiltInKernels_shutdown( + cl_context context, + cl_uint num_devices, + const cl_device_id* device_list, + const char* kernel_names, + cl_int* errcode_ret) +{ + (void)context; + (void)num_devices; + (void)device_list; + (void)kernel_names; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clCompileProgram( @@ -3616,7 +4852,6 @@ CL_API_ENTRY cl_int CL_API_CALL clCompileProgram( user_data); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clCompileProgram_disp( cl_program program, @@ -3643,6 +4878,31 @@ static cl_int CL_API_CALL clCompileProgram_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clCompileProgram_shutdown( + cl_program program, + cl_uint num_devices, + const cl_device_id* device_list, + const char* options, + cl_uint num_input_headers, + const cl_program* input_headers, + const char** header_include_names, + void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), + void* user_data) +{ + (void)program; + (void)num_devices; + (void)device_list; + (void)options; + (void)num_input_headers; + (void)input_headers; + (void)header_include_names; + (void)pfn_notify; + (void)user_data; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_program CL_API_CALL clLinkProgram( @@ -3682,7 +4942,6 @@ CL_API_ENTRY cl_program CL_API_CALL clLinkProgram( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_program CL_API_CALL clLinkProgram_disp( cl_context context, @@ -3709,6 +4968,30 @@ static cl_program CL_API_CALL clLinkProgram_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_program CL_API_CALL clLinkProgram_shutdown( + cl_context context, + cl_uint num_devices, + const cl_device_id* device_list, + const char* options, + cl_uint num_input_programs, + const cl_program* input_programs, + void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), + void* user_data, + cl_int* errcode_ret) +{ + (void)context; + (void)num_devices; + (void)device_list; + (void)options; + (void)num_input_programs; + (void)input_programs; + (void)pfn_notify; + (void)user_data; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clUnloadPlatformCompiler( @@ -3724,7 +5007,6 @@ CL_API_ENTRY cl_int CL_API_CALL clUnloadPlatformCompiler( platform); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clUnloadPlatformCompiler_disp( cl_platform_id platform) @@ -3735,6 +5017,15 @@ static cl_int CL_API_CALL clUnloadPlatformCompiler_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clUnloadPlatformCompiler_shutdown( + cl_platform_id platform) +{ + (void)platform; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetKernelArgInfo( @@ -3765,7 +5056,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetKernelArgInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetKernelArgInfo_disp( cl_kernel kernel, @@ -3786,6 +5076,25 @@ static cl_int CL_API_CALL clGetKernelArgInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetKernelArgInfo_shutdown( + cl_kernel kernel, + cl_uint arg_index, + cl_kernel_arg_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)kernel; + (void)arg_index; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueFillBuffer( @@ -3825,7 +5134,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueFillBuffer( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueFillBuffer_disp( cl_command_queue command_queue, @@ -3852,6 +5160,31 @@ static cl_int CL_API_CALL clEnqueueFillBuffer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueFillBuffer_shutdown( + cl_command_queue command_queue, + cl_mem buffer, + const void* pattern, + size_t pattern_size, + size_t offset, + size_t size, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)buffer; + (void)pattern; + (void)pattern_size; + (void)offset; + (void)size; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueFillImage( @@ -3888,7 +5221,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueFillImage( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueFillImage_disp( cl_command_queue command_queue, @@ -3913,6 +5245,29 @@ static cl_int CL_API_CALL clEnqueueFillImage_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueFillImage_shutdown( + cl_command_queue command_queue, + cl_mem image, + const void* fill_color, + const size_t* origin, + const size_t* region, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)image; + (void)fill_color; + (void)origin; + (void)region; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueMigrateMemObjects( @@ -3946,7 +5301,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueMigrateMemObjects( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueMigrateMemObjects_disp( cl_command_queue command_queue, @@ -3969,6 +5323,27 @@ static cl_int CL_API_CALL clEnqueueMigrateMemObjects_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueMigrateMemObjects_shutdown( + cl_command_queue command_queue, + cl_uint num_mem_objects, + const cl_mem* mem_objects, + cl_mem_migration_flags flags, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_mem_objects; + (void)mem_objects; + (void)flags; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueMarkerWithWaitList( @@ -3993,7 +5368,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueMarkerWithWaitList( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueMarkerWithWaitList_disp( cl_command_queue command_queue, @@ -4010,6 +5384,21 @@ static cl_int CL_API_CALL clEnqueueMarkerWithWaitList_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueMarkerWithWaitList_shutdown( + cl_command_queue command_queue, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueBarrierWithWaitList( @@ -4034,7 +5423,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueBarrierWithWaitList( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueBarrierWithWaitList_disp( cl_command_queue command_queue, @@ -4051,13 +5439,42 @@ static cl_int CL_API_CALL clEnqueueBarrierWithWaitList_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueBarrierWithWaitList_shutdown( + cl_command_queue command_queue, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// + #if defined(CL_ENABLE_LAYERS) extern void* CL_API_CALL clGetExtensionFunctionAddressForPlatform_disp( cl_platform_id platform, const char* func_name) CL_API_SUFFIX__VERSION_1_2; #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static void* CL_API_CALL clGetExtensionFunctionAddressForPlatform_shutdown( + cl_platform_id platform, + const char* func_name) +{ + (void)platform; + (void)func_name; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, NULL); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// + CL_API_ENTRY cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties( cl_context context, cl_device_id device, @@ -4080,7 +5497,6 @@ CL_API_ENTRY cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties_disp( cl_context context, @@ -4097,6 +5513,20 @@ static cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties_shutdown( + cl_context context, + cl_device_id device, + const cl_queue_properties* properties, + cl_int* errcode_ret) +{ + (void)context; + (void)device; + (void)properties; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_mem CL_API_CALL clCreatePipe( @@ -4127,7 +5557,6 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreatePipe( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreatePipe_disp( cl_context context, @@ -4148,15 +5577,33 @@ static cl_mem CL_API_CALL clCreatePipe_disp( } #endif // defined(CL_ENABLE_LAYERS) -/////////////////////////////////////////////////////////////////////////////// - -CL_API_ENTRY cl_int CL_API_CALL clGetPipeInfo( - cl_mem pipe, - cl_pipe_info param_name, - size_t param_value_size, - void* param_value, - size_t* param_value_size_ret) -{ +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreatePipe_shutdown( + cl_context context, + cl_mem_flags flags, + cl_uint pipe_packet_size, + cl_uint pipe_max_packets, + const cl_pipe_properties* properties, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)pipe_packet_size; + (void)pipe_max_packets; + (void)properties; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// + +CL_API_ENTRY cl_int CL_API_CALL clGetPipeInfo( + cl_mem pipe, + cl_pipe_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ #if defined(CL_ENABLE_LAYERS) if (khrFirstLayer) return khrFirstLayer->dispatch.clGetPipeInfo( @@ -4175,7 +5622,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetPipeInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetPipeInfo_disp( cl_mem pipe, @@ -4194,6 +5640,23 @@ static cl_int CL_API_CALL clGetPipeInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetPipeInfo_shutdown( + cl_mem pipe, + cl_pipe_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)pipe; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY void* CL_API_CALL clSVMAlloc( @@ -4218,7 +5681,6 @@ CL_API_ENTRY void* CL_API_CALL clSVMAlloc( alignment); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static void* CL_API_CALL clSVMAlloc_disp( cl_context context, @@ -4235,6 +5697,21 @@ static void* CL_API_CALL clSVMAlloc_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static void* CL_API_CALL clSVMAlloc_shutdown( + cl_context context, + cl_svm_mem_flags flags, + size_t size, + cl_uint alignment) +{ + (void)context; + (void)flags; + (void)size; + (void)alignment; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, NULL); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY void CL_API_CALL clSVMFree( @@ -4256,7 +5733,6 @@ CL_API_ENTRY void CL_API_CALL clSVMFree( svm_pointer); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static void CL_API_CALL clSVMFree_disp( cl_context context, @@ -4269,6 +5745,17 @@ static void CL_API_CALL clSVMFree_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static void CL_API_CALL clSVMFree_shutdown( + cl_context context, + void* svm_pointer) +{ + (void)context; + (void)svm_pointer; + // Nothing! +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_sampler CL_API_CALL clCreateSamplerWithProperties( @@ -4290,7 +5777,6 @@ CL_API_ENTRY cl_sampler CL_API_CALL clCreateSamplerWithProperties( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_sampler CL_API_CALL clCreateSamplerWithProperties_disp( cl_context context, @@ -4305,6 +5791,18 @@ static cl_sampler CL_API_CALL clCreateSamplerWithProperties_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_sampler CL_API_CALL clCreateSamplerWithProperties_shutdown( + cl_context context, + const cl_sampler_properties* sampler_properties, + cl_int* errcode_ret) +{ + (void)context; + (void)sampler_properties; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetKernelArgSVMPointer( @@ -4326,7 +5824,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetKernelArgSVMPointer( arg_value); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetKernelArgSVMPointer_disp( cl_kernel kernel, @@ -4341,6 +5838,19 @@ static cl_int CL_API_CALL clSetKernelArgSVMPointer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetKernelArgSVMPointer_shutdown( + cl_kernel kernel, + cl_uint arg_index, + const void* arg_value) +{ + (void)kernel; + (void)arg_index; + (void)arg_value; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetKernelExecInfo( @@ -4365,7 +5875,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetKernelExecInfo( param_value); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetKernelExecInfo_disp( cl_kernel kernel, @@ -4382,6 +5891,21 @@ static cl_int CL_API_CALL clSetKernelExecInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetKernelExecInfo_shutdown( + cl_kernel kernel, + cl_kernel_exec_info param_name, + size_t param_value_size, + const void* param_value) +{ + (void)kernel; + (void)param_name; + (void)param_value_size; + (void)param_value; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMFree( @@ -4418,7 +5942,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMFree( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueSVMFree_disp( cl_command_queue command_queue, @@ -4443,6 +5966,29 @@ static cl_int CL_API_CALL clEnqueueSVMFree_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueSVMFree_shutdown( + cl_command_queue command_queue, + cl_uint num_svm_pointers, + void* svm_pointers[], + void (CL_CALLBACK* pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data), + void* user_data, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_svm_pointers; + (void)svm_pointers; + (void)pfn_free_func; + (void)user_data; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMMemcpy( @@ -4479,7 +6025,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMMemcpy( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueSVMMemcpy_disp( cl_command_queue command_queue, @@ -4504,6 +6049,29 @@ static cl_int CL_API_CALL clEnqueueSVMMemcpy_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueSVMMemcpy_shutdown( + cl_command_queue command_queue, + cl_bool blocking_copy, + void* dst_ptr, + const void* src_ptr, + size_t size, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)blocking_copy; + (void)dst_ptr; + (void)src_ptr; + (void)size; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMMemFill( @@ -4540,7 +6108,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMMemFill( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueSVMMemFill_disp( cl_command_queue command_queue, @@ -4565,6 +6132,29 @@ static cl_int CL_API_CALL clEnqueueSVMMemFill_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueSVMMemFill_shutdown( + cl_command_queue command_queue, + void* svm_ptr, + const void* pattern, + size_t pattern_size, + size_t size, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)svm_ptr; + (void)pattern; + (void)pattern_size; + (void)size; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMMap( @@ -4601,7 +6191,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMMap( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueSVMMap_disp( cl_command_queue command_queue, @@ -4626,6 +6215,29 @@ static cl_int CL_API_CALL clEnqueueSVMMap_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueSVMMap_shutdown( + cl_command_queue command_queue, + cl_bool blocking_map, + cl_map_flags flags, + void* svm_ptr, + size_t size, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)blocking_map; + (void)flags; + (void)svm_ptr; + (void)size; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMUnmap( @@ -4653,7 +6265,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMUnmap( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueSVMUnmap_disp( cl_command_queue command_queue, @@ -4672,6 +6283,23 @@ static cl_int CL_API_CALL clEnqueueSVMUnmap_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueSVMUnmap_shutdown( + cl_command_queue command_queue, + void* svm_ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)svm_ptr; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetDefaultDeviceCommandQueue( @@ -4693,7 +6321,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetDefaultDeviceCommandQueue( command_queue); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetDefaultDeviceCommandQueue_disp( cl_context context, @@ -4708,6 +6335,19 @@ static cl_int CL_API_CALL clSetDefaultDeviceCommandQueue_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetDefaultDeviceCommandQueue_shutdown( + cl_context context, + cl_device_id device, + cl_command_queue command_queue) +{ + (void)context; + (void)device; + (void)command_queue; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetDeviceAndHostTimer( @@ -4729,7 +6369,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetDeviceAndHostTimer( host_timestamp); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetDeviceAndHostTimer_disp( cl_device_id device, @@ -4744,6 +6383,19 @@ static cl_int CL_API_CALL clGetDeviceAndHostTimer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetDeviceAndHostTimer_shutdown( + cl_device_id device, + cl_ulong* device_timestamp, + cl_ulong* host_timestamp) +{ + (void)device; + (void)device_timestamp; + (void)host_timestamp; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetHostTimer( @@ -4762,7 +6414,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetHostTimer( host_timestamp); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetHostTimer_disp( cl_device_id device, @@ -4775,6 +6426,17 @@ static cl_int CL_API_CALL clGetHostTimer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetHostTimer_shutdown( + cl_device_id device, + cl_ulong* host_timestamp) +{ + (void)device; + (void)host_timestamp; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithIL( @@ -4799,7 +6461,6 @@ CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithIL( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_program CL_API_CALL clCreateProgramWithIL_disp( cl_context context, @@ -4816,6 +6477,20 @@ static cl_program CL_API_CALL clCreateProgramWithIL_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_program CL_API_CALL clCreateProgramWithIL_shutdown( + cl_context context, + const void* il, + size_t length, + cl_int* errcode_ret) +{ + (void)context; + (void)il; + (void)length; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_kernel CL_API_CALL clCloneKernel( @@ -4834,7 +6509,6 @@ CL_API_ENTRY cl_kernel CL_API_CALL clCloneKernel( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_kernel CL_API_CALL clCloneKernel_disp( cl_kernel source_kernel, @@ -4847,6 +6521,16 @@ static cl_kernel CL_API_CALL clCloneKernel_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_kernel CL_API_CALL clCloneKernel_shutdown( + cl_kernel source_kernel, + cl_int* errcode_ret) +{ + (void)source_kernel; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clGetKernelSubGroupInfo( @@ -4883,7 +6567,6 @@ CL_API_ENTRY cl_int CL_API_CALL clGetKernelSubGroupInfo( param_value_size_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetKernelSubGroupInfo_disp( cl_kernel kernel, @@ -4908,6 +6591,29 @@ static cl_int CL_API_CALL clGetKernelSubGroupInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetKernelSubGroupInfo_shutdown( + cl_kernel kernel, + cl_device_id device, + cl_kernel_sub_group_info param_name, + size_t input_value_size, + const void* input_value, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)kernel; + (void)device; + (void)param_name; + (void)input_value_size; + (void)input_value; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMMigrateMem( @@ -4944,7 +6650,6 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueSVMMigrateMem( event); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueSVMMigrateMem_disp( cl_command_queue command_queue, @@ -4969,6 +6674,29 @@ static cl_int CL_API_CALL clEnqueueSVMMigrateMem_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueSVMMigrateMem_shutdown( + cl_command_queue command_queue, + cl_uint num_svm_pointers, + const void** svm_pointers, + const size_t* sizes, + cl_mem_migration_flags flags, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_svm_pointers; + (void)svm_pointers; + (void)sizes; + (void)flags; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetProgramSpecializationConstant( @@ -4993,7 +6721,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetProgramSpecializationConstant( spec_value); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetProgramSpecializationConstant_disp( cl_program program, @@ -5010,6 +6737,21 @@ static cl_int CL_API_CALL clSetProgramSpecializationConstant_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetProgramSpecializationConstant_shutdown( + cl_program program, + cl_uint spec_id, + size_t spec_size, + const void* spec_value) +{ + (void)program; + (void)spec_id; + (void)spec_size; + (void)spec_value; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetProgramReleaseCallback( @@ -5031,7 +6773,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetProgramReleaseCallback( user_data); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetProgramReleaseCallback_disp( cl_program program, @@ -5046,6 +6787,19 @@ static cl_int CL_API_CALL clSetProgramReleaseCallback_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetProgramReleaseCallback_shutdown( + cl_program program, + void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), + void* user_data) +{ + (void)program; + (void)pfn_notify; + (void)user_data; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_int CL_API_CALL clSetContextDestructorCallback( @@ -5067,7 +6821,6 @@ CL_API_ENTRY cl_int CL_API_CALL clSetContextDestructorCallback( user_data); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clSetContextDestructorCallback_disp( cl_context context, @@ -5082,6 +6835,19 @@ static cl_int CL_API_CALL clSetContextDestructorCallback_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clSetContextDestructorCallback_shutdown( + cl_context context, + void (CL_CALLBACK* pfn_notify)(cl_context context, void* user_data), + void* user_data) +{ + (void)context; + (void)pfn_notify; + (void)user_data; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// CL_API_ENTRY cl_mem CL_API_CALL clCreateBufferWithProperties( @@ -5112,7 +6878,6 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateBufferWithProperties( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateBufferWithProperties_disp( cl_context context, @@ -5133,20 +6898,38 @@ static cl_mem CL_API_CALL clCreateBufferWithProperties_disp( } #endif // defined(CL_ENABLE_LAYERS) -/////////////////////////////////////////////////////////////////////////////// - -CL_API_ENTRY cl_mem CL_API_CALL clCreateImageWithProperties( +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateBufferWithProperties_shutdown( cl_context context, const cl_mem_properties* properties, cl_mem_flags flags, - const cl_image_format* image_format, - const cl_image_desc* image_desc, + size_t size, void* host_ptr, cl_int* errcode_ret) { -#if defined(CL_ENABLE_LAYERS) - if (khrFirstLayer) - return khrFirstLayer->dispatch.clCreateImageWithProperties( + (void)context; + (void)properties; + (void)flags; + (void)size; + (void)host_ptr; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// + +CL_API_ENTRY cl_mem CL_API_CALL clCreateImageWithProperties( + cl_context context, + const cl_mem_properties* properties, + cl_mem_flags flags, + const cl_image_format* image_format, + const cl_image_desc* image_desc, + void* host_ptr, + cl_int* errcode_ret) +{ +#if defined(CL_ENABLE_LAYERS) + if (khrFirstLayer) + return khrFirstLayer->dispatch.clCreateImageWithProperties( context, properties, flags, @@ -5166,7 +6949,6 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateImageWithProperties( errcode_ret); } -/////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateImageWithProperties_disp( cl_context context, @@ -5189,8 +6971,29 @@ static cl_mem CL_API_CALL clCreateImageWithProperties_disp( } #endif // defined(CL_ENABLE_LAYERS) -/////////////////////////////////////////////////////////////////////////////// +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateImageWithProperties_shutdown( + cl_context context, + const cl_mem_properties* properties, + cl_mem_flags flags, + const cl_image_format* image_format, + const cl_image_desc* image_desc, + void* host_ptr, + cl_int* errcode_ret) +{ + (void)context; + (void)properties; + (void)flags; + (void)image_format; + (void)image_desc; + (void)host_ptr; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + + +/////////////////////////////////////////////////////////////////////////////// // cl_ext_device_fission CL_API_ENTRY cl_int CL_API_CALL clReleaseDeviceEXT( @@ -5206,6 +7009,7 @@ CL_API_ENTRY cl_int CL_API_CALL clReleaseDeviceEXT( return device->dispatch->clReleaseDeviceEXT( device); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clReleaseDeviceEXT_disp( cl_device_id device) @@ -5217,6 +7021,18 @@ static cl_int CL_API_CALL clReleaseDeviceEXT_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clReleaseDeviceEXT_shutdown( + cl_device_id device) +{ + (void)device; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_ext_device_fission + CL_API_ENTRY cl_int CL_API_CALL clRetainDeviceEXT( cl_device_id device) { @@ -5230,6 +7046,7 @@ CL_API_ENTRY cl_int CL_API_CALL clRetainDeviceEXT( return device->dispatch->clRetainDeviceEXT( device); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clRetainDeviceEXT_disp( cl_device_id device) @@ -5241,6 +7058,18 @@ static cl_int CL_API_CALL clRetainDeviceEXT_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clRetainDeviceEXT_shutdown( + cl_device_id device) +{ + (void)device; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_ext_device_fission + CL_API_ENTRY cl_int CL_API_CALL clCreateSubDevicesEXT( cl_device_id in_device, const cl_device_partition_property_ext* properties, @@ -5266,6 +7095,7 @@ CL_API_ENTRY cl_int CL_API_CALL clCreateSubDevicesEXT( out_devices, num_devices); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clCreateSubDevicesEXT_disp( cl_device_id in_device, @@ -5285,12 +7115,29 @@ static cl_int CL_API_CALL clCreateSubDevicesEXT_disp( } #endif // defined(CL_ENABLE_LAYERS) -/////////////////////////////////////////////////////////////////////////////// +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clCreateSubDevicesEXT_shutdown( + cl_device_id in_device, + const cl_device_partition_property_ext* properties, + cl_uint num_entries, + cl_device_id* out_devices, + cl_uint* num_devices) +{ + (void)in_device; + (void)properties; + (void)num_entries; + (void)out_devices; + (void)num_devices; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) -// cl_khr_d3d10_sharing #if defined(_WIN32) +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d10_sharing + CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromD3D10KHR( cl_platform_id platform, cl_d3d10_device_source_khr d3d_device_source, @@ -5322,6 +7169,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromD3D10KHR( devices, num_devices); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetDeviceIDsFromD3D10KHR_disp( cl_platform_id platform, @@ -5345,6 +7193,30 @@ static cl_int CL_API_CALL clGetDeviceIDsFromD3D10KHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetDeviceIDsFromD3D10KHR_shutdown( + cl_platform_id platform, + cl_d3d10_device_source_khr d3d_device_source, + void* d3d_object, + cl_d3d10_device_set_khr d3d_device_set, + cl_uint num_entries, + cl_device_id* devices, + cl_uint* num_devices) +{ + (void)platform; + (void)d3d_device_source; + (void)d3d_object; + (void)d3d_device_set; + (void)num_entries; + (void)devices; + (void)num_devices; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d10_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10BufferKHR( cl_context context, cl_mem_flags flags, @@ -5367,6 +7239,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10BufferKHR( resource, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromD3D10BufferKHR_disp( cl_context context, @@ -5384,6 +7257,23 @@ static cl_mem CL_API_CALL clCreateFromD3D10BufferKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromD3D10BufferKHR_shutdown( + cl_context context, + cl_mem_flags flags, + ID3D10Buffer* resource, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)resource; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d10_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10Texture2DKHR( cl_context context, cl_mem_flags flags, @@ -5409,6 +7299,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10Texture2DKHR( subresource, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromD3D10Texture2DKHR_disp( cl_context context, @@ -5428,6 +7319,25 @@ static cl_mem CL_API_CALL clCreateFromD3D10Texture2DKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromD3D10Texture2DKHR_shutdown( + cl_context context, + cl_mem_flags flags, + ID3D10Texture2D* resource, + UINT subresource, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)resource; + (void)subresource; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d10_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10Texture3DKHR( cl_context context, cl_mem_flags flags, @@ -5453,6 +7363,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10Texture3DKHR( subresource, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromD3D10Texture3DKHR_disp( cl_context context, @@ -5472,6 +7383,25 @@ static cl_mem CL_API_CALL clCreateFromD3D10Texture3DKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromD3D10Texture3DKHR_shutdown( + cl_context context, + cl_mem_flags flags, + ID3D10Texture3D* resource, + UINT subresource, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)resource; + (void)subresource; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d10_sharing + CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireD3D10ObjectsKHR( cl_command_queue command_queue, cl_uint num_objects, @@ -5500,6 +7430,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireD3D10ObjectsKHR( event_wait_list, event); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueAcquireD3D10ObjectsKHR_disp( cl_command_queue command_queue, @@ -5521,6 +7452,28 @@ static cl_int CL_API_CALL clEnqueueAcquireD3D10ObjectsKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueAcquireD3D10ObjectsKHR_shutdown( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem* mem_objects, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_objects; + (void)mem_objects; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d10_sharing + CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR( cl_command_queue command_queue, cl_uint num_objects, @@ -5549,6 +7502,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR( event_wait_list, event); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR_disp( cl_command_queue command_queue, @@ -5570,14 +7524,32 @@ static cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR_shutdown( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem* mem_objects, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_objects; + (void)mem_objects; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + #endif // defined(_WIN32) -/////////////////////////////////////////////////////////////////////////////// +#if defined(_WIN32) +/////////////////////////////////////////////////////////////////////////////// // cl_khr_d3d11_sharing -#if defined(_WIN32) - CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromD3D11KHR( cl_platform_id platform, cl_d3d11_device_source_khr d3d_device_source, @@ -5609,6 +7581,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromD3D11KHR( devices, num_devices); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetDeviceIDsFromD3D11KHR_disp( cl_platform_id platform, @@ -5632,6 +7605,30 @@ static cl_int CL_API_CALL clGetDeviceIDsFromD3D11KHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetDeviceIDsFromD3D11KHR_shutdown( + cl_platform_id platform, + cl_d3d11_device_source_khr d3d_device_source, + void* d3d_object, + cl_d3d11_device_set_khr d3d_device_set, + cl_uint num_entries, + cl_device_id* devices, + cl_uint* num_devices) +{ + (void)platform; + (void)d3d_device_source; + (void)d3d_object; + (void)d3d_device_set; + (void)num_entries; + (void)devices; + (void)num_devices; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d11_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11BufferKHR( cl_context context, cl_mem_flags flags, @@ -5654,6 +7651,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11BufferKHR( resource, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromD3D11BufferKHR_disp( cl_context context, @@ -5671,6 +7669,23 @@ static cl_mem CL_API_CALL clCreateFromD3D11BufferKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromD3D11BufferKHR_shutdown( + cl_context context, + cl_mem_flags flags, + ID3D11Buffer* resource, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)resource; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d11_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11Texture2DKHR( cl_context context, cl_mem_flags flags, @@ -5696,6 +7711,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11Texture2DKHR( subresource, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromD3D11Texture2DKHR_disp( cl_context context, @@ -5715,6 +7731,25 @@ static cl_mem CL_API_CALL clCreateFromD3D11Texture2DKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromD3D11Texture2DKHR_shutdown( + cl_context context, + cl_mem_flags flags, + ID3D11Texture2D* resource, + UINT subresource, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)resource; + (void)subresource; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d11_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11Texture3DKHR( cl_context context, cl_mem_flags flags, @@ -5740,6 +7775,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11Texture3DKHR( subresource, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromD3D11Texture3DKHR_disp( cl_context context, @@ -5759,6 +7795,25 @@ static cl_mem CL_API_CALL clCreateFromD3D11Texture3DKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromD3D11Texture3DKHR_shutdown( + cl_context context, + cl_mem_flags flags, + ID3D11Texture3D* resource, + UINT subresource, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)resource; + (void)subresource; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d11_sharing + CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireD3D11ObjectsKHR( cl_command_queue command_queue, cl_uint num_objects, @@ -5787,6 +7842,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireD3D11ObjectsKHR( event_wait_list, event); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueAcquireD3D11ObjectsKHR_disp( cl_command_queue command_queue, @@ -5808,6 +7864,28 @@ static cl_int CL_API_CALL clEnqueueAcquireD3D11ObjectsKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueAcquireD3D11ObjectsKHR_shutdown( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem* mem_objects, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_objects; + (void)mem_objects; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_d3d11_sharing + CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR( cl_command_queue command_queue, cl_uint num_objects, @@ -5836,6 +7914,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR( event_wait_list, event); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR_disp( cl_command_queue command_queue, @@ -5857,14 +7936,32 @@ static cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR_shutdown( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem* mem_objects, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_objects; + (void)mem_objects; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + #endif // defined(_WIN32) -/////////////////////////////////////////////////////////////////////////////// +#if defined(_WIN32) +/////////////////////////////////////////////////////////////////////////////// // cl_khr_dx9_media_sharing -#if defined(_WIN32) - CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromDX9MediaAdapterKHR( cl_platform_id platform, cl_uint num_media_adapters, @@ -5899,6 +7996,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromDX9MediaAdapterKHR( devices, num_devices); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetDeviceIDsFromDX9MediaAdapterKHR_disp( cl_platform_id platform, @@ -5924,6 +8022,32 @@ static cl_int CL_API_CALL clGetDeviceIDsFromDX9MediaAdapterKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetDeviceIDsFromDX9MediaAdapterKHR_shutdown( + cl_platform_id platform, + cl_uint num_media_adapters, + cl_dx9_media_adapter_type_khr* media_adapter_type, + void* media_adapters, + cl_dx9_media_adapter_set_khr media_adapter_set, + cl_uint num_entries, + cl_device_id* devices, + cl_uint* num_devices) +{ + (void)platform; + (void)num_media_adapters; + (void)media_adapter_type; + (void)media_adapters; + (void)media_adapter_set; + (void)num_entries; + (void)devices; + (void)num_devices; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_dx9_media_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceKHR( cl_context context, cl_mem_flags flags, @@ -5952,6 +8076,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceKHR( plane, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceKHR_disp( cl_context context, @@ -5973,6 +8098,27 @@ static cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceKHR_shutdown( + cl_context context, + cl_mem_flags flags, + cl_dx9_media_adapter_type_khr adapter_type, + void* surface_info, + cl_uint plane, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)adapter_type; + (void)surface_info; + (void)plane; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_dx9_media_sharing + CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireDX9MediaSurfacesKHR( cl_command_queue command_queue, cl_uint num_objects, @@ -6001,6 +8147,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireDX9MediaSurfacesKHR( event_wait_list, event); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueAcquireDX9MediaSurfacesKHR_disp( cl_command_queue command_queue, @@ -6022,6 +8169,28 @@ static cl_int CL_API_CALL clEnqueueAcquireDX9MediaSurfacesKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueAcquireDX9MediaSurfacesKHR_shutdown( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem* mem_objects, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_objects; + (void)mem_objects; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_dx9_media_sharing + CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR( cl_command_queue command_queue, cl_uint num_objects, @@ -6050,6 +8219,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR( event_wait_list, event); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR_disp( cl_command_queue command_queue, @@ -6071,10 +8241,28 @@ static cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR_shutdown( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem* mem_objects, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_objects; + (void)mem_objects; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + #endif // defined(_WIN32) /////////////////////////////////////////////////////////////////////////////// - // cl_khr_egl_event CL_API_ENTRY cl_event CL_API_CALL clCreateEventFromEGLSyncKHR( @@ -6099,6 +8287,7 @@ CL_API_ENTRY cl_event CL_API_CALL clCreateEventFromEGLSyncKHR( display, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_event CL_API_CALL clCreateEventFromEGLSyncKHR_disp( cl_context context, @@ -6116,8 +8305,22 @@ static cl_event CL_API_CALL clCreateEventFromEGLSyncKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) -/////////////////////////////////////////////////////////////////////////////// +#if defined(CL_ENABLE_LAYERS) +static cl_event CL_API_CALL clCreateEventFromEGLSyncKHR_shutdown( + cl_context context, + CLeglSyncKHR sync, + CLeglDisplayKHR display, + cl_int* errcode_ret) +{ + (void)context; + (void)sync; + (void)display; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// // cl_khr_egl_image CL_API_ENTRY cl_mem CL_API_CALL clCreateFromEGLImageKHR( @@ -6148,6 +8351,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromEGLImageKHR( properties, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromEGLImageKHR_disp( cl_context context, @@ -6169,6 +8373,27 @@ static cl_mem CL_API_CALL clCreateFromEGLImageKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromEGLImageKHR_shutdown( + cl_context context, + CLeglDisplayKHR egldisplay, + CLeglImageKHR eglimage, + cl_mem_flags flags, + const cl_egl_image_properties_khr* properties, + cl_int* errcode_ret) +{ + (void)context; + (void)egldisplay; + (void)eglimage; + (void)flags; + (void)properties; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_egl_image + CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireEGLObjectsKHR( cl_command_queue command_queue, cl_uint num_objects, @@ -6197,6 +8422,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireEGLObjectsKHR( event_wait_list, event); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueAcquireEGLObjectsKHR_disp( cl_command_queue command_queue, @@ -6218,6 +8444,28 @@ static cl_int CL_API_CALL clEnqueueAcquireEGLObjectsKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueAcquireEGLObjectsKHR_shutdown( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem* mem_objects, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_objects; + (void)mem_objects; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_egl_image + CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseEGLObjectsKHR( cl_command_queue command_queue, cl_uint num_objects, @@ -6246,6 +8494,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseEGLObjectsKHR( event_wait_list, event); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueReleaseEGLObjectsKHR_disp( cl_command_queue command_queue, @@ -6267,8 +8516,27 @@ static cl_int CL_API_CALL clEnqueueReleaseEGLObjectsKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) -/////////////////////////////////////////////////////////////////////////////// +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueReleaseEGLObjectsKHR_shutdown( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem* mem_objects, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_objects; + (void)mem_objects; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// // cl_khr_gl_event CL_API_ENTRY cl_event CL_API_CALL clCreateEventFromGLsyncKHR( @@ -6290,6 +8558,7 @@ CL_API_ENTRY cl_event CL_API_CALL clCreateEventFromGLsyncKHR( sync, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_event CL_API_CALL clCreateEventFromGLsyncKHR_disp( cl_context context, @@ -6305,8 +8574,20 @@ static cl_event CL_API_CALL clCreateEventFromGLsyncKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) -/////////////////////////////////////////////////////////////////////////////// +#if defined(CL_ENABLE_LAYERS) +static cl_event CL_API_CALL clCreateEventFromGLsyncKHR_shutdown( + cl_context context, + cl_GLsync sync, + cl_int* errcode_ret) +{ + (void)context; + (void)sync; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// // cl_khr_gl_sharing CL_API_ENTRY cl_int CL_API_CALL clGetGLContextInfoKHR( @@ -6336,6 +8617,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetGLContextInfoKHR( param_value, param_value_size_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetGLContextInfoKHR_disp( const cl_context_properties* properties, @@ -6357,6 +8639,26 @@ static cl_int CL_API_CALL clGetGLContextInfoKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetGLContextInfoKHR_shutdown( + const cl_context_properties* properties, + cl_gl_context_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)properties; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_gl_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLBuffer( cl_context context, cl_mem_flags flags, @@ -6379,6 +8681,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLBuffer( bufobj, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromGLBuffer_disp( cl_context context, @@ -6396,6 +8699,23 @@ static cl_mem CL_API_CALL clCreateFromGLBuffer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromGLBuffer_shutdown( + cl_context context, + cl_mem_flags flags, + cl_GLuint bufobj, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)bufobj; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_gl_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLTexture( cl_context context, cl_mem_flags flags, @@ -6424,6 +8744,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLTexture( texture, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromGLTexture_disp( cl_context context, @@ -6445,6 +8766,27 @@ static cl_mem CL_API_CALL clCreateFromGLTexture_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromGLTexture_shutdown( + cl_context context, + cl_mem_flags flags, + cl_GLenum target, + cl_GLint miplevel, + cl_GLuint texture, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)target; + (void)miplevel; + (void)texture; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_gl_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLRenderbuffer( cl_context context, cl_mem_flags flags, @@ -6467,6 +8809,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLRenderbuffer( renderbuffer, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromGLRenderbuffer_disp( cl_context context, @@ -6484,6 +8827,23 @@ static cl_mem CL_API_CALL clCreateFromGLRenderbuffer_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromGLRenderbuffer_shutdown( + cl_context context, + cl_mem_flags flags, + cl_GLuint renderbuffer, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)renderbuffer; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_gl_sharing + CL_API_ENTRY cl_int CL_API_CALL clGetGLObjectInfo( cl_mem memobj, cl_gl_object_type* gl_object_type, @@ -6503,6 +8863,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetGLObjectInfo( gl_object_type, gl_object_name); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetGLObjectInfo_disp( cl_mem memobj, @@ -6518,6 +8879,22 @@ static cl_int CL_API_CALL clGetGLObjectInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetGLObjectInfo_shutdown( + cl_mem memobj, + cl_gl_object_type* gl_object_type, + cl_GLuint* gl_object_name) +{ + (void)memobj; + (void)gl_object_type; + (void)gl_object_name; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_gl_sharing + CL_API_ENTRY cl_int CL_API_CALL clGetGLTextureInfo( cl_mem memobj, cl_gl_texture_info param_name, @@ -6543,6 +8920,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetGLTextureInfo( param_value, param_value_size_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetGLTextureInfo_disp( cl_mem memobj, @@ -6562,6 +8940,26 @@ static cl_int CL_API_CALL clGetGLTextureInfo_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetGLTextureInfo_shutdown( + cl_mem memobj, + cl_gl_texture_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)memobj; + (void)param_name; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_gl_sharing + CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireGLObjects( cl_command_queue command_queue, cl_uint num_objects, @@ -6590,6 +8988,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireGLObjects( event_wait_list, event); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueAcquireGLObjects_disp( cl_command_queue command_queue, @@ -6611,6 +9010,28 @@ static cl_int CL_API_CALL clEnqueueAcquireGLObjects_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueAcquireGLObjects_shutdown( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem* mem_objects, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_objects; + (void)mem_objects; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_gl_sharing + CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseGLObjects( cl_command_queue command_queue, cl_uint num_objects, @@ -6639,6 +9060,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseGLObjects( event_wait_list, event); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clEnqueueReleaseGLObjects_disp( cl_command_queue command_queue, @@ -6660,6 +9082,28 @@ static cl_int CL_API_CALL clEnqueueReleaseGLObjects_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clEnqueueReleaseGLObjects_shutdown( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem* mem_objects, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event) +{ + (void)command_queue; + (void)num_objects; + (void)mem_objects; + (void)num_events_in_wait_list; + (void)event_wait_list; + (void)event; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_gl_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLTexture2D( cl_context context, cl_mem_flags flags, @@ -6688,6 +9132,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLTexture2D( texture, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromGLTexture2D_disp( cl_context context, @@ -6709,6 +9154,27 @@ static cl_mem CL_API_CALL clCreateFromGLTexture2D_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromGLTexture2D_shutdown( + cl_context context, + cl_mem_flags flags, + cl_GLenum target, + cl_GLint miplevel, + cl_GLuint texture, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)target; + (void)miplevel; + (void)texture; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// +// cl_khr_gl_sharing + CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLTexture3D( cl_context context, cl_mem_flags flags, @@ -6737,6 +9203,7 @@ CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLTexture3D( texture, errcode_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_mem CL_API_CALL clCreateFromGLTexture3D_disp( cl_context context, @@ -6758,8 +9225,26 @@ static cl_mem CL_API_CALL clCreateFromGLTexture3D_disp( } #endif // defined(CL_ENABLE_LAYERS) -/////////////////////////////////////////////////////////////////////////////// +#if defined(CL_ENABLE_LAYERS) +static cl_mem CL_API_CALL clCreateFromGLTexture3D_shutdown( + cl_context context, + cl_mem_flags flags, + cl_GLenum target, + cl_GLint miplevel, + cl_GLuint texture, + cl_int* errcode_ret) +{ + (void)context; + (void)flags; + (void)target; + (void)miplevel; + (void)texture; + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + +/////////////////////////////////////////////////////////////////////////////// // cl_khr_subgroups CL_API_ENTRY cl_int CL_API_CALL clGetKernelSubGroupInfoKHR( @@ -6796,6 +9281,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetKernelSubGroupInfoKHR( param_value, param_value_size_ret); } + #if defined(CL_ENABLE_LAYERS) static cl_int CL_API_CALL clGetKernelSubGroupInfoKHR_disp( cl_kernel in_kernel, @@ -6821,10 +9307,34 @@ static cl_int CL_API_CALL clGetKernelSubGroupInfoKHR_disp( } #endif // defined(CL_ENABLE_LAYERS) +#if defined(CL_ENABLE_LAYERS) +static cl_int CL_API_CALL clGetKernelSubGroupInfoKHR_shutdown( + cl_kernel in_kernel, + cl_device_id in_device, + cl_kernel_sub_group_info param_name, + size_t input_value_size, + const void* input_value, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret) +{ + (void)in_kernel; + (void)in_device; + (void)param_name; + (void)input_value_size; + (void)input_value; + (void)param_value_size; + (void)param_value; + (void)param_value_size_ret; + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +} +#endif // defined(CL_ENABLE_LAYERS) + /////////////////////////////////////////////////////////////////////////////// #if defined(CL_ENABLE_LAYERS) -struct _cl_icd_dispatch khrMasterDispatch = { + +struct _cl_icd_dispatch khrActualDispatch = { &clGetPlatformIDs_disp, &clGetPlatformInfo_disp, &clGetDeviceIDs_disp, @@ -6901,7 +9411,7 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clEnqueueReleaseGLObjects_disp, &clGetGLContextInfoKHR_disp, - /* cl_khr_d3d10_sharing */ + /* cl_khr_d3d10_sharing */ #if defined(_WIN32) &clGetDeviceIDsFromD3D10KHR_disp, &clCreateFromD3D10BufferKHR_disp, @@ -6918,7 +9428,7 @@ struct _cl_icd_dispatch khrMasterDispatch = { NULL, #endif - /* OpenCL 1.1 */ + /* OpenCL 1.1 */ &clSetEventCallback_disp, &clCreateSubBuffer_disp, &clSetMemObjectDestructorCallback_disp, @@ -6928,15 +9438,15 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clEnqueueWriteBufferRect_disp, &clEnqueueCopyBufferRect_disp, - /* cl_ext_device_fission */ + /* cl_ext_device_fission */ &clCreateSubDevicesEXT_disp, &clRetainDeviceEXT_disp, &clReleaseDeviceEXT_disp, - /* cl_khr_gl_event */ + /* cl_khr_gl_event */ &clCreateEventFromGLsyncKHR_disp, - /* OpenCL 1.2 */ + /* OpenCL 1.2 */ &clCreateSubDevices_disp, &clRetainDevice_disp, &clReleaseDevice_disp, @@ -6954,7 +9464,7 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clGetExtensionFunctionAddressForPlatform_disp, &clCreateFromGLTexture_disp, - /* cl_khr_d3d11_sharing */ + /* cl_khr_d3d11_sharing */ #if defined(_WIN32) &clGetDeviceIDsFromD3D11KHR_disp, &clCreateFromD3D11BufferKHR_disp, @@ -6973,7 +9483,7 @@ struct _cl_icd_dispatch khrMasterDispatch = { NULL, #endif - /* cl_khr_dx9_media_sharing */ + /* cl_khr_dx9_media_sharing */ #if defined(_WIN32) &clGetDeviceIDsFromDX9MediaAdapterKHR_disp, &clEnqueueAcquireDX9MediaSurfacesKHR_disp, @@ -6984,15 +9494,15 @@ struct _cl_icd_dispatch khrMasterDispatch = { NULL, #endif - /* cl_khr_egl_image */ + /* cl_khr_egl_image */ &clCreateFromEGLImageKHR_disp, &clEnqueueAcquireEGLObjectsKHR_disp, &clEnqueueReleaseEGLObjectsKHR_disp, - /* cl_khr_egl_event */ + /* cl_khr_egl_event */ &clCreateEventFromEGLSyncKHR_disp, - /* OpenCL 2.0 */ + /* OpenCL 2.0 */ &clCreateCommandQueueWithProperties_disp, &clCreatePipe_disp, &clGetPipeInfo_disp, @@ -7007,10 +9517,10 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clSetKernelArgSVMPointer_disp, &clSetKernelExecInfo_disp, - /* cl_khr_sub_groups */ + /* cl_khr_sub_groups */ &clGetKernelSubGroupInfoKHR_disp, - /* OpenCL 2.1 */ + /* OpenCL 2.1 */ &clCloneKernel_disp, &clCreateProgramWithIL_disp, &clEnqueueSVMMigrateMem_disp, @@ -7019,16 +9529,223 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clGetKernelSubGroupInfo_disp, &clSetDefaultDeviceCommandQueue_disp, - /* OpenCL 2.2 */ + /* OpenCL 2.2 */ &clSetProgramReleaseCallback_disp, &clSetProgramSpecializationConstant_disp, - /* OpenCL 3.0 */ + /* OpenCL 3.0 */ &clCreateBufferWithProperties_disp, &clCreateImageWithProperties_disp, - &clSetContextDestructorCallback_disp + &clSetContextDestructorCallback_disp, }; + +struct _cl_icd_dispatch khrShutdownDispatch = { + &clGetPlatformIDs_shutdown, + &clGetPlatformInfo_shutdown, + &clGetDeviceIDs_shutdown, + &clGetDeviceInfo_shutdown, + &clCreateContext_shutdown, + &clCreateContextFromType_shutdown, + &clRetainContext_shutdown, + &clReleaseContext_shutdown, + &clGetContextInfo_shutdown, + &clCreateCommandQueue_shutdown, + &clRetainCommandQueue_shutdown, + &clReleaseCommandQueue_shutdown, + &clGetCommandQueueInfo_shutdown, + &clSetCommandQueueProperty_shutdown, + &clCreateBuffer_shutdown, + &clCreateImage2D_shutdown, + &clCreateImage3D_shutdown, + &clRetainMemObject_shutdown, + &clReleaseMemObject_shutdown, + &clGetSupportedImageFormats_shutdown, + &clGetMemObjectInfo_shutdown, + &clGetImageInfo_shutdown, + &clCreateSampler_shutdown, + &clRetainSampler_shutdown, + &clReleaseSampler_shutdown, + &clGetSamplerInfo_shutdown, + &clCreateProgramWithSource_shutdown, + &clCreateProgramWithBinary_shutdown, + &clRetainProgram_shutdown, + &clReleaseProgram_shutdown, + &clBuildProgram_shutdown, + &clUnloadCompiler_shutdown, + &clGetProgramInfo_shutdown, + &clGetProgramBuildInfo_shutdown, + &clCreateKernel_shutdown, + &clCreateKernelsInProgram_shutdown, + &clRetainKernel_shutdown, + &clReleaseKernel_shutdown, + &clSetKernelArg_shutdown, + &clGetKernelInfo_shutdown, + &clGetKernelWorkGroupInfo_shutdown, + &clWaitForEvents_shutdown, + &clGetEventInfo_shutdown, + &clRetainEvent_shutdown, + &clReleaseEvent_shutdown, + &clGetEventProfilingInfo_shutdown, + &clFlush_shutdown, + &clFinish_shutdown, + &clEnqueueReadBuffer_shutdown, + &clEnqueueWriteBuffer_shutdown, + &clEnqueueCopyBuffer_shutdown, + &clEnqueueReadImage_shutdown, + &clEnqueueWriteImage_shutdown, + &clEnqueueCopyImage_shutdown, + &clEnqueueCopyImageToBuffer_shutdown, + &clEnqueueCopyBufferToImage_shutdown, + &clEnqueueMapBuffer_shutdown, + &clEnqueueMapImage_shutdown, + &clEnqueueUnmapMemObject_shutdown, + &clEnqueueNDRangeKernel_shutdown, + &clEnqueueTask_shutdown, + &clEnqueueNativeKernel_shutdown, + &clEnqueueMarker_shutdown, + &clEnqueueWaitForEvents_shutdown, + &clEnqueueBarrier_shutdown, + &clGetExtensionFunctionAddress_shutdown, + &clCreateFromGLBuffer_shutdown, + &clCreateFromGLTexture2D_shutdown, + &clCreateFromGLTexture3D_shutdown, + &clCreateFromGLRenderbuffer_shutdown, + &clGetGLObjectInfo_shutdown, + &clGetGLTextureInfo_shutdown, + &clEnqueueAcquireGLObjects_shutdown, + &clEnqueueReleaseGLObjects_shutdown, + &clGetGLContextInfoKHR_shutdown, + + /* cl_khr_d3d10_sharing */ +#if defined(_WIN32) + &clGetDeviceIDsFromD3D10KHR_shutdown, + &clCreateFromD3D10BufferKHR_shutdown, + &clCreateFromD3D10Texture2DKHR_shutdown, + &clCreateFromD3D10Texture3DKHR_shutdown, + &clEnqueueAcquireD3D10ObjectsKHR_shutdown, + &clEnqueueReleaseD3D10ObjectsKHR_shutdown, +#else + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +#endif + + /* OpenCL 1.1 */ + &clSetEventCallback_shutdown, + &clCreateSubBuffer_shutdown, + &clSetMemObjectDestructorCallback_shutdown, + &clCreateUserEvent_shutdown, + &clSetUserEventStatus_shutdown, + &clEnqueueReadBufferRect_shutdown, + &clEnqueueWriteBufferRect_shutdown, + &clEnqueueCopyBufferRect_shutdown, + + /* cl_ext_device_fission */ + &clCreateSubDevicesEXT_shutdown, + &clRetainDeviceEXT_shutdown, + &clReleaseDeviceEXT_shutdown, + + /* cl_khr_gl_event */ + &clCreateEventFromGLsyncKHR_shutdown, + + /* OpenCL 1.2 */ + &clCreateSubDevices_shutdown, + &clRetainDevice_shutdown, + &clReleaseDevice_shutdown, + &clCreateImage_shutdown, + &clCreateProgramWithBuiltInKernels_shutdown, + &clCompileProgram_shutdown, + &clLinkProgram_shutdown, + &clUnloadPlatformCompiler_shutdown, + &clGetKernelArgInfo_shutdown, + &clEnqueueFillBuffer_shutdown, + &clEnqueueFillImage_shutdown, + &clEnqueueMigrateMemObjects_shutdown, + &clEnqueueMarkerWithWaitList_shutdown, + &clEnqueueBarrierWithWaitList_shutdown, + &clGetExtensionFunctionAddressForPlatform_shutdown, + &clCreateFromGLTexture_shutdown, + + /* cl_khr_d3d11_sharing */ +#if defined(_WIN32) + &clGetDeviceIDsFromD3D11KHR_shutdown, + &clCreateFromD3D11BufferKHR_shutdown, + &clCreateFromD3D11Texture2DKHR_shutdown, + &clCreateFromD3D11Texture3DKHR_shutdown, + &clCreateFromDX9MediaSurfaceKHR_shutdown, + &clEnqueueAcquireD3D11ObjectsKHR_shutdown, + &clEnqueueReleaseD3D11ObjectsKHR_shutdown, +#else + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +#endif + + /* cl_khr_dx9_media_sharing */ +#if defined(_WIN32) + &clGetDeviceIDsFromDX9MediaAdapterKHR_shutdown, + &clEnqueueAcquireDX9MediaSurfacesKHR_shutdown, + &clEnqueueReleaseDX9MediaSurfacesKHR_shutdown, +#else + NULL, + NULL, + NULL, +#endif + + /* cl_khr_egl_image */ + &clCreateFromEGLImageKHR_shutdown, + &clEnqueueAcquireEGLObjectsKHR_shutdown, + &clEnqueueReleaseEGLObjectsKHR_shutdown, + + /* cl_khr_egl_event */ + &clCreateEventFromEGLSyncKHR_shutdown, + + /* OpenCL 2.0 */ + &clCreateCommandQueueWithProperties_shutdown, + &clCreatePipe_shutdown, + &clGetPipeInfo_shutdown, + &clSVMAlloc_shutdown, + &clSVMFree_shutdown, + &clEnqueueSVMFree_shutdown, + &clEnqueueSVMMemcpy_shutdown, + &clEnqueueSVMMemFill_shutdown, + &clEnqueueSVMMap_shutdown, + &clEnqueueSVMUnmap_shutdown, + &clCreateSamplerWithProperties_shutdown, + &clSetKernelArgSVMPointer_shutdown, + &clSetKernelExecInfo_shutdown, + + /* cl_khr_sub_groups */ + &clGetKernelSubGroupInfoKHR_shutdown, + + /* OpenCL 2.1 */ + &clCloneKernel_shutdown, + &clCreateProgramWithIL_shutdown, + &clEnqueueSVMMigrateMem_shutdown, + &clGetDeviceAndHostTimer_shutdown, + &clGetHostTimer_shutdown, + &clGetKernelSubGroupInfo_shutdown, + &clSetDefaultDeviceCommandQueue_shutdown, + + /* OpenCL 2.2 */ + &clSetProgramReleaseCallback_shutdown, + &clSetProgramSpecializationConstant_shutdown, + + /* OpenCL 3.0 */ + &clCreateBufferWithProperties_shutdown, + &clCreateImageWithProperties_shutdown, + &clSetContextDestructorCallback_shutdown, +}; + #endif // defined(CL_ENABLE_LAYERS) + #ifdef __cplusplus } #endif diff --git a/scripts/icd_dispatch_generated.c.mako b/scripts/icd_dispatch_generated.c.mako index 05a26fc5..0e3f34c4 100644 --- a/scripts/icd_dispatch_generated.c.mako +++ b/scripts/icd_dispatch_generated.c.mako @@ -47,10 +47,9 @@ apihandles = { extern "C" { #endif -/////////////////////////////////////////////////////////////////////////////// -// Core APIs: %for apis in coreapis.values(): %for api in apis: +/////////////////////////////////////////////////////////////////////////////// %if not api.Name in apiskip: <% handle = api.Params[0] @@ -158,9 +157,9 @@ ${("CL_API_ENTRY", "static")[disp]} ${api.RetType} CL_API_CALL ${api.Name + ("", #endif // defined(CL_ENABLE_LAYERS) % endif -/////////////////////////////////////////////////////////////////////////////// %endfor %else: + #if defined(CL_ENABLE_LAYERS) extern ${api.RetType} CL_API_CALL ${api.Name + "_disp"}( %for i, param in enumerate(api.Params): @@ -171,7 +170,35 @@ extern ${api.RetType} CL_API_CALL ${api.Name + "_disp"}( % endif %endfor #endif // defined(CL_ENABLE_LAYERS) + %endif +#if defined(CL_ENABLE_LAYERS) +static ${api.RetType} CL_API_CALL ${api.Name}_shutdown( +%for i, param in enumerate(api.Params): +% if i < len(api.Params)-1: + ${param.Type} ${param.Name}${param.TypeEnd}, +% else: + ${param.Type} ${param.Name}${param.TypeEnd}) +% endif +%endfor +{ +%for i, param in enumerate(api.Params): +% if param.Name != "" and param.Name != "errcode_ret": + (void)${param.Name}; +% endif +%endfor +%if api.Name in ["clSVMFree"]: + // Nothing! +%elif api.Name in ["clSVMAlloc", "clGetExtensionFunctionAddress", "clGetExtensionFunctionAddressForPlatform"]: + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, NULL); +%elif api.RetType in apihandles or api.RetType == "void*": + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +%else: + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +%endif +} +#endif // defined(CL_ENABLE_LAYERS) + %endfor %endfor <% @@ -195,12 +222,14 @@ win32extensions = { %for extension in icdextensions: <% apis = extapis[extension] -%>// ${extension} +%> %if extension in win32extensions: - #if defined(_WIN32) + %endif %for api in apis: +/////////////////////////////////////////////////////////////////////////////// +// ${extension} <% handle = api.Params[0] if handle.Type in apihandles: @@ -210,6 +239,7 @@ win32extensions = { %> %for disp in [0, 1]: % if disp == 1: + #if defined(CL_ENABLE_LAYERS) % endif ${("CL_API_ENTRY", "static")[disp]} ${api.RetType} CL_API_CALL ${api.Name + ("", "_disp")[disp]}( @@ -267,19 +297,42 @@ ${("CL_API_ENTRY", "static")[disp]} ${api.RetType} CL_API_CALL ${api.Name + ("", } % if disp == 1: #endif // defined(CL_ENABLE_LAYERS) + % endif %endfor +#if defined(CL_ENABLE_LAYERS) +static ${api.RetType} CL_API_CALL ${api.Name}_shutdown( +%for i, param in enumerate(api.Params): +% if i < len(api.Params)-1: + ${param.Type} ${param.Name}${param.TypeEnd}, +% else: + ${param.Type} ${param.Name}${param.TypeEnd}) +% endif +%endfor +{ +%for i, param in enumerate(api.Params): +% if param.Name != "" and param.Name != "errcode_ret": + (void)${param.Name}; +% endif %endfor +%if api.RetType in apihandles: + KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(NULL, CL_INVALID_OPERATION); +%else: + KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(NULL, CL_INVALID_OPERATION); +%endif +} +#endif // defined(CL_ENABLE_LAYERS) +%endfor %if extension in win32extensions: #endif // defined(_WIN32) - %endif +%endfor /////////////////////////////////////////////////////////////////////////////// -%endfor #if defined(CL_ENABLE_LAYERS) -struct _cl_icd_dispatch khrMasterDispatch = { + +struct _cl_icd_dispatch khrActualDispatch = { &clGetPlatformIDs_disp, &clGetPlatformInfo_disp, &clGetDeviceIDs_disp, @@ -356,7 +409,7 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clEnqueueReleaseGLObjects_disp, &clGetGLContextInfoKHR_disp, - /* cl_khr_d3d10_sharing */ + /* cl_khr_d3d10_sharing */ #if defined(_WIN32) &clGetDeviceIDsFromD3D10KHR_disp, &clCreateFromD3D10BufferKHR_disp, @@ -373,7 +426,7 @@ struct _cl_icd_dispatch khrMasterDispatch = { NULL, #endif - /* OpenCL 1.1 */ + /* OpenCL 1.1 */ &clSetEventCallback_disp, &clCreateSubBuffer_disp, &clSetMemObjectDestructorCallback_disp, @@ -383,15 +436,15 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clEnqueueWriteBufferRect_disp, &clEnqueueCopyBufferRect_disp, - /* cl_ext_device_fission */ + /* cl_ext_device_fission */ &clCreateSubDevicesEXT_disp, &clRetainDeviceEXT_disp, &clReleaseDeviceEXT_disp, - /* cl_khr_gl_event */ + /* cl_khr_gl_event */ &clCreateEventFromGLsyncKHR_disp, - /* OpenCL 1.2 */ + /* OpenCL 1.2 */ &clCreateSubDevices_disp, &clRetainDevice_disp, &clReleaseDevice_disp, @@ -409,7 +462,7 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clGetExtensionFunctionAddressForPlatform_disp, &clCreateFromGLTexture_disp, - /* cl_khr_d3d11_sharing */ + /* cl_khr_d3d11_sharing */ #if defined(_WIN32) &clGetDeviceIDsFromD3D11KHR_disp, &clCreateFromD3D11BufferKHR_disp, @@ -428,7 +481,7 @@ struct _cl_icd_dispatch khrMasterDispatch = { NULL, #endif - /* cl_khr_dx9_media_sharing */ + /* cl_khr_dx9_media_sharing */ #if defined(_WIN32) &clGetDeviceIDsFromDX9MediaAdapterKHR_disp, &clEnqueueAcquireDX9MediaSurfacesKHR_disp, @@ -439,15 +492,15 @@ struct _cl_icd_dispatch khrMasterDispatch = { NULL, #endif - /* cl_khr_egl_image */ + /* cl_khr_egl_image */ &clCreateFromEGLImageKHR_disp, &clEnqueueAcquireEGLObjectsKHR_disp, &clEnqueueReleaseEGLObjectsKHR_disp, - /* cl_khr_egl_event */ + /* cl_khr_egl_event */ &clCreateEventFromEGLSyncKHR_disp, - /* OpenCL 2.0 */ + /* OpenCL 2.0 */ &clCreateCommandQueueWithProperties_disp, &clCreatePipe_disp, &clGetPipeInfo_disp, @@ -462,10 +515,10 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clSetKernelArgSVMPointer_disp, &clSetKernelExecInfo_disp, - /* cl_khr_sub_groups */ + /* cl_khr_sub_groups */ &clGetKernelSubGroupInfoKHR_disp, - /* OpenCL 2.1 */ + /* OpenCL 2.1 */ &clCloneKernel_disp, &clCreateProgramWithIL_disp, &clEnqueueSVMMigrateMem_disp, @@ -474,16 +527,223 @@ struct _cl_icd_dispatch khrMasterDispatch = { &clGetKernelSubGroupInfo_disp, &clSetDefaultDeviceCommandQueue_disp, - /* OpenCL 2.2 */ + /* OpenCL 2.2 */ &clSetProgramReleaseCallback_disp, &clSetProgramSpecializationConstant_disp, - /* OpenCL 3.0 */ + /* OpenCL 3.0 */ &clCreateBufferWithProperties_disp, &clCreateImageWithProperties_disp, - &clSetContextDestructorCallback_disp + &clSetContextDestructorCallback_disp, +}; + +struct _cl_icd_dispatch khrShutdownDispatch = { + &clGetPlatformIDs_shutdown, + &clGetPlatformInfo_shutdown, + &clGetDeviceIDs_shutdown, + &clGetDeviceInfo_shutdown, + &clCreateContext_shutdown, + &clCreateContextFromType_shutdown, + &clRetainContext_shutdown, + &clReleaseContext_shutdown, + &clGetContextInfo_shutdown, + &clCreateCommandQueue_shutdown, + &clRetainCommandQueue_shutdown, + &clReleaseCommandQueue_shutdown, + &clGetCommandQueueInfo_shutdown, + &clSetCommandQueueProperty_shutdown, + &clCreateBuffer_shutdown, + &clCreateImage2D_shutdown, + &clCreateImage3D_shutdown, + &clRetainMemObject_shutdown, + &clReleaseMemObject_shutdown, + &clGetSupportedImageFormats_shutdown, + &clGetMemObjectInfo_shutdown, + &clGetImageInfo_shutdown, + &clCreateSampler_shutdown, + &clRetainSampler_shutdown, + &clReleaseSampler_shutdown, + &clGetSamplerInfo_shutdown, + &clCreateProgramWithSource_shutdown, + &clCreateProgramWithBinary_shutdown, + &clRetainProgram_shutdown, + &clReleaseProgram_shutdown, + &clBuildProgram_shutdown, + &clUnloadCompiler_shutdown, + &clGetProgramInfo_shutdown, + &clGetProgramBuildInfo_shutdown, + &clCreateKernel_shutdown, + &clCreateKernelsInProgram_shutdown, + &clRetainKernel_shutdown, + &clReleaseKernel_shutdown, + &clSetKernelArg_shutdown, + &clGetKernelInfo_shutdown, + &clGetKernelWorkGroupInfo_shutdown, + &clWaitForEvents_shutdown, + &clGetEventInfo_shutdown, + &clRetainEvent_shutdown, + &clReleaseEvent_shutdown, + &clGetEventProfilingInfo_shutdown, + &clFlush_shutdown, + &clFinish_shutdown, + &clEnqueueReadBuffer_shutdown, + &clEnqueueWriteBuffer_shutdown, + &clEnqueueCopyBuffer_shutdown, + &clEnqueueReadImage_shutdown, + &clEnqueueWriteImage_shutdown, + &clEnqueueCopyImage_shutdown, + &clEnqueueCopyImageToBuffer_shutdown, + &clEnqueueCopyBufferToImage_shutdown, + &clEnqueueMapBuffer_shutdown, + &clEnqueueMapImage_shutdown, + &clEnqueueUnmapMemObject_shutdown, + &clEnqueueNDRangeKernel_shutdown, + &clEnqueueTask_shutdown, + &clEnqueueNativeKernel_shutdown, + &clEnqueueMarker_shutdown, + &clEnqueueWaitForEvents_shutdown, + &clEnqueueBarrier_shutdown, + &clGetExtensionFunctionAddress_shutdown, + &clCreateFromGLBuffer_shutdown, + &clCreateFromGLTexture2D_shutdown, + &clCreateFromGLTexture3D_shutdown, + &clCreateFromGLRenderbuffer_shutdown, + &clGetGLObjectInfo_shutdown, + &clGetGLTextureInfo_shutdown, + &clEnqueueAcquireGLObjects_shutdown, + &clEnqueueReleaseGLObjects_shutdown, + &clGetGLContextInfoKHR_shutdown, + + /* cl_khr_d3d10_sharing */ +#if defined(_WIN32) + &clGetDeviceIDsFromD3D10KHR_shutdown, + &clCreateFromD3D10BufferKHR_shutdown, + &clCreateFromD3D10Texture2DKHR_shutdown, + &clCreateFromD3D10Texture3DKHR_shutdown, + &clEnqueueAcquireD3D10ObjectsKHR_shutdown, + &clEnqueueReleaseD3D10ObjectsKHR_shutdown, +#else + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +#endif + + /* OpenCL 1.1 */ + &clSetEventCallback_shutdown, + &clCreateSubBuffer_shutdown, + &clSetMemObjectDestructorCallback_shutdown, + &clCreateUserEvent_shutdown, + &clSetUserEventStatus_shutdown, + &clEnqueueReadBufferRect_shutdown, + &clEnqueueWriteBufferRect_shutdown, + &clEnqueueCopyBufferRect_shutdown, + + /* cl_ext_device_fission */ + &clCreateSubDevicesEXT_shutdown, + &clRetainDeviceEXT_shutdown, + &clReleaseDeviceEXT_shutdown, + + /* cl_khr_gl_event */ + &clCreateEventFromGLsyncKHR_shutdown, + + /* OpenCL 1.2 */ + &clCreateSubDevices_shutdown, + &clRetainDevice_shutdown, + &clReleaseDevice_shutdown, + &clCreateImage_shutdown, + &clCreateProgramWithBuiltInKernels_shutdown, + &clCompileProgram_shutdown, + &clLinkProgram_shutdown, + &clUnloadPlatformCompiler_shutdown, + &clGetKernelArgInfo_shutdown, + &clEnqueueFillBuffer_shutdown, + &clEnqueueFillImage_shutdown, + &clEnqueueMigrateMemObjects_shutdown, + &clEnqueueMarkerWithWaitList_shutdown, + &clEnqueueBarrierWithWaitList_shutdown, + &clGetExtensionFunctionAddressForPlatform_shutdown, + &clCreateFromGLTexture_shutdown, + + /* cl_khr_d3d11_sharing */ +#if defined(_WIN32) + &clGetDeviceIDsFromD3D11KHR_shutdown, + &clCreateFromD3D11BufferKHR_shutdown, + &clCreateFromD3D11Texture2DKHR_shutdown, + &clCreateFromD3D11Texture3DKHR_shutdown, + &clCreateFromDX9MediaSurfaceKHR_shutdown, + &clEnqueueAcquireD3D11ObjectsKHR_shutdown, + &clEnqueueReleaseD3D11ObjectsKHR_shutdown, +#else + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +#endif + + /* cl_khr_dx9_media_sharing */ +#if defined(_WIN32) + &clGetDeviceIDsFromDX9MediaAdapterKHR_shutdown, + &clEnqueueAcquireDX9MediaSurfacesKHR_shutdown, + &clEnqueueReleaseDX9MediaSurfacesKHR_shutdown, +#else + NULL, + NULL, + NULL, +#endif + + /* cl_khr_egl_image */ + &clCreateFromEGLImageKHR_shutdown, + &clEnqueueAcquireEGLObjectsKHR_shutdown, + &clEnqueueReleaseEGLObjectsKHR_shutdown, + + /* cl_khr_egl_event */ + &clCreateEventFromEGLSyncKHR_shutdown, + + /* OpenCL 2.0 */ + &clCreateCommandQueueWithProperties_shutdown, + &clCreatePipe_shutdown, + &clGetPipeInfo_shutdown, + &clSVMAlloc_shutdown, + &clSVMFree_shutdown, + &clEnqueueSVMFree_shutdown, + &clEnqueueSVMMemcpy_shutdown, + &clEnqueueSVMMemFill_shutdown, + &clEnqueueSVMMap_shutdown, + &clEnqueueSVMUnmap_shutdown, + &clCreateSamplerWithProperties_shutdown, + &clSetKernelArgSVMPointer_shutdown, + &clSetKernelExecInfo_shutdown, + + /* cl_khr_sub_groups */ + &clGetKernelSubGroupInfoKHR_shutdown, + + /* OpenCL 2.1 */ + &clCloneKernel_shutdown, + &clCreateProgramWithIL_shutdown, + &clEnqueueSVMMigrateMem_shutdown, + &clGetDeviceAndHostTimer_shutdown, + &clGetHostTimer_shutdown, + &clGetKernelSubGroupInfo_shutdown, + &clSetDefaultDeviceCommandQueue_shutdown, + + /* OpenCL 2.2 */ + &clSetProgramReleaseCallback_shutdown, + &clSetProgramSpecializationConstant_shutdown, + + /* OpenCL 3.0 */ + &clCreateBufferWithProperties_shutdown, + &clCreateImageWithProperties_shutdown, + &clSetContextDestructorCallback_shutdown, }; + #endif // defined(CL_ENABLE_LAYERS) + #ifdef __cplusplus } #endif