opencl: Generate the spec file and thunks from the official XML registry file.

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-09 17:13:11 -06:00 committed by Alexandre Julliard
parent 0c216c5d57
commit b3bd08d8dd
6 changed files with 768 additions and 763 deletions

View File

@ -2,4 +2,5 @@ MODULE = opencl.dll
EXTRALIBS = $(OPENCL_LIBS)
C_SRCS = \
opencl.c
opencl.c \
opencl_thunks.c

299
dlls/opencl/make_opencl Executable file
View File

@ -0,0 +1,299 @@
#!/usr/bin/perl -w
use strict;
use XML::LibXML;
# Copyright 2021 Zebediah Figura
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
# Files to generate
my $spec_file = "opencl.spec";
my $thunks_file = "opencl_thunks.c";
# If set to 1, generate TRACEs for each OpenGL function
my $gen_traces = 1;
# List of categories to put in the 'opengl_core.c' file
my %cat_1_0 = ( "CL_VERSION_1_0" => 1 );
my %core_categories = ();
my %arg_types =
(
"cl_bitfield" => [ "int64", "wine_dbgstr_longlong(%s)" ],
"double" => [ "double", "%.16e" ],
"float" => [ "float", "%.8e" ],
"int" => [ "long", "%d" ],
"int8_t" => [ "long", "%d" ],
"int16_t" => [ "long", "%d" ],
"int32_t" => [ "long", "%d" ],
"int64_t" => [ "int64", "wine_dbgstr_longlong(%s)" ],
"intptr_t" => [ "long", "%ld" ],
"size_t" => [ "long", "%zu" ],
"uint8_t" => [ "long", "%u" ],
"uint16_t" => [ "long", "%u" ],
"uint32_t" => [ "long", "%u" ],
"uint64_t" => [ "int64", "wine_dbgstr_longlong(%s)" ],
"unsigned int" => [ "long", "%u" ],
);
sub generate_thunk($$)
{
my ($name, $func_ref) = @_;
my $call_arg = "";
my $trace_call_arg = "";
my $trace_arg = "";
my $ret = get_func_proto( "%s WINAPI wine_%s(%s)", $name, $func_ref );
foreach my $arg (@{$func_ref->[1]})
{
my $ptype = get_arg_type( $arg );
next unless $arg->findnodes("./name");
my $pname = get_arg_name( $arg );
my $param = $arg->textContent();
$call_arg .= " " . $pname . ",";
if ($param =~ /\*/ || $param =~ /\[/)
{
$trace_arg .= ", %p";
$trace_call_arg .= ", " . $pname;
}
elsif (defined $arg_types{$ptype})
{
my $format = ${$arg_types{$ptype}}[1];
$trace_arg .= ", " . ($format =~ /^%/ ? $format : "%s");
$trace_call_arg .= ", " . sprintf $format =~ /^%/ ? "%s" : $format, $pname;
}
else
{
die "Unknown type %s in %s\n", $param, $name;
}
}
$call_arg =~ s/,$/ /;
$trace_arg =~ s/^, //;
$ret .= "\n{\n";
$ret .= " TRACE( \"($trace_arg)\\n\"$trace_call_arg );\n" if $gen_traces;
$ret .= " ";
$ret .= "return " unless is_void_func( $func_ref );
$ret .= "$name($call_arg);\n";
$ret .= "}\n";
return $ret;
}
sub is_void_func($)
{
my $func = shift;
return 0 if @{$func->[0]->findnodes("./type")};
return $func->[0]->textContent() eq "void";
}
sub get_arg_type($)
{
my $p = shift;
my @type = $p->findnodes("./type");
return @type ? $type[0]->textContent() : "cl_int";
}
sub get_arg_name($)
{
my $p = shift;
my @name = $p->findnodes("./name");
return $name[0]->textContent();
}
sub get_func_proto($$$)
{
my ($format, $name, $func) = @_;
die "unknown func $name" unless defined $func->[0];
my $proto = $func->[0]->textContent();
$proto =~ s/ +$//;
my $args = "";
foreach my $arg (@{$func->[1]})
{
(my $argtext = $arg->textContent()) =~ s/ +/ /g;
$args .= " " . $argtext . ",";
}
$args =~ s/,$/ /;
$args ||= "void";
return sprintf $format, $proto, $name, $args;
}
# extract and check the number of arguments
if (@ARGV > 1)
{
my $name0 = $0;
$name0 =~ s%^.*/%%;
die "Usage: $name0 [version]\n";
}
my $version = $ARGV[0] || "1.0";
if ($version eq "1.0")
{
%core_categories = %cat_1_0;
}
else
{
die "Incorrect OpenCL version.\n";
}
my $url = "https://raw.githubusercontent.com/KhronosGroup/OpenCL-Docs";
my $commit = "514965312a65e5d01ae17e23119dc95427b7149e";
-f "cl-$commit.xml" || system "wget", "-O", "cl-$commit.xml", "$url/$commit/xml/cl.xml" || die "cannot download cl.xml";
sub generate_spec_entry($$)
{
my ($name, $func) = @_;
my $args=" ";
foreach my $arg (@{$func->[1]})
{
my $ptype = get_arg_type( $arg );
my $param = $arg->textContent();
if ($param =~ /[[*]/)
{
$args .= "ptr ";
}
elsif (defined($arg_types{$ptype}))
{
$args .= "$@$arg_types{$ptype}[0] ";
}
elsif ($ptype ne "void")
{
die "No conversion for func $name type $param\n";
}
}
$args = substr($args,1,-1);
return "@ stdcall $_($args) wine_$_";
}
my %core_functions;
my %cl_enums;
my (%cl_types, @cl_types); # also use an array to preserve declaration order
# some functions need a hand-written wrapper
sub needs_wrapper($)
{
my %funcs =
(
# need callback conversion
"clBuildProgram" => 1,
"clCreateContext" => 1,
"clCreateContextFromType" => 1,
"clEnqueueNativeKernel" => 1,
# need extension filtering
"clGetDeviceInfo" => 1,
"clGetPlatformInfo" => 1,
# needs function pointer conversion
"clGetExtensionFunctionAddress" => 1,
);
my $name = shift;
return defined $funcs{$name};
}
sub parse_file($)
{
my $file = shift;
my $xml = XML::LibXML->load_xml( location => $file );
my %functions;
my %enums;
# save all functions
foreach my $command ($xml->findnodes("/registry/commands/command"))
{
my $proto = @{$command->findnodes("./proto")}[0];
my $name = @{$command->findnodes("./proto/name")}[0];
$proto->removeChild( $name );
my @params = $command->findnodes("./param");
$functions{$name->textContent()} = [ $proto, \@params ];
}
# save all enums
foreach my $enum ($xml->findnodes("/registry/enums/enum"))
{
$enums{$enum->{name}} = $enum->{value};
}
# save all types
foreach my $type ($xml->findnodes("/registry/types/type"))
{
my $name = @{$type->findnodes("./name")}[0];
next unless $name;
$name = $name->textContent;
push @cl_types, $name unless $cl_types{$name};
$cl_types{$name} = $type;
if ($type->{category} eq "define" and not defined($arg_types{$name}))
{
my $basetype = @{$type->findnodes("./type")}[0];
if ($type->textContent() =~ /[[*]/)
{
$arg_types{$name} = ["ptr", "%p"];
}
elsif (defined($basetype) and defined($arg_types{$basetype->textContent}))
{
$arg_types{$name} = $arg_types{$basetype->textContent};
}
elsif ($name ne "cl_icd_dispatch")
{
die "No conversion for type $name\n"
}
}
}
# generate core functions
foreach my $feature ($xml->findnodes("/registry/feature"))
{
next unless defined $core_categories{$feature->{name}};
foreach my $cmd ($feature->findnodes("./require/command"))
{
$core_functions{$cmd->{name}} = $functions{$cmd->{name}};
}
foreach my $enum ($feature->findnodes("./require/enum"))
{
$cl_enums{$enum->{name}} = $enums{$enum->{name}};
}
}
}
parse_file( "cl-$commit.xml" );
# generate the spec file
open(SPEC, ">$spec_file") or die "cannot create $spec_file";
foreach (sort keys %core_functions)
{
printf SPEC "%s\n", generate_spec_entry( $_, $core_functions{$_} );
}
close(SPEC);
my $file_header =
"/* Automatically generated from OpenCL registry files; DO NOT EDIT! */\n\n" .
"#include \"config.h\"\n" .
"#include \"opencl_private.h\"\n\n";
$file_header .= "WINE_DEFAULT_DEBUG_CHANNEL(opencl);\n" if $gen_traces;
# generate the thunks file
open(THUNKS, ">$thunks_file") or die "cannot create $thunks_file";
print THUNKS $file_header;
foreach (sort keys %core_functions)
{
next if needs_wrapper( $_ );
print THUNKS "\n", generate_thunk( $_, $core_functions{$_} );
}
close(THUNKS);

View File

@ -19,43 +19,10 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
#include "opencl_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(opencl);
#define CL_SILENCE_DEPRECATION
#if defined(HAVE_CL_CL_H)
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
#define CL_TARGET_OPENCL_VERSION 220
#include <CL/cl.h>
#elif defined(HAVE_OPENCL_OPENCL_H)
#include <OpenCL/opencl.h>
#endif
/* TODO: Figure out how to provide GL context sharing before enabling OpenGL */
#define OPENCL_WITH_GL 0
/*---------------------------------------------------------------*/
/* Platform API */
cl_int WINAPI wine_clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms)
{
cl_int ret;
TRACE("(%d, %p, %p)\n", num_entries, platforms, num_platforms);
ret = clGetPlatformIDs(num_entries, platforms, num_platforms);
TRACE("(%d, %p, %p)=%d\n", num_entries, platforms, num_platforms, ret);
return ret;
}
cl_int WINAPI wine_clGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name,
SIZE_T param_value_size, void * param_value, size_t * param_value_size_ret)
{
@ -92,19 +59,6 @@ cl_int WINAPI wine_clGetPlatformInfo(cl_platform_id platform, cl_platform_info p
}
/*---------------------------------------------------------------*/
/* Device APIs */
cl_int WINAPI wine_clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type,
cl_uint num_entries, cl_device_id * devices, cl_uint * num_devices)
{
cl_int ret;
TRACE("(%p, 0x%lx, %d, %p, %p)\n", platform, (long unsigned int)device_type, num_entries, devices, num_devices);
ret = clGetDeviceIDs(platform, device_type, num_entries, devices, num_devices);
TRACE("(%p, 0x%lx, %d, %p, %p)=%d\n", platform, (long unsigned int)device_type, num_entries, devices, num_devices, ret);
return ret;
}
cl_int WINAPI wine_clGetDeviceInfo(cl_device_id device, cl_device_info param_name,
SIZE_T param_value_size, void * param_value, size_t * param_value_size_ret)
{
@ -148,9 +102,6 @@ cl_int WINAPI wine_clGetDeviceInfo(cl_device_id device, cl_device_info param_nam
}
/*---------------------------------------------------------------*/
/* Context APIs */
typedef struct
{
void WINAPI (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, void *user_data);
@ -187,6 +138,7 @@ cl_context WINAPI wine_clCreateContext(const cl_context_properties * properties,
return ret;
}
cl_context WINAPI wine_clCreateContextFromType(const cl_context_properties * properties, cl_device_type device_type,
void WINAPI (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, void *user_data),
void * user_data, cl_int * errcode_ret)
@ -208,233 +160,6 @@ cl_context WINAPI wine_clCreateContextFromType(const cl_context_properties * pro
return ret;
}
cl_int WINAPI wine_clRetainContext(cl_context context)
{
cl_int ret;
TRACE("(%p)\n", context);
ret = clRetainContext(context);
TRACE("(%p)=%d\n", context, ret);
return ret;
}
cl_int WINAPI wine_clReleaseContext(cl_context context)
{
cl_int ret;
TRACE("(%p)\n", context);
ret = clReleaseContext(context);
TRACE("(%p)=%d\n", context, ret);
return ret;
}
cl_int WINAPI wine_clGetContextInfo(cl_context context, cl_context_info param_name,
SIZE_T param_value_size, void * param_value, size_t * param_value_size_ret)
{
cl_int ret;
TRACE("(%p, 0x%x, %ld, %p, %p)\n", context, param_name, param_value_size, param_value, param_value_size_ret);
ret = clGetContextInfo(context, param_name, param_value_size, param_value, param_value_size_ret);
TRACE("(%p, 0x%x, %ld, %p, %p)=%d\n", context, param_name, param_value_size, param_value, param_value_size_ret, ret);
return ret;
}
/*---------------------------------------------------------------*/
/* Command Queue APIs */
cl_command_queue WINAPI wine_clCreateCommandQueue(cl_context context, cl_device_id device,
cl_command_queue_properties properties, cl_int * errcode_ret)
{
cl_command_queue ret;
TRACE("(%p, %p, 0x%lx, %p)\n", context, device, (long unsigned int)properties, errcode_ret);
ret = clCreateCommandQueue(context, device, properties, errcode_ret);
TRACE("(%p, %p, 0x%lx, %p)=%p\n", context, device, (long unsigned int)properties, errcode_ret, ret);
return ret;
}
cl_int WINAPI wine_clRetainCommandQueue(cl_command_queue command_queue)
{
cl_int ret;
TRACE("(%p)\n", command_queue);
ret = clRetainCommandQueue(command_queue);
TRACE("(%p)=%d\n", command_queue, ret);
return ret;
}
cl_int WINAPI wine_clReleaseCommandQueue(cl_command_queue command_queue)
{
cl_int ret;
TRACE("(%p)\n", command_queue);
ret = clReleaseCommandQueue(command_queue);
TRACE("(%p)=%d\n", command_queue, ret);
return ret;
}
cl_int WINAPI wine_clGetCommandQueueInfo(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)
{
cl_int ret;
TRACE("%p, %d, %ld, %p, %p\n", command_queue, param_name, param_value_size, param_value, param_value_size_ret);
ret = clGetCommandQueueInfo(command_queue, param_name, param_value_size, param_value, param_value_size_ret);
return ret;
}
cl_int WINAPI wine_clSetCommandQueueProperty(cl_command_queue command_queue, cl_command_queue_properties properties, cl_bool enable,
cl_command_queue_properties * old_properties)
{
FIXME("(%p, 0x%lx, %d, %p): deprecated\n", command_queue, (long unsigned int)properties, enable, old_properties);
return CL_INVALID_QUEUE_PROPERTIES;
}
/*---------------------------------------------------------------*/
/* Memory Object APIs */
cl_mem WINAPI wine_clCreateBuffer(cl_context context, cl_mem_flags flags, size_t size, void * host_ptr, cl_int * errcode_ret)
{
cl_mem ret;
TRACE("\n");
ret = clCreateBuffer(context, flags, size, host_ptr, errcode_ret);
return ret;
}
cl_mem WINAPI wine_clCreateImage2D(cl_context context, cl_mem_flags flags, 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)
{
cl_mem ret;
TRACE("\n");
ret = clCreateImage2D(context, flags, image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret);
return ret;
}
cl_mem WINAPI wine_clCreateImage3D(cl_context context, cl_mem_flags flags, 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)
{
cl_mem ret;
TRACE("\n");
ret = clCreateImage3D(context, flags, image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret);
return ret;
}
cl_int WINAPI wine_clRetainMemObject(cl_mem memobj)
{
cl_int ret;
TRACE("(%p)\n", memobj);
ret = clRetainMemObject(memobj);
TRACE("(%p)=%d\n", memobj, ret);
return ret;
}
cl_int WINAPI wine_clReleaseMemObject(cl_mem memobj)
{
cl_int ret;
TRACE("(%p)\n", memobj);
ret = clReleaseMemObject(memobj);
TRACE("(%p)=%d\n", memobj, ret);
return ret;
}
cl_int WINAPI wine_clGetSupportedImageFormats(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)
{
cl_int ret;
TRACE("\n");
ret = clGetSupportedImageFormats(context, flags, image_type, num_entries, image_formats, num_image_formats);
return ret;
}
cl_int WINAPI wine_clGetMemObjectInfo(cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void * param_value, size_t * param_value_size_ret)
{
cl_int ret;
TRACE("\n");
ret = clGetMemObjectInfo(memobj, param_name, param_value_size, param_value, param_value_size_ret);
return ret;
}
cl_int WINAPI wine_clGetImageInfo(cl_mem image, cl_image_info param_name, size_t param_value_size, void * param_value, size_t * param_value_size_ret)
{
cl_int ret;
TRACE("\n");
ret = clGetImageInfo(image, param_name, param_value_size, param_value, param_value_size_ret);
return ret;
}
/*---------------------------------------------------------------*/
/* Sampler APIs */
cl_sampler WINAPI wine_clCreateSampler(cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode,
cl_filter_mode filter_mode, cl_int * errcode_ret)
{
cl_sampler ret;
TRACE("\n");
ret = clCreateSampler(context, normalized_coords, addressing_mode, filter_mode, errcode_ret);
return ret;
}
cl_int WINAPI wine_clRetainSampler(cl_sampler sampler)
{
cl_int ret;
TRACE("\n");
ret = clRetainSampler(sampler);
return ret;
}
cl_int WINAPI wine_clReleaseSampler(cl_sampler sampler)
{
cl_int ret;
TRACE("\n");
ret = clReleaseSampler(sampler);
return ret;
}
cl_int WINAPI wine_clGetSamplerInfo(cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size,
void * param_value, size_t * param_value_size_ret)
{
cl_int ret;
TRACE("\n");
ret = clGetSamplerInfo(sampler, param_name, param_value_size, param_value, param_value_size_ret);
return ret;
}
/*---------------------------------------------------------------*/
/* Program Object APIs */
cl_program WINAPI wine_clCreateProgramWithSource(cl_context context, cl_uint count, const char ** strings,
const size_t * lengths, cl_int * errcode_ret)
{
cl_program ret;
TRACE("\n");
ret = clCreateProgramWithSource(context, count, strings, lengths, errcode_ret);
return ret;
}
cl_program WINAPI wine_clCreateProgramWithBinary(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)
{
cl_program ret;
TRACE("\n");
ret = clCreateProgramWithBinary(context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret);
return ret;
}
cl_int WINAPI wine_clRetainProgram(cl_program program)
{
cl_int ret;
TRACE("\n");
ret = clRetainProgram(program);
return ret;
}
cl_int WINAPI wine_clReleaseProgram(cl_program program)
{
cl_int ret;
TRACE("\n");
ret = clReleaseProgram(program);
return ret;
}
typedef struct
{
void WINAPI (*pfn_notify)(cl_program program, void * user_data);
@ -474,307 +199,6 @@ cl_int WINAPI wine_clBuildProgram(cl_program program, cl_uint num_devices, const
return ret;
}
cl_int WINAPI wine_clUnloadCompiler(void)
{
cl_int ret;
TRACE("()\n");
ret = clUnloadCompiler();
TRACE("()=%d\n", ret);
return ret;
}
cl_int WINAPI wine_clGetProgramInfo(cl_program program, cl_program_info param_name,
size_t param_value_size, void * param_value, size_t * param_value_size_ret)
{
cl_int ret;
TRACE("\n");
ret = clGetProgramInfo(program, param_name, param_value_size, param_value, param_value_size_ret);
return ret;
}
cl_int WINAPI wine_clGetProgramBuildInfo(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)
{
cl_int ret;
TRACE("\n");
ret = clGetProgramBuildInfo(program, device, param_name, param_value_size, param_value, param_value_size_ret);
return ret;
}
/*---------------------------------------------------------------*/
/* Kernel Object APIs */
cl_kernel WINAPI wine_clCreateKernel(cl_program program, char * kernel_name, cl_int * errcode_ret)
{
cl_kernel ret;
TRACE("\n");
ret = clCreateKernel(program, kernel_name, errcode_ret);
return ret;
}
cl_int WINAPI wine_clCreateKernelsInProgram(cl_program program, cl_uint num_kernels,
cl_kernel * kernels, cl_uint * num_kernels_ret)
{
cl_int ret;
TRACE("\n");
ret = clCreateKernelsInProgram(program, num_kernels, kernels, num_kernels_ret);
return ret;
}
cl_int WINAPI wine_clRetainKernel(cl_kernel kernel)
{
cl_int ret;
TRACE("\n");
ret = clRetainKernel(kernel);
return ret;
}
cl_int WINAPI wine_clReleaseKernel(cl_kernel kernel)
{
cl_int ret;
TRACE("\n");
ret = clReleaseKernel(kernel);
return ret;
}
cl_int WINAPI wine_clSetKernelArg(cl_kernel kernel, cl_uint arg_index, size_t arg_size, void * arg_value)
{
cl_int ret;
TRACE("\n");
ret = clSetKernelArg(kernel, arg_index, arg_size, arg_value);
return ret;
}
cl_int WINAPI wine_clGetKernelInfo(cl_kernel kernel, cl_kernel_info param_name,
size_t param_value_size, void * param_value, size_t * param_value_size_ret)
{
cl_int ret;
TRACE("\n");
ret = clGetKernelInfo(kernel, param_name, param_value_size, param_value, param_value_size_ret);
return ret;
}
cl_int WINAPI wine_clGetKernelWorkGroupInfo(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 ret;
TRACE("\n");
ret = clGetKernelWorkGroupInfo(kernel, device, param_name, param_value_size, param_value, param_value_size_ret);
return ret;
}
/*---------------------------------------------------------------*/
/* Event Object APIs */
cl_int WINAPI wine_clWaitForEvents(cl_uint num_events, cl_event * event_list)
{
cl_int ret;
TRACE("\n");
ret = clWaitForEvents(num_events, event_list);
return ret;
}
cl_int WINAPI wine_clGetEventInfo(cl_event event, cl_event_info param_name, size_t param_value_size,
void * param_value, size_t * param_value_size_ret)
{
cl_int ret;
TRACE("\n");
ret = clGetEventInfo(event, param_name, param_value_size, param_value, param_value_size_ret);
return ret;
}
cl_int WINAPI wine_clRetainEvent(cl_event event)
{
cl_int ret;
TRACE("\n");
ret = clRetainEvent(event);
return ret;
}
cl_int WINAPI wine_clReleaseEvent(cl_event event)
{
cl_int ret;
TRACE("\n");
ret = clReleaseEvent(event);
return ret;
}
/*---------------------------------------------------------------*/
/* Profiling APIs */
cl_int WINAPI wine_clGetEventProfilingInfo(cl_event event, cl_profiling_info param_name, size_t param_value_size,
void * param_value, size_t * param_value_size_ret)
{
cl_int ret;
TRACE("\n");
ret = clGetEventProfilingInfo(event, param_name, param_value_size, param_value, param_value_size_ret);
return ret;
}
/*---------------------------------------------------------------*/
/* Flush and Finish APIs */
cl_int WINAPI wine_clFlush(cl_command_queue command_queue)
{
cl_int ret;
TRACE("(%p)\n", command_queue);
ret = clFlush(command_queue);
TRACE("(%p)=%d\n", command_queue, ret);
return ret;
}
cl_int WINAPI wine_clFinish(cl_command_queue command_queue)
{
cl_int ret;
TRACE("(%p)\n", command_queue);
ret = clFinish(command_queue);
TRACE("(%p)=%d\n", command_queue, ret);
return ret;
}
/*---------------------------------------------------------------*/
/* Enqueued Commands APIs */
cl_int WINAPI wine_clEnqueueReadBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
size_t offset, size_t cb, void * ptr,
cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueReadBuffer(command_queue, buffer, blocking_read, offset, cb, ptr, num_events_in_wait_list, event_wait_list, event);
return ret;
}
cl_int WINAPI wine_clEnqueueWriteBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write,
size_t offset, size_t cb, const void * ptr,
cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueWriteBuffer(command_queue, buffer, blocking_write, offset, cb, ptr, num_events_in_wait_list, event_wait_list, event);
return ret;
}
cl_int WINAPI wine_clEnqueueCopyBuffer(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer,
size_t src_offset, size_t dst_offset, size_t cb,
cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueCopyBuffer(command_queue, src_buffer, dst_buffer, src_offset, dst_offset, cb, num_events_in_wait_list, event_wait_list, event);
return ret;
}
cl_int WINAPI wine_clEnqueueReadImage(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)
{
cl_int ret;
TRACE("(%p, %p, %d, %p, %p, %ld, %ld, %p, %d, %p, %p)\n", command_queue, image, blocking_read,
origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
ret = clEnqueueReadImage(command_queue, image, blocking_read, origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
TRACE("(%p, %p, %d, %p, %p, %ld, %ld, %p, %d, %p, %p)=%d\n", command_queue, image, blocking_read,
origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event, ret);
return ret;
}
cl_int WINAPI wine_clEnqueueWriteImage(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)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueWriteImage(command_queue, image, blocking_write, origin, region, input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
return ret;
}
cl_int WINAPI wine_clEnqueueCopyImage(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image,
size_t * src_origin, size_t * dst_origin, size_t * region,
cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueCopyImage(command_queue, src_image, dst_image, src_origin, dst_origin, region, num_events_in_wait_list, event_wait_list, event);
return ret;
}
cl_int WINAPI wine_clEnqueueCopyImageToBuffer(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer,
size_t * src_origin, size_t * region, size_t dst_offset,
cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueCopyImageToBuffer(command_queue, src_image, dst_buffer, src_origin, region, dst_offset, num_events_in_wait_list, event_wait_list, event);
return ret;
}
cl_int WINAPI wine_clEnqueueCopyBufferToImage(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image,
size_t src_offset, size_t * dst_origin, size_t * region,
cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueCopyBufferToImage(command_queue, src_buffer, dst_image, src_offset, dst_origin, region, num_events_in_wait_list, event_wait_list, event);
return ret;
}
void * WINAPI wine_clEnqueueMapBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map,
cl_map_flags map_flags, size_t offset, size_t cb,
cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event, cl_int * errcode_ret)
{
void * ret;
TRACE("\n");
ret = clEnqueueMapBuffer(command_queue, buffer, blocking_map, map_flags, offset, cb, num_events_in_wait_list, event_wait_list, event, errcode_ret);
return ret;
}
void * WINAPI wine_clEnqueueMapImage(cl_command_queue command_queue, cl_mem image, cl_bool blocking_map,
cl_map_flags map_flags, size_t * origin, size_t * region,
size_t * image_row_pitch, size_t * image_slice_pitch,
cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event, cl_int * errcode_ret)
{
void * ret;
TRACE("\n");
ret = clEnqueueMapImage(command_queue, image, blocking_map, map_flags, origin, region, image_row_pitch, image_slice_pitch, num_events_in_wait_list, event_wait_list, event, errcode_ret);
return ret;
}
cl_int WINAPI wine_clEnqueueUnmapMemObject(cl_command_queue command_queue, cl_mem memobj, void * mapped_ptr,
cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueUnmapMemObject(command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event);
return ret;
}
cl_int WINAPI wine_clEnqueueNDRangeKernel(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim,
size_t * global_work_offset, size_t * global_work_size, size_t * local_work_size,
cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueNDRangeKernel(command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event);
return ret;
}
cl_int WINAPI wine_clEnqueueTask(cl_command_queue command_queue, cl_kernel kernel,
cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueTask(command_queue, kernel, num_events_in_wait_list, event_wait_list, event);
return ret;
}
cl_int WINAPI wine_clEnqueueNativeKernel(cl_command_queue command_queue,
void WINAPI (*user_func)(void *args),
@ -797,33 +221,6 @@ cl_int WINAPI wine_clEnqueueNativeKernel(cl_command_queue command_queue,
return ret;
}
cl_int WINAPI wine_clEnqueueMarker(cl_command_queue command_queue, cl_event * event)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueMarker(command_queue, event);
return ret;
}
cl_int WINAPI wine_clEnqueueWaitForEvents(cl_command_queue command_queue, cl_uint num_events, cl_event * event_list)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueWaitForEvents(command_queue, num_events, event_list);
return ret;
}
cl_int WINAPI wine_clEnqueueBarrier(cl_command_queue command_queue)
{
cl_int ret;
TRACE("\n");
ret = clEnqueueBarrier(command_queue);
return ret;
}
/*---------------------------------------------------------------*/
/* Extension function access */
void * WINAPI wine_clGetExtensionFunctionAddress(const char * func_name)
{
@ -837,66 +234,3 @@ void * WINAPI wine_clGetExtensionFunctionAddress(const char * func_name)
TRACE("(%s)=%p\n",func_name, ret);
return ret;
}
#if OPENCL_WITH_GL
/*---------------------------------------------------------------*/
/* Khronos-approved (KHR) OpenCL extensions which have OpenGL dependencies. */
cl_mem WINAPI wine_clCreateFromGLBuffer(cl_context context, cl_mem_flags flags, cl_GLuint bufobj, int * errcode_ret)
{
}
cl_mem WINAPI wine_clCreateFromGLTexture2D(cl_context context, cl_mem_flags flags, cl_GLenum target,
cl_GLint miplevel, cl_GLuint texture, cl_int * errcode_ret)
{
}
cl_mem WINAPI wine_clCreateFromGLTexture3D(cl_context context, cl_mem_flags flags, cl_GLenum target,
cl_GLint miplevel, cl_GLuint texture, cl_int * errcode_ret)
{
}
cl_mem WINAPI wine_clCreateFromGLRenderbuffer(cl_context context, cl_mem_flags flags, cl_GLuint renderbuffer, cl_int * errcode_ret)
{
}
cl_int WINAPI wine_clGetGLObjectInfo(cl_mem memobj, cl_gl_object_type * gl_object_type, cl_GLuint * gl_object_name)
{
}
cl_int WINAPI wine_clGetGLTextureInfo(cl_mem memobj, cl_gl_texture_info param_name, size_t param_value_size,
void * param_value, size_t * param_value_size_ret)
{
}
cl_int WINAPI wine_clEnqueueAcquireGLObjects(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)
{
}
cl_int WINAPI wine_clEnqueueReleaseGLObjects(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)
{
}
/*---------------------------------------------------------------*/
/* cl_khr_gl_sharing extension */
cl_int WINAPI wine_clGetGLContextInfoKHR(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)
{
}
#endif
#if 0
/*---------------------------------------------------------------*/
/* cl_khr_icd extension */
cl_int WINAPI wine_clIcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id * platforms, cl_uint * num_platforms)
{
}
#endif

View File

@ -1,96 +1,66 @@
# OpenCL 1.0
@ stdcall clGetPlatformIDs( long ptr ptr ) wine_clGetPlatformIDs
@ stdcall clGetPlatformInfo( long long long ptr ptr ) wine_clGetPlatformInfo
@ stdcall clGetDeviceIDs( long long long ptr ptr ) wine_clGetDeviceIDs
@ stdcall clGetDeviceInfo( long long long ptr ptr ) wine_clGetDeviceInfo
@ stdcall clBuildProgram(ptr long ptr ptr ptr ptr) wine_clBuildProgram
@ stdcall clCreateBuffer(ptr int64 long ptr ptr) wine_clCreateBuffer
@ stdcall clCreateCommandQueue(ptr ptr int64 ptr) wine_clCreateCommandQueue
@ stdcall clCreateContext(ptr long ptr ptr ptr ptr) wine_clCreateContext
@ stdcall clCreateContextFromType(ptr long ptr ptr ptr) wine_clCreateContextFromType
@ stdcall clRetainContext( long ) wine_clRetainContext
@ stdcall clReleaseContext( long ) wine_clReleaseContext
@ stdcall clGetContextInfo( long long long ptr ptr ) wine_clGetContextInfo
@ stdcall clCreateCommandQueue( long long long ptr ) wine_clCreateCommandQueue
@ stdcall clRetainCommandQueue( long ) wine_clRetainCommandQueue
@ stdcall clReleaseCommandQueue( long ) wine_clReleaseCommandQueue
@ stdcall clGetCommandQueueInfo( long long long ptr ptr ) wine_clGetCommandQueueInfo
@ stdcall clSetCommandQueueProperty( long long long ptr ) wine_clSetCommandQueueProperty
@ stdcall clCreateBuffer( long long long ptr ptr ) wine_clCreateBuffer
@ stdcall clCreateImage2D( long long ptr long long long ptr ptr ) wine_clCreateImage2D
@ stdcall clCreateImage3D( long long ptr long long long long long ptr ptr ) wine_clCreateImage3D
@ stdcall clRetainMemObject( long ) wine_clRetainMemObject
@ stdcall clReleaseMemObject( long ) wine_clReleaseMemObject
@ stdcall clGetSupportedImageFormats( long long long long ptr ptr ) wine_clGetSupportedImageFormats
@ stdcall clGetMemObjectInfo( long long long ptr ptr ) wine_clGetMemObjectInfo
@ stdcall clGetImageInfo( long long long ptr ptr ) wine_clGetImageInfo
@ stdcall clCreateSampler( long long long long ptr ) wine_clCreateSampler
@ stdcall clRetainSampler( long ) wine_clRetainSampler
@ stdcall clReleaseSampler( long ) wine_clReleaseSampler
@ stdcall clGetSamplerInfo( long long long ptr ptr ) wine_clGetSamplerInfo
@ stdcall clCreateProgramWithSource( long long ptr ptr ptr ) wine_clCreateProgramWithSource
@ stdcall clCreateProgramWithBinary( long long ptr ptr ptr ptr ptr ) wine_clCreateProgramWithBinary
@ stdcall clRetainProgram( long ) wine_clRetainProgram
@ stdcall clReleaseProgram( long ) wine_clReleaseProgram
@ stdcall clBuildProgram( long long ptr str ptr ptr ) wine_clBuildProgram
@ stdcall clCreateContextFromType(ptr int64 ptr ptr ptr) wine_clCreateContextFromType
@ stdcall clCreateImage2D(ptr int64 ptr long long long ptr ptr) wine_clCreateImage2D
@ stdcall clCreateImage3D(ptr int64 ptr long long long long long ptr ptr) wine_clCreateImage3D
@ stdcall clCreateKernel(ptr ptr ptr) wine_clCreateKernel
@ stdcall clCreateKernelsInProgram(ptr long ptr ptr) wine_clCreateKernelsInProgram
@ stdcall clCreateProgramWithBinary(ptr long ptr ptr ptr ptr ptr) wine_clCreateProgramWithBinary
@ stdcall clCreateProgramWithSource(ptr long ptr ptr ptr) wine_clCreateProgramWithSource
@ stdcall clCreateSampler(ptr long long long ptr) wine_clCreateSampler
@ stdcall clEnqueueBarrier(ptr) wine_clEnqueueBarrier
@ stdcall clEnqueueCopyBuffer(ptr ptr ptr long long long long ptr ptr) wine_clEnqueueCopyBuffer
@ stdcall clEnqueueCopyBufferToImage(ptr ptr ptr long ptr ptr long ptr ptr) wine_clEnqueueCopyBufferToImage
@ stdcall clEnqueueCopyImage(ptr ptr ptr ptr ptr ptr long ptr ptr) wine_clEnqueueCopyImage
@ stdcall clEnqueueCopyImageToBuffer(ptr ptr ptr ptr ptr long long ptr ptr) wine_clEnqueueCopyImageToBuffer
@ stdcall clEnqueueMapBuffer(ptr ptr long int64 long long long ptr ptr ptr) wine_clEnqueueMapBuffer
@ stdcall clEnqueueMapImage(ptr ptr long int64 ptr ptr ptr ptr long ptr ptr ptr) wine_clEnqueueMapImage
@ stdcall clEnqueueMarker(ptr ptr) wine_clEnqueueMarker
@ stdcall clEnqueueNDRangeKernel(ptr ptr long ptr ptr ptr long ptr ptr) wine_clEnqueueNDRangeKernel
@ stdcall clEnqueueNativeKernel(ptr ptr ptr long long ptr ptr long ptr ptr) wine_clEnqueueNativeKernel
@ stdcall clEnqueueReadBuffer(ptr ptr long long long ptr long ptr ptr) wine_clEnqueueReadBuffer
@ stdcall clEnqueueReadImage(ptr ptr long ptr ptr long long ptr long ptr ptr) wine_clEnqueueReadImage
@ stdcall clEnqueueTask(ptr ptr long ptr ptr) wine_clEnqueueTask
@ stdcall clEnqueueUnmapMemObject(ptr ptr ptr long ptr ptr) wine_clEnqueueUnmapMemObject
@ stdcall clEnqueueWaitForEvents(ptr long ptr) wine_clEnqueueWaitForEvents
@ stdcall clEnqueueWriteBuffer(ptr ptr long long long ptr long ptr ptr) wine_clEnqueueWriteBuffer
@ stdcall clEnqueueWriteImage(ptr ptr long ptr ptr long long ptr long ptr ptr) wine_clEnqueueWriteImage
@ stdcall clFinish(ptr) wine_clFinish
@ stdcall clFlush(ptr) wine_clFlush
@ stdcall clGetCommandQueueInfo(ptr long long ptr ptr) wine_clGetCommandQueueInfo
@ stdcall clGetContextInfo(ptr long long ptr ptr) wine_clGetContextInfo
@ stdcall clGetDeviceIDs(ptr int64 long ptr ptr) wine_clGetDeviceIDs
@ stdcall clGetDeviceInfo(ptr long long ptr ptr) wine_clGetDeviceInfo
@ stdcall clGetEventInfo(ptr long long ptr ptr) wine_clGetEventInfo
@ stdcall clGetEventProfilingInfo(ptr long long ptr ptr) wine_clGetEventProfilingInfo
@ stdcall clGetExtensionFunctionAddress(ptr) wine_clGetExtensionFunctionAddress
@ stdcall clGetImageInfo(ptr long long ptr ptr) wine_clGetImageInfo
@ stdcall clGetKernelInfo(ptr long long ptr ptr) wine_clGetKernelInfo
@ stdcall clGetKernelWorkGroupInfo(ptr ptr long long ptr ptr) wine_clGetKernelWorkGroupInfo
@ stdcall clGetMemObjectInfo(ptr long long ptr ptr) wine_clGetMemObjectInfo
@ stdcall clGetPlatformIDs(long ptr ptr) wine_clGetPlatformIDs
@ stdcall clGetPlatformInfo(ptr long long ptr ptr) wine_clGetPlatformInfo
@ stdcall clGetProgramBuildInfo(ptr ptr long long ptr ptr) wine_clGetProgramBuildInfo
@ stdcall clGetProgramInfo(ptr long long ptr ptr) wine_clGetProgramInfo
@ stdcall clGetSamplerInfo(ptr long long ptr ptr) wine_clGetSamplerInfo
@ stdcall clGetSupportedImageFormats(ptr int64 long long ptr ptr) wine_clGetSupportedImageFormats
@ stdcall clReleaseCommandQueue(ptr) wine_clReleaseCommandQueue
@ stdcall clReleaseContext(ptr) wine_clReleaseContext
@ stdcall clReleaseEvent(ptr) wine_clReleaseEvent
@ stdcall clReleaseKernel(ptr) wine_clReleaseKernel
@ stdcall clReleaseMemObject(ptr) wine_clReleaseMemObject
@ stdcall clReleaseProgram(ptr) wine_clReleaseProgram
@ stdcall clReleaseSampler(ptr) wine_clReleaseSampler
@ stdcall clRetainCommandQueue(ptr) wine_clRetainCommandQueue
@ stdcall clRetainContext(ptr) wine_clRetainContext
@ stdcall clRetainEvent(ptr) wine_clRetainEvent
@ stdcall clRetainKernel(ptr) wine_clRetainKernel
@ stdcall clRetainMemObject(ptr) wine_clRetainMemObject
@ stdcall clRetainProgram(ptr) wine_clRetainProgram
@ stdcall clRetainSampler(ptr) wine_clRetainSampler
@ stdcall clSetCommandQueueProperty(ptr int64 long ptr) wine_clSetCommandQueueProperty
@ stdcall clSetKernelArg(ptr long long ptr) wine_clSetKernelArg
@ stdcall clUnloadCompiler() wine_clUnloadCompiler
@ stdcall clGetProgramInfo( long long long ptr ptr ) wine_clGetProgramInfo
@ stdcall clGetProgramBuildInfo( long long long long ptr ptr ) wine_clGetProgramBuildInfo
@ stdcall clCreateKernel( long str ptr ) wine_clCreateKernel
@ stdcall clCreateKernelsInProgram( long long ptr ptr ) wine_clCreateKernelsInProgram
@ stdcall clRetainKernel( long ) wine_clRetainKernel
@ stdcall clReleaseKernel( long ) wine_clReleaseKernel
@ stdcall clSetKernelArg( long long long ptr ) wine_clSetKernelArg
@ stdcall clGetKernelInfo( long long long ptr ptr ) wine_clGetKernelInfo
@ stdcall clGetKernelWorkGroupInfo( long long long long ptr ptr ) wine_clGetKernelWorkGroupInfo
@ stdcall clWaitForEvents( long ptr ) wine_clWaitForEvents
@ stdcall clGetEventInfo( long long long ptr ptr ) wine_clGetEventInfo
@ stdcall clReleaseEvent( long ) wine_clReleaseEvent
@ stdcall clRetainEvent( long ) wine_clRetainEvent
@ stdcall clGetEventProfilingInfo( long long long ptr ptr ) wine_clGetEventProfilingInfo
@ stdcall clFlush( long ) wine_clFlush
@ stdcall clFinish( long ) wine_clFinish
@ stdcall clEnqueueReadBuffer( long long long long long ptr long ptr ptr ) wine_clEnqueueReadBuffer
@ stdcall clEnqueueWriteBuffer( long long long long long ptr long ptr ptr ) wine_clEnqueueWriteBuffer
@ stdcall clEnqueueCopyBuffer( long long long long long long long ptr ptr ) wine_clEnqueueCopyBuffer
@ stdcall clEnqueueReadImage( long long long ptr ptr long long ptr long ptr ptr ) wine_clEnqueueReadImage
@ stdcall clEnqueueWriteImage( long long long ptr ptr long long ptr long ptr ptr ) wine_clEnqueueWriteImage
@ stdcall clEnqueueCopyImage( long long long ptr ptr ptr long ptr ptr ) wine_clEnqueueCopyImage
@ stdcall clEnqueueCopyImageToBuffer( long long long ptr ptr long long ptr ptr ) wine_clEnqueueCopyImageToBuffer
@ stdcall clEnqueueCopyBufferToImage( long long long long ptr ptr long ptr ptr ) wine_clEnqueueCopyBufferToImage
@ stdcall clEnqueueMapBuffer( long long long long long long long ptr ptr ptr ) wine_clEnqueueMapBuffer
@ stdcall clEnqueueMapImage( long long long long ptr ptr ptr ptr long ptr ptr ptr ) wine_clEnqueueMapImage
@ stdcall clEnqueueUnmapMemObject( long long ptr long ptr ptr ) wine_clEnqueueUnmapMemObject
@ stdcall clEnqueueNDRangeKernel( long long long ptr ptr ptr long ptr ptr ) wine_clEnqueueNDRangeKernel
@ stdcall clEnqueueTask( long long long ptr ptr ) wine_clEnqueueTask
@ stdcall clEnqueueNativeKernel(long ptr ptr long long ptr ptr long ptr ptr) wine_clEnqueueNativeKernel
@ stdcall clEnqueueMarker( long ptr ) wine_clEnqueueMarker
@ stdcall clEnqueueWaitForEvents( long long ptr ) wine_clEnqueueWaitForEvents
@ stdcall clEnqueueBarrier( long ) wine_clEnqueueBarrier
@ stdcall clGetExtensionFunctionAddress( str ) wine_clGetExtensionFunctionAddress
@ stub clCreateFromGLBuffer
@ stub clCreateFromGLTexture2D
@ stub clCreateFromGLTexture3D
@ stub clCreateFromGLRenderbuffer
@ stub clGetGLObjectInfo
@ stub clGetGLTextureInfo
@ stub clEnqueueAcquireGLObjects
@ stub clEnqueueReleaseGLObjects
# @ stdcall clCreateFromGLBuffer( long long long ptr ) wine_clCreateFromGLBuffer
# @ stdcall clCreateFromGLTexture2D( long long long long long ptr ) wine_clCreateFromGLTexture2D
# @ stdcall clCreateFromGLTexture3D( long long long long long ptr ) wine_clCreateFromGLTexture3D
# @ stdcall clCreateFromGLRenderbuffer( long long long ptr ) wine_clCreateFromGLRenderbuffer
# @ stdcall clGetGLObjectInfo( long ptr ptr ) wine_clGetGLObjectInfo
# @ stdcall clGetGLTextureInfo( long long long ptr ptr ) wine_clGetGLTextureInfo
# @ stdcall clEnqueueAcquireGLObjects( long long ptr long ptr ptr ) wine_clEnqueueAcquireGLObjects
# @ stdcall clEnqueueReleaseGLObjects( long long ptr long ptr ptr ) wine_clEnqueueReleaseGLObjects
@ stdcall clWaitForEvents(long ptr) wine_clWaitForEvents

View File

@ -0,0 +1,41 @@
/*
* Copyright 2021 Zebediah Figura
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_OPENCL_PRIVATE_H
#define __WINE_OPENCL_PRIVATE_H
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
#define CL_SILENCE_DEPRECATION
#if defined(HAVE_CL_CL_H)
#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
#define CL_TARGET_OPENCL_VERSION 220
#include <CL/cl.h>
#elif defined(HAVE_OPENCL_OPENCL_H)
#include <OpenCL/opencl.h>
#endif
#endif

360
dlls/opencl/opencl_thunks.c Normal file
View File

@ -0,0 +1,360 @@
/* Automatically generated from OpenCL registry files; DO NOT EDIT! */
#include "config.h"
#include "opencl_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(opencl);
cl_mem WINAPI wine_clCreateBuffer( cl_context context, cl_mem_flags flags, size_t size, void* host_ptr, cl_int* errcode_ret )
{
TRACE( "(%p, %s, %zu, %p, %p)\n", context, wine_dbgstr_longlong(flags), size, host_ptr, errcode_ret );
return clCreateBuffer( context, flags, size, host_ptr, errcode_ret );
}
cl_command_queue WINAPI wine_clCreateCommandQueue( cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int* errcode_ret )
{
TRACE( "(%p, %p, %s, %p)\n", context, device, wine_dbgstr_longlong(properties), errcode_ret );
return clCreateCommandQueue( context, device, properties, errcode_ret );
}
cl_mem WINAPI wine_clCreateImage2D( 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 )
{
TRACE( "(%p, %s, %p, %zu, %zu, %zu, %p, %p)\n", context, wine_dbgstr_longlong(flags), image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret );
return clCreateImage2D( context, flags, image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret );
}
cl_mem WINAPI wine_clCreateImage3D( 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 )
{
TRACE( "(%p, %s, %p, %zu, %zu, %zu, %zu, %zu, %p, %p)\n", context, wine_dbgstr_longlong(flags), image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret );
return clCreateImage3D( context, flags, image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret );
}
cl_kernel WINAPI wine_clCreateKernel( cl_program program, const char* kernel_name, cl_int* errcode_ret )
{
TRACE( "(%p, %p, %p)\n", program, kernel_name, errcode_ret );
return clCreateKernel( program, kernel_name, errcode_ret );
}
cl_int WINAPI wine_clCreateKernelsInProgram( cl_program program, cl_uint num_kernels, cl_kernel* kernels, cl_uint* num_kernels_ret )
{
TRACE( "(%p, %u, %p, %p)\n", program, num_kernels, kernels, num_kernels_ret );
return clCreateKernelsInProgram( program, num_kernels, kernels, num_kernels_ret );
}
cl_program WINAPI wine_clCreateProgramWithBinary( 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 )
{
TRACE( "(%p, %u, %p, %p, %p, %p, %p)\n", context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret );
return clCreateProgramWithBinary( context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret );
}
cl_program WINAPI wine_clCreateProgramWithSource( cl_context context, cl_uint count, const char** strings, const size_t* lengths, cl_int* errcode_ret )
{
TRACE( "(%p, %u, %p, %p, %p)\n", context, count, strings, lengths, errcode_ret );
return clCreateProgramWithSource( context, count, strings, lengths, errcode_ret );
}
cl_sampler WINAPI wine_clCreateSampler( cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int* errcode_ret )
{
TRACE( "(%p, %u, %u, %u, %p)\n", context, normalized_coords, addressing_mode, filter_mode, errcode_ret );
return clCreateSampler( context, normalized_coords, addressing_mode, filter_mode, errcode_ret );
}
cl_int WINAPI wine_clEnqueueBarrier( cl_command_queue command_queue )
{
TRACE( "(%p)\n", command_queue );
return clEnqueueBarrier( command_queue );
}
cl_int WINAPI wine_clEnqueueCopyBuffer( 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 )
{
TRACE( "(%p, %p, %p, %zu, %zu, %zu, %u, %p, %p)\n", command_queue, src_buffer, dst_buffer, src_offset, dst_offset, size, num_events_in_wait_list, event_wait_list, event );
return clEnqueueCopyBuffer( command_queue, src_buffer, dst_buffer, src_offset, dst_offset, size, num_events_in_wait_list, event_wait_list, event );
}
cl_int WINAPI wine_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, cl_event* event )
{
TRACE( "(%p, %p, %p, %zu, %p, %p, %u, %p, %p)\n", command_queue, src_buffer, dst_image, src_offset, dst_origin, region, num_events_in_wait_list, event_wait_list, event );
return clEnqueueCopyBufferToImage( command_queue, src_buffer, dst_image, src_offset, dst_origin, region, num_events_in_wait_list, event_wait_list, event );
}
cl_int WINAPI wine_clEnqueueCopyImage( 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 )
{
TRACE( "(%p, %p, %p, %p, %p, %p, %u, %p, %p)\n", command_queue, src_image, dst_image, src_origin, dst_origin, region, num_events_in_wait_list, event_wait_list, event );
return clEnqueueCopyImage( command_queue, src_image, dst_image, src_origin, dst_origin, region, num_events_in_wait_list, event_wait_list, event );
}
cl_int WINAPI wine_clEnqueueCopyImageToBuffer( cl_command_queue command_queue, 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 )
{
TRACE( "(%p, %p, %p, %p, %p, %zu, %u, %p, %p)\n", command_queue, src_image, dst_buffer, src_origin, region, dst_offset, num_events_in_wait_list, event_wait_list, event );
return clEnqueueCopyImageToBuffer( command_queue, src_image, dst_buffer, src_origin, region, dst_offset, num_events_in_wait_list, event_wait_list, event );
}
void* WINAPI wine_clEnqueueMapBuffer( 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 )
{
TRACE( "(%p, %p, %u, %s, %zu, %zu, %u, %p, %p, %p)\n", command_queue, buffer, blocking_map, wine_dbgstr_longlong(map_flags), offset, size, num_events_in_wait_list, event_wait_list, event, errcode_ret );
return clEnqueueMapBuffer( command_queue, buffer, blocking_map, map_flags, offset, size, num_events_in_wait_list, event_wait_list, event, errcode_ret );
}
void* WINAPI wine_clEnqueueMapImage( 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 )
{
TRACE( "(%p, %p, %u, %s, %p, %p, %p, %p, %u, %p, %p, %p)\n", command_queue, image, blocking_map, wine_dbgstr_longlong(map_flags), origin, region, image_row_pitch, image_slice_pitch, num_events_in_wait_list, event_wait_list, event, errcode_ret );
return clEnqueueMapImage( command_queue, image, blocking_map, map_flags, origin, region, image_row_pitch, image_slice_pitch, num_events_in_wait_list, event_wait_list, event, errcode_ret );
}
cl_int WINAPI wine_clEnqueueMarker( cl_command_queue command_queue, cl_event* event )
{
TRACE( "(%p, %p)\n", command_queue, event );
return clEnqueueMarker( command_queue, event );
}
cl_int WINAPI wine_clEnqueueNDRangeKernel( 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 )
{
TRACE( "(%p, %p, %u, %p, %p, %p, %u, %p, %p)\n", command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event );
return clEnqueueNDRangeKernel( command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event );
}
cl_int WINAPI wine_clEnqueueReadBuffer( 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 )
{
TRACE( "(%p, %p, %u, %zu, %zu, %p, %u, %p, %p)\n", command_queue, buffer, blocking_read, offset, size, ptr, num_events_in_wait_list, event_wait_list, event );
return clEnqueueReadBuffer( command_queue, buffer, blocking_read, offset, size, ptr, num_events_in_wait_list, event_wait_list, event );
}
cl_int WINAPI wine_clEnqueueReadImage( 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 )
{
TRACE( "(%p, %p, %u, %p, %p, %zu, %zu, %p, %u, %p, %p)\n", command_queue, image, blocking_read, origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event );
return clEnqueueReadImage( command_queue, image, blocking_read, origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event );
}
cl_int WINAPI wine_clEnqueueTask( cl_command_queue command_queue, cl_kernel kernel, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
{
TRACE( "(%p, %p, %u, %p, %p)\n", command_queue, kernel, num_events_in_wait_list, event_wait_list, event );
return clEnqueueTask( command_queue, kernel, num_events_in_wait_list, event_wait_list, event );
}
cl_int WINAPI wine_clEnqueueUnmapMemObject( 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 )
{
TRACE( "(%p, %p, %p, %u, %p, %p)\n", command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event );
return clEnqueueUnmapMemObject( command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event );
}
cl_int WINAPI wine_clEnqueueWaitForEvents( cl_command_queue command_queue, cl_uint num_events, const cl_event* event_list )
{
TRACE( "(%p, %u, %p)\n", command_queue, num_events, event_list );
return clEnqueueWaitForEvents( command_queue, num_events, event_list );
}
cl_int WINAPI wine_clEnqueueWriteBuffer( 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 )
{
TRACE( "(%p, %p, %u, %zu, %zu, %p, %u, %p, %p)\n", command_queue, buffer, blocking_write, offset, size, ptr, num_events_in_wait_list, event_wait_list, event );
return clEnqueueWriteBuffer( command_queue, buffer, blocking_write, offset, size, ptr, num_events_in_wait_list, event_wait_list, event );
}
cl_int WINAPI wine_clEnqueueWriteImage( 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 )
{
TRACE( "(%p, %p, %u, %p, %p, %zu, %zu, %p, %u, %p, %p)\n", command_queue, image, blocking_write, origin, region, input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event );
return clEnqueueWriteImage( command_queue, image, blocking_write, origin, region, input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event );
}
cl_int WINAPI wine_clFinish( cl_command_queue command_queue )
{
TRACE( "(%p)\n", command_queue );
return clFinish( command_queue );
}
cl_int WINAPI wine_clFlush( cl_command_queue command_queue )
{
TRACE( "(%p)\n", command_queue );
return clFlush( command_queue );
}
cl_int WINAPI wine_clGetCommandQueueInfo( 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 )
{
TRACE( "(%p, %u, %zu, %p, %p)\n", command_queue, param_name, param_value_size, param_value, param_value_size_ret );
return clGetCommandQueueInfo( command_queue, param_name, param_value_size, param_value, param_value_size_ret );
}
cl_int WINAPI wine_clGetContextInfo( cl_context context, cl_context_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
{
TRACE( "(%p, %u, %zu, %p, %p)\n", context, param_name, param_value_size, param_value, param_value_size_ret );
return clGetContextInfo( context, param_name, param_value_size, param_value, param_value_size_ret );
}
cl_int WINAPI wine_clGetDeviceIDs( cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id* devices, cl_uint* num_devices )
{
TRACE( "(%p, %s, %u, %p, %p)\n", platform, wine_dbgstr_longlong(device_type), num_entries, devices, num_devices );
return clGetDeviceIDs( platform, device_type, num_entries, devices, num_devices );
}
cl_int WINAPI wine_clGetEventInfo( cl_event event, cl_event_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
{
TRACE( "(%p, %u, %zu, %p, %p)\n", event, param_name, param_value_size, param_value, param_value_size_ret );
return clGetEventInfo( event, param_name, param_value_size, param_value, param_value_size_ret );
}
cl_int WINAPI wine_clGetEventProfilingInfo( cl_event event, cl_profiling_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
{
TRACE( "(%p, %u, %zu, %p, %p)\n", 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 );
}
cl_int WINAPI wine_clGetImageInfo( cl_mem image, cl_image_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
{
TRACE( "(%p, %u, %zu, %p, %p)\n", 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 );
}
cl_int WINAPI wine_clGetKernelInfo( cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
{
TRACE( "(%p, %u, %zu, %p, %p)\n", kernel, param_name, param_value_size, param_value, param_value_size_ret );
return clGetKernelInfo( kernel, param_name, param_value_size, param_value, param_value_size_ret );
}
cl_int WINAPI wine_clGetKernelWorkGroupInfo( 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 )
{
TRACE( "(%p, %p, %u, %zu, %p, %p)\n", kernel, device, param_name, param_value_size, param_value, param_value_size_ret );
return clGetKernelWorkGroupInfo( kernel, device, param_name, param_value_size, param_value, param_value_size_ret );
}
cl_int WINAPI wine_clGetMemObjectInfo( cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
{
TRACE( "(%p, %u, %zu, %p, %p)\n", memobj, param_name, param_value_size, param_value, param_value_size_ret );
return clGetMemObjectInfo( memobj, param_name, param_value_size, param_value, param_value_size_ret );
}
cl_int WINAPI wine_clGetPlatformIDs( cl_uint num_entries, cl_platform_id* platforms, cl_uint* num_platforms )
{
TRACE( "(%u, %p, %p)\n", num_entries, platforms, num_platforms );
return clGetPlatformIDs( num_entries, platforms, num_platforms );
}
cl_int WINAPI wine_clGetProgramBuildInfo( 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 )
{
TRACE( "(%p, %p, %u, %zu, %p, %p)\n", program, device, param_name, param_value_size, param_value, param_value_size_ret );
return clGetProgramBuildInfo( program, device, param_name, param_value_size, param_value, param_value_size_ret );
}
cl_int WINAPI wine_clGetProgramInfo( cl_program program, cl_program_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
{
TRACE( "(%p, %u, %zu, %p, %p)\n", program, param_name, param_value_size, param_value, param_value_size_ret );
return clGetProgramInfo( program, param_name, param_value_size, param_value, param_value_size_ret );
}
cl_int WINAPI wine_clGetSamplerInfo( cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
{
TRACE( "(%p, %u, %zu, %p, %p)\n", sampler, param_name, param_value_size, param_value, param_value_size_ret );
return clGetSamplerInfo( sampler, param_name, param_value_size, param_value, param_value_size_ret );
}
cl_int WINAPI wine_clGetSupportedImageFormats( 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 )
{
TRACE( "(%p, %s, %u, %u, %p, %p)\n", context, wine_dbgstr_longlong(flags), image_type, num_entries, image_formats, num_image_formats );
return clGetSupportedImageFormats( context, flags, image_type, num_entries, image_formats, num_image_formats );
}
cl_int WINAPI wine_clReleaseCommandQueue( cl_command_queue command_queue )
{
TRACE( "(%p)\n", command_queue );
return clReleaseCommandQueue( command_queue );
}
cl_int WINAPI wine_clReleaseContext( cl_context context )
{
TRACE( "(%p)\n", context );
return clReleaseContext( context );
}
cl_int WINAPI wine_clReleaseEvent( cl_event event )
{
TRACE( "(%p)\n", event );
return clReleaseEvent( event );
}
cl_int WINAPI wine_clReleaseKernel( cl_kernel kernel )
{
TRACE( "(%p)\n", kernel );
return clReleaseKernel( kernel );
}
cl_int WINAPI wine_clReleaseMemObject( cl_mem memobj )
{
TRACE( "(%p)\n", memobj );
return clReleaseMemObject( memobj );
}
cl_int WINAPI wine_clReleaseProgram( cl_program program )
{
TRACE( "(%p)\n", program );
return clReleaseProgram( program );
}
cl_int WINAPI wine_clReleaseSampler( cl_sampler sampler )
{
TRACE( "(%p)\n", sampler );
return clReleaseSampler( sampler );
}
cl_int WINAPI wine_clRetainCommandQueue( cl_command_queue command_queue )
{
TRACE( "(%p)\n", command_queue );
return clRetainCommandQueue( command_queue );
}
cl_int WINAPI wine_clRetainContext( cl_context context )
{
TRACE( "(%p)\n", context );
return clRetainContext( context );
}
cl_int WINAPI wine_clRetainEvent( cl_event event )
{
TRACE( "(%p)\n", event );
return clRetainEvent( event );
}
cl_int WINAPI wine_clRetainKernel( cl_kernel kernel )
{
TRACE( "(%p)\n", kernel );
return clRetainKernel( kernel );
}
cl_int WINAPI wine_clRetainMemObject( cl_mem memobj )
{
TRACE( "(%p)\n", memobj );
return clRetainMemObject( memobj );
}
cl_int WINAPI wine_clRetainProgram( cl_program program )
{
TRACE( "(%p)\n", program );
return clRetainProgram( program );
}
cl_int WINAPI wine_clRetainSampler( cl_sampler sampler )
{
TRACE( "(%p)\n", sampler );
return clRetainSampler( sampler );
}
cl_int WINAPI wine_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 clSetCommandQueueProperty( command_queue, properties, enable, old_properties );
}
cl_int WINAPI wine_clSetKernelArg( cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value )
{
TRACE( "(%p, %u, %zu, %p)\n", kernel, arg_index, arg_size, arg_value );
return clSetKernelArg( kernel, arg_index, arg_size, arg_value );
}
cl_int WINAPI wine_clUnloadCompiler( void )
{
TRACE( "()\n" );
return clUnloadCompiler();
}
cl_int WINAPI wine_clWaitForEvents( cl_uint num_events, const cl_event* event_list )
{
TRACE( "(%u, %p)\n", num_events, event_list );
return clWaitForEvents( num_events, event_list );
}