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:
parent
6d26689484
commit
ceb72abde2
|
@ -238,6 +238,18 @@ sub needs_unix_wrapper($)
|
||||||
return defined $funcs{$name};
|
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($)
|
sub generate_struct($)
|
||||||
{
|
{
|
||||||
my $type = shift;
|
my $type = shift;
|
||||||
|
@ -382,6 +394,7 @@ EOF
|
||||||
|
|
||||||
foreach (sort keys %core_functions)
|
foreach (sort keys %core_functions)
|
||||||
{
|
{
|
||||||
|
next unless needs_unix_function( $_ );
|
||||||
next if needs_unix_wrapper( $_ );
|
next if needs_unix_wrapper( $_ );
|
||||||
print UNIX "\n", generate_unix_thunk( $_, $core_functions{$_} );
|
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";
|
print UNIX "\nconst struct opencl_funcs funcs =\n{\n";
|
||||||
foreach (sort keys %core_functions)
|
foreach (sort keys %core_functions)
|
||||||
{
|
{
|
||||||
|
next unless needs_unix_function( $_ );
|
||||||
print UNIX " wrap_" . $_ . ",\n";
|
print UNIX " wrap_" . $_ . ",\n";
|
||||||
}
|
}
|
||||||
print UNIX "};\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";
|
print UNIXHEADER "struct opencl_funcs\n{\n";
|
||||||
foreach (sort keys %core_functions)
|
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 get_func_proto( " %s (WINAPI *p%s)(%s);\n", $_, $core_functions{$_} );
|
||||||
}
|
}
|
||||||
print UNIXHEADER "};\n\n";
|
print UNIXHEADER "};\n\n";
|
||||||
|
|
|
@ -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 );
|
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 )
|
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 );
|
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_clGetDeviceInfo,
|
||||||
wrap_clGetEventInfo,
|
wrap_clGetEventInfo,
|
||||||
wrap_clGetEventProfilingInfo,
|
wrap_clGetEventProfilingInfo,
|
||||||
wrap_clGetExtensionFunctionAddress,
|
|
||||||
wrap_clGetImageInfo,
|
wrap_clGetImageInfo,
|
||||||
wrap_clGetKernelInfo,
|
wrap_clGetKernelInfo,
|
||||||
wrap_clGetKernelWorkGroupInfo,
|
wrap_clGetKernelWorkGroupInfo,
|
||||||
|
|
|
@ -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 *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 *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 );
|
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 *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 *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 );
|
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 );
|
||||||
|
|
Loading…
Reference in New Issue