Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/opencl/make_opencl | 15 +++++++++++++++ dlls/opencl/unix_thunks.c | 6 ------ dlls/opencl/unixlib.h | 1 - 3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/opencl/make_opencl b/dlls/opencl/make_opencl index 4859a45b292..72b7386d1e2 100755 --- a/dlls/opencl/make_opencl +++ b/dlls/opencl/make_opencl @@ -238,6 +238,18 @@ sub needs_unix_wrapper($) return defined $funcs{$name}; }
+# don't bother putting unused functions in the interface +sub needs_unix_function($) +{ + my %funcs = + ( + "clGetExtensionFunctionAddress" => 1, + ); + my $name = shift; + + return not defined $funcs{$name}; +} + sub generate_struct($) { my $type = shift; @@ -382,6 +394,7 @@ EOF
foreach (sort keys %core_functions) { + next unless needs_unix_function( $_ ); next if needs_unix_wrapper( $_ ); print UNIX "\n", generate_unix_thunk( $_, $core_functions{$_} ); } @@ -389,6 +402,7 @@ foreach (sort keys %core_functions) print UNIX "\nconst struct opencl_funcs funcs =\n{\n"; foreach (sort keys %core_functions) { + next unless needs_unix_function( $_ ); print UNIX " wrap_" . $_ . ",\n"; } print UNIX "};\n"; @@ -403,6 +417,7 @@ print UNIXHEADER "/* Automatically generated from OpenCL registry files; DO NOT print UNIXHEADER "struct opencl_funcs\n{\n"; foreach (sort keys %core_functions) { + next unless needs_unix_function( $_ ); print UNIXHEADER get_func_proto( " %s (WINAPI *p%s)(%s);\n", $_, $core_functions{$_} ); } print UNIXHEADER "};\n\n"; diff --git a/dlls/opencl/unix_thunks.c b/dlls/opencl/unix_thunks.c index 084131468d6..0fe3a081e0b 100644 --- a/dlls/opencl/unix_thunks.c +++ b/dlls/opencl/unix_thunks.c @@ -172,11 +172,6 @@ static cl_int WINAPI wrap_clGetEventProfilingInfo( cl_event event, cl_profiling_ return clGetEventProfilingInfo( event, param_name, param_value_size, param_value, param_value_size_ret ); }
-static void* WINAPI wrap_clGetExtensionFunctionAddress( const char* func_name ) -{ - return clGetExtensionFunctionAddress( func_name ); -} - static cl_int WINAPI wrap_clGetImageInfo( cl_mem image, cl_image_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret ) { return clGetImageInfo( image, param_name, param_value_size, param_value, param_value_size_ret ); @@ -356,7 +351,6 @@ const struct opencl_funcs funcs = wrap_clGetDeviceInfo, wrap_clGetEventInfo, wrap_clGetEventProfilingInfo, - wrap_clGetExtensionFunctionAddress, wrap_clGetImageInfo, wrap_clGetKernelInfo, wrap_clGetKernelWorkGroupInfo, diff --git a/dlls/opencl/unixlib.h b/dlls/opencl/unixlib.h index b6e53c30330..e0d01317db7 100644 --- a/dlls/opencl/unixlib.h +++ b/dlls/opencl/unixlib.h @@ -39,7 +39,6 @@ struct opencl_funcs cl_int (WINAPI *pclGetDeviceInfo)( cl_device_id device, cl_device_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret ); cl_int (WINAPI *pclGetEventInfo)( cl_event event, cl_event_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret ); cl_int (WINAPI *pclGetEventProfilingInfo)( cl_event event, cl_profiling_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret ); - void* (WINAPI *pclGetExtensionFunctionAddress)( const char* func_name ); cl_int (WINAPI *pclGetImageInfo)( cl_mem image, cl_image_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret ); cl_int (WINAPI *pclGetKernelInfo)( cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret ); cl_int (WINAPI *pclGetKernelWorkGroupInfo)( 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 );
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- Thanks to Gijs Vermeulen and Dean Greer for finding this.
dlls/opencl/make_opencl | 4 ++++ dlls/opencl/pe_thunks.c | 6 ------ dlls/opencl/pe_wrappers.c | 9 +++++++++ dlls/opencl/unix_thunks.c | 6 ------ dlls/opencl/unixlib.h | 1 - 5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/opencl/make_opencl b/dlls/opencl/make_opencl index 72b7386d1e2..f30967ff384 100755 --- a/dlls/opencl/make_opencl +++ b/dlls/opencl/make_opencl @@ -216,6 +216,9 @@ sub needs_pe_wrapper($)
# needs function pointer conversion "clGetExtensionFunctionAddress" => 1, + + # deprecated and absent from headers + "clSetCommandQueueProperty" => 1, ); my $name = shift;
@@ -244,6 +247,7 @@ sub needs_unix_function($) my %funcs = ( "clGetExtensionFunctionAddress" => 1, + "clSetCommandQueueProperty" => 1, ); my $name = shift;
diff --git a/dlls/opencl/pe_thunks.c b/dlls/opencl/pe_thunks.c index b3b08688d16..eb0466b6286 100644 --- a/dlls/opencl/pe_thunks.c +++ b/dlls/opencl/pe_thunks.c @@ -360,12 +360,6 @@ cl_int WINAPI clRetainSampler( cl_sampler sampler ) return opencl_funcs->pclRetainSampler( sampler ); }
-cl_int WINAPI clSetCommandQueueProperty( cl_command_queue command_queue, cl_command_queue_properties properties, cl_bool enable, cl_command_queue_properties* old_properties ) -{ - TRACE( "(%p, %s, %u, %p)\n", command_queue, wine_dbgstr_longlong(properties), enable, old_properties ); - return opencl_funcs->pclSetCommandQueueProperty( command_queue, properties, enable, old_properties ); -} - cl_int WINAPI clSetKernelArg( cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value ) { TRACE( "(%p, %u, %Iu, %p)\n", kernel, arg_index, arg_size, arg_value ); diff --git a/dlls/opencl/pe_wrappers.c b/dlls/opencl/pe_wrappers.c index 37be38c728f..35c78181580 100644 --- a/dlls/opencl/pe_wrappers.c +++ b/dlls/opencl/pe_wrappers.c @@ -118,6 +118,15 @@ void * WINAPI clGetExtensionFunctionAddress( const char *func_name ) return ret; }
+ +cl_int WINAPI clSetCommandQueueProperty( cl_command_queue command_queue, cl_command_queue_properties properties, + cl_bool enable, cl_command_queue_properties *old_properties ) +{ + FIXME( "(%p, %s, %u, %p) deprecated\n", command_queue, wine_dbgstr_longlong(properties), enable, old_properties ); + return CL_INVALID_QUEUE_PROPERTIES; +} + + BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) { if (reason == DLL_PROCESS_ATTACH) diff --git a/dlls/opencl/unix_thunks.c b/dlls/opencl/unix_thunks.c index 0fe3a081e0b..579c12eed79 100644 --- a/dlls/opencl/unix_thunks.c +++ b/dlls/opencl/unix_thunks.c @@ -292,11 +292,6 @@ static cl_int WINAPI wrap_clRetainSampler( cl_sampler sampler ) return clRetainSampler( sampler ); }
-static cl_int WINAPI wrap_clSetCommandQueueProperty( cl_command_queue command_queue, cl_command_queue_properties properties, cl_bool enable, cl_command_queue_properties* old_properties ) -{ - return clSetCommandQueueProperty( command_queue, properties, enable, old_properties ); -} - static cl_int WINAPI wrap_clSetKernelArg( cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value ) { return clSetKernelArg( kernel, arg_index, arg_size, arg_value ); @@ -375,7 +370,6 @@ const struct opencl_funcs funcs = wrap_clRetainMemObject, wrap_clRetainProgram, wrap_clRetainSampler, - wrap_clSetCommandQueueProperty, wrap_clSetKernelArg, wrap_clUnloadCompiler, wrap_clWaitForEvents, diff --git a/dlls/opencl/unixlib.h b/dlls/opencl/unixlib.h index e0d01317db7..d5b1da1b99e 100644 --- a/dlls/opencl/unixlib.h +++ b/dlls/opencl/unixlib.h @@ -63,7 +63,6 @@ struct opencl_funcs cl_int (WINAPI *pclRetainMemObject)( cl_mem memobj ); cl_int (WINAPI *pclRetainProgram)( cl_program program ); cl_int (WINAPI *pclRetainSampler)( cl_sampler sampler ); - cl_int (WINAPI *pclSetCommandQueueProperty)( cl_command_queue command_queue, cl_command_queue_properties properties, cl_bool enable, cl_command_queue_properties* old_properties ); cl_int (WINAPI *pclSetKernelArg)( cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value ); cl_int (WINAPI *pclUnloadCompiler)( void ); cl_int (WINAPI *pclWaitForEvents)( cl_uint num_events, const cl_event* event_list );