opencl: Don't bother generating a Unix function table entry for clGetExtensionFunctionAddress().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-03-18 23:06:31 -05:00 committed by Alexandre Julliard
parent 6d26689484
commit ceb72abde2
3 changed files with 15 additions and 7 deletions

View File

@ -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";

View File

@ -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,

View File

@ -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 );