Commit a292001d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

opencl: Update to OpenCL 1.2.

parent 8dd66ebe
......@@ -31,6 +31,7 @@ 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 %cat_1_1 = ( %cat_1_0, "CL_VERSION_1_1" => 1 );
my %cat_1_2 = ( %cat_1_1, "CL_VERSION_1_2" => 1 );
my %core_categories = ();
......@@ -184,7 +185,7 @@ if (@ARGV > 1)
$name0 =~ s%^.*/%%;
die "Usage: $name0 [version]\n";
}
my $version = $ARGV[0] || "1.1";
my $version = $ARGV[0] || "1.2";
if ($version eq "1.0")
{
%core_categories = %cat_1_0;
......@@ -193,6 +194,10 @@ elsif ($version eq "1.1")
{
%core_categories = %cat_1_1;
}
elsif ($version eq "1.2")
{
%core_categories = %cat_1_2;
}
else
{
die "Incorrect OpenCL version.\n";
......@@ -242,6 +247,7 @@ sub needs_pe_wrapper($)
# needs function pointer conversion
"clGetExtensionFunctionAddress" => 1,
"clGetExtensionFunctionAddressForPlatform" => 1,
# deprecated and absent from headers
"clSetCommandQueueProperty" => 1,
......@@ -258,9 +264,11 @@ sub needs_unix_wrapper($)
(
# need callback conversion
"clBuildProgram" => 1,
"clCompileProgram" => 1,
"clCreateContext" => 1,
"clCreateContextFromType" => 1,
"clEnqueueNativeKernel" => 1,
"clLinkProgram" => 1,
"clSetEventCallback" => 1,
"clSetMemObjectDestructorCallback" => 1,
);
......@@ -275,6 +283,7 @@ sub needs_unix_function($)
my %funcs =
(
"clGetExtensionFunctionAddress" => 1,
"clGetExtensionFunctionAddressForPlatform" => 1,
"clSetCommandQueueProperty" => 1,
);
my $name = shift;
......
@ stdcall clBuildProgram(ptr long ptr ptr ptr ptr)
@ stdcall clCompileProgram(ptr long ptr ptr long ptr ptr ptr ptr)
@ stdcall clCreateBuffer(ptr int64 long ptr ptr)
@ stdcall clCreateCommandQueue(ptr ptr int64 ptr)
@ stdcall clCreateContext(ptr long ptr ptr ptr ptr)
@ stdcall clCreateContextFromType(ptr int64 ptr ptr ptr)
@ stdcall clCreateImage(ptr int64 ptr ptr ptr ptr)
@ stdcall clCreateImage2D(ptr int64 ptr long long long ptr ptr)
@ stdcall clCreateImage3D(ptr int64 ptr long long long long long ptr ptr)
@ stdcall clCreateKernel(ptr ptr ptr)
@ stdcall clCreateKernelsInProgram(ptr long ptr ptr)
@ stdcall clCreateProgramWithBinary(ptr long ptr ptr ptr ptr ptr)
@ stdcall clCreateProgramWithBuiltInKernels(ptr long ptr ptr ptr)
@ stdcall clCreateProgramWithSource(ptr long ptr ptr ptr)
@ stdcall clCreateSampler(ptr long long long ptr)
@ stdcall clCreateSubBuffer(ptr int64 long ptr ptr)
@ stdcall clCreateSubDevices(ptr ptr long ptr ptr)
@ stdcall clCreateUserEvent(ptr ptr)
@ stdcall clEnqueueBarrier(ptr)
@ stdcall clEnqueueBarrierWithWaitList(ptr long ptr ptr)
@ stdcall clEnqueueCopyBuffer(ptr ptr ptr long long long long ptr ptr)
@ stdcall clEnqueueCopyBufferRect(ptr ptr ptr ptr ptr ptr long long long long long ptr ptr)
@ stdcall clEnqueueCopyBufferToImage(ptr ptr ptr long ptr ptr long ptr ptr)
@ stdcall clEnqueueCopyImage(ptr ptr ptr ptr ptr ptr long ptr ptr)
@ stdcall clEnqueueCopyImageToBuffer(ptr ptr ptr ptr ptr long long ptr ptr)
@ stdcall clEnqueueFillBuffer(ptr ptr ptr long long long long ptr ptr)
@ stdcall clEnqueueFillImage(ptr ptr ptr ptr ptr long ptr ptr)
@ stdcall clEnqueueMapBuffer(ptr ptr long int64 long long long ptr ptr ptr)
@ stdcall clEnqueueMapImage(ptr ptr long int64 ptr ptr ptr ptr long ptr ptr ptr)
@ stdcall clEnqueueMarker(ptr ptr)
@ stdcall clEnqueueMarkerWithWaitList(ptr long ptr ptr)
@ stdcall clEnqueueMigrateMemObjects(ptr long ptr int64 long ptr ptr)
@ stdcall clEnqueueNDRangeKernel(ptr ptr long ptr ptr ptr long ptr ptr)
@ stdcall clEnqueueNativeKernel(ptr ptr ptr long long ptr ptr long ptr ptr)
@ stdcall clEnqueueReadBuffer(ptr ptr long long long ptr long ptr ptr)
......@@ -41,7 +50,9 @@
@ stdcall clGetEventInfo(ptr long long ptr ptr)
@ stdcall clGetEventProfilingInfo(ptr long long ptr ptr)
@ stdcall clGetExtensionFunctionAddress(ptr)
@ stdcall clGetExtensionFunctionAddressForPlatform(ptr ptr)
@ stdcall clGetImageInfo(ptr long long ptr ptr)
@ stdcall clGetKernelArgInfo(ptr long long long ptr ptr)
@ stdcall clGetKernelInfo(ptr long long ptr ptr)
@ stdcall clGetKernelWorkGroupInfo(ptr ptr long long ptr ptr)
@ stdcall clGetMemObjectInfo(ptr long long ptr ptr)
......@@ -51,8 +62,10 @@
@ stdcall clGetProgramInfo(ptr long long ptr ptr)
@ stdcall clGetSamplerInfo(ptr long long ptr ptr)
@ stdcall clGetSupportedImageFormats(ptr int64 long long ptr ptr)
@ stdcall clLinkProgram(ptr long ptr ptr long ptr ptr ptr ptr)
@ stdcall clReleaseCommandQueue(ptr)
@ stdcall clReleaseContext(ptr)
@ stdcall clReleaseDevice(ptr)
@ stdcall clReleaseEvent(ptr)
@ stdcall clReleaseKernel(ptr)
@ stdcall clReleaseMemObject(ptr)
......@@ -60,6 +73,7 @@
@ stdcall clReleaseSampler(ptr)
@ stdcall clRetainCommandQueue(ptr)
@ stdcall clRetainContext(ptr)
@ stdcall clRetainDevice(ptr)
@ stdcall clRetainEvent(ptr)
@ stdcall clRetainKernel(ptr)
@ stdcall clRetainMemObject(ptr)
......@@ -71,4 +85,5 @@
@ stdcall clSetMemObjectDestructorCallback(ptr ptr ptr)
@ stdcall clSetUserEventStatus(ptr long)
@ stdcall clUnloadCompiler()
@ stdcall clUnloadPlatformCompiler(ptr)
@ stdcall clWaitForEvents(long ptr)
......@@ -185,6 +185,13 @@ cl_int WINAPI clSetCommandQueueProperty( cl_command_queue command_queue, cl_comm
}
void * WINAPI clGetExtensionFunctionAddressForPlatform( cl_platform_id platform, const char *func_name )
{
FIXME( "(%p, %s) stub!\n", platform, debugstr_a(func_name) );
return NULL;
}
BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved )
{
if (reason == DLL_PROCESS_ATTACH)
......
......@@ -71,6 +71,17 @@ cl_int WINAPI wrap_clSetMemObjectDestructorCallback(cl_mem memobj,
void (WINAPI *pfn_notify)(cl_mem, void *),
void *user_data) DECLSPEC_HIDDEN;
cl_int WINAPI wrap_clCompileProgram( 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 (WINAPI *pfn_notify)(cl_program program, void *user_data),
void *user_data ) DECLSPEC_HIDDEN;
cl_program WINAPI wrap_clLinkProgram( 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 (WINAPI *pfn_notify)(cl_program program, void *user_data),
void *user_data, cl_int *errcode_ret ) DECLSPEC_HIDDEN;
extern const struct opencl_funcs funcs;
#endif
......@@ -17,6 +17,11 @@ static cl_command_queue WINAPI wrap_clCreateCommandQueue( cl_context context, cl
return clCreateCommandQueue( context, device, properties, errcode_ret );
}
static cl_mem WINAPI wrap_clCreateImage( 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 )
{
return clCreateImage( context, flags, image_format, image_desc, host_ptr, errcode_ret );
}
static cl_mem WINAPI wrap_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 )
{
return clCreateImage2D( context, flags, image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret );
......@@ -42,6 +47,11 @@ static cl_program WINAPI wrap_clCreateProgramWithBinary( cl_context context, cl_
return clCreateProgramWithBinary( context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret );
}
static cl_program WINAPI wrap_clCreateProgramWithBuiltInKernels( cl_context context, cl_uint num_devices, const cl_device_id* device_list, const char* kernel_names, cl_int* errcode_ret )
{
return clCreateProgramWithBuiltInKernels( context, num_devices, device_list, kernel_names, errcode_ret );
}
static cl_program WINAPI wrap_clCreateProgramWithSource( cl_context context, cl_uint count, const char** strings, const size_t* lengths, cl_int* errcode_ret )
{
return clCreateProgramWithSource( context, count, strings, lengths, errcode_ret );
......@@ -57,6 +67,11 @@ static cl_mem WINAPI wrap_clCreateSubBuffer( cl_mem buffer, cl_mem_flags flags,
return clCreateSubBuffer( buffer, flags, buffer_create_type, buffer_create_info, errcode_ret );
}
static cl_int WINAPI wrap_clCreateSubDevices( 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 )
{
return clCreateSubDevices( in_device, properties, num_devices, out_devices, num_devices_ret );
}
static cl_event WINAPI wrap_clCreateUserEvent( cl_context context, cl_int* errcode_ret )
{
return clCreateUserEvent( context, errcode_ret );
......@@ -67,6 +82,11 @@ static cl_int WINAPI wrap_clEnqueueBarrier( cl_command_queue command_queue )
return clEnqueueBarrier( command_queue );
}
static cl_int WINAPI wrap_clEnqueueBarrierWithWaitList( cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
{
return clEnqueueBarrierWithWaitList( command_queue, num_events_in_wait_list, event_wait_list, event );
}
static cl_int WINAPI wrap_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 )
{
return clEnqueueCopyBuffer( command_queue, src_buffer, dst_buffer, src_offset, dst_offset, size, num_events_in_wait_list, event_wait_list, event );
......@@ -92,6 +112,16 @@ static cl_int WINAPI wrap_clEnqueueCopyImageToBuffer( cl_command_queue command_q
return clEnqueueCopyImageToBuffer( command_queue, src_image, dst_buffer, src_origin, region, dst_offset, num_events_in_wait_list, event_wait_list, event );
}
static cl_int WINAPI wrap_clEnqueueFillBuffer( 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 )
{
return clEnqueueFillBuffer( command_queue, buffer, pattern, pattern_size, offset, size, num_events_in_wait_list, event_wait_list, event );
}
static cl_int WINAPI wrap_clEnqueueFillImage( 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 )
{
return clEnqueueFillImage( command_queue, image, fill_color, origin, region, num_events_in_wait_list, event_wait_list, event );
}
static void* WINAPI wrap_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 )
{
return clEnqueueMapBuffer( command_queue, buffer, blocking_map, map_flags, offset, size, num_events_in_wait_list, event_wait_list, event, errcode_ret );
......@@ -107,6 +137,16 @@ static cl_int WINAPI wrap_clEnqueueMarker( cl_command_queue command_queue, cl_ev
return clEnqueueMarker( command_queue, event );
}
static cl_int WINAPI wrap_clEnqueueMarkerWithWaitList( cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
{
return clEnqueueMarkerWithWaitList( command_queue, num_events_in_wait_list, event_wait_list, event );
}
static cl_int WINAPI wrap_clEnqueueMigrateMemObjects( 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 )
{
return clEnqueueMigrateMemObjects( command_queue, num_mem_objects, mem_objects, flags, num_events_in_wait_list, event_wait_list, event );
}
static cl_int WINAPI wrap_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 )
{
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 );
......@@ -202,6 +242,11 @@ static cl_int WINAPI wrap_clGetImageInfo( cl_mem image, cl_image_info param_name
return clGetImageInfo( image, param_name, param_value_size, param_value, param_value_size_ret );
}
static cl_int WINAPI wrap_clGetKernelArgInfo( 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 )
{
return clGetKernelArgInfo( kernel, arg_index, param_name, param_value_size, param_value, param_value_size_ret );
}
static cl_int WINAPI wrap_clGetKernelInfo( cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
{
return clGetKernelInfo( kernel, param_name, param_value_size, param_value, param_value_size_ret );
......@@ -257,6 +302,11 @@ static cl_int WINAPI wrap_clReleaseContext( cl_context context )
return clReleaseContext( context );
}
static cl_int WINAPI wrap_clReleaseDevice( cl_device_id device )
{
return clReleaseDevice( device );
}
static cl_int WINAPI wrap_clReleaseEvent( cl_event event )
{
return clReleaseEvent( event );
......@@ -292,6 +342,11 @@ static cl_int WINAPI wrap_clRetainContext( cl_context context )
return clRetainContext( context );
}
static cl_int WINAPI wrap_clRetainDevice( cl_device_id device )
{
return clRetainDevice( device );
}
static cl_int WINAPI wrap_clRetainEvent( cl_event event )
{
return clRetainEvent( event );
......@@ -332,6 +387,11 @@ static cl_int WINAPI wrap_clUnloadCompiler( void )
return clUnloadCompiler();
}
static cl_int WINAPI wrap_clUnloadPlatformCompiler( cl_platform_id platform )
{
return clUnloadPlatformCompiler( platform );
}
static cl_int WINAPI wrap_clWaitForEvents( cl_uint num_events, const cl_event* event_list )
{
return clWaitForEvents( num_events, event_list );
......@@ -340,28 +400,37 @@ static cl_int WINAPI wrap_clWaitForEvents( cl_uint num_events, const cl_event* e
const struct opencl_funcs funcs =
{
wrap_clBuildProgram,
wrap_clCompileProgram,
wrap_clCreateBuffer,
wrap_clCreateCommandQueue,
wrap_clCreateContext,
wrap_clCreateContextFromType,
wrap_clCreateImage,
wrap_clCreateImage2D,
wrap_clCreateImage3D,
wrap_clCreateKernel,
wrap_clCreateKernelsInProgram,
wrap_clCreateProgramWithBinary,
wrap_clCreateProgramWithBuiltInKernels,
wrap_clCreateProgramWithSource,
wrap_clCreateSampler,
wrap_clCreateSubBuffer,
wrap_clCreateSubDevices,
wrap_clCreateUserEvent,
wrap_clEnqueueBarrier,
wrap_clEnqueueBarrierWithWaitList,
wrap_clEnqueueCopyBuffer,
wrap_clEnqueueCopyBufferRect,
wrap_clEnqueueCopyBufferToImage,
wrap_clEnqueueCopyImage,
wrap_clEnqueueCopyImageToBuffer,
wrap_clEnqueueFillBuffer,
wrap_clEnqueueFillImage,
wrap_clEnqueueMapBuffer,
wrap_clEnqueueMapImage,
wrap_clEnqueueMarker,
wrap_clEnqueueMarkerWithWaitList,
wrap_clEnqueueMigrateMemObjects,
wrap_clEnqueueNDRangeKernel,
wrap_clEnqueueNativeKernel,
wrap_clEnqueueReadBuffer,
......@@ -382,6 +451,7 @@ const struct opencl_funcs funcs =
wrap_clGetEventInfo,
wrap_clGetEventProfilingInfo,
wrap_clGetImageInfo,
wrap_clGetKernelArgInfo,
wrap_clGetKernelInfo,
wrap_clGetKernelWorkGroupInfo,
wrap_clGetMemObjectInfo,
......@@ -391,8 +461,10 @@ const struct opencl_funcs funcs =
wrap_clGetProgramInfo,
wrap_clGetSamplerInfo,
wrap_clGetSupportedImageFormats,
wrap_clLinkProgram,
wrap_clReleaseCommandQueue,
wrap_clReleaseContext,
wrap_clReleaseDevice,
wrap_clReleaseEvent,
wrap_clReleaseKernel,
wrap_clReleaseMemObject,
......@@ -400,6 +472,7 @@ const struct opencl_funcs funcs =
wrap_clReleaseSampler,
wrap_clRetainCommandQueue,
wrap_clRetainContext,
wrap_clRetainDevice,
wrap_clRetainEvent,
wrap_clRetainKernel,
wrap_clRetainMemObject,
......@@ -410,5 +483,6 @@ const struct opencl_funcs funcs =
wrap_clSetMemObjectDestructorCallback,
wrap_clSetUserEventStatus,
wrap_clUnloadCompiler,
wrap_clUnloadPlatformCompiler,
wrap_clWaitForEvents,
};
......@@ -154,6 +154,26 @@ cl_int WINAPI wrap_clSetMemObjectDestructorCallback(cl_mem memobj,
return CL_INVALID_OPERATION;
}
cl_int WINAPI wrap_clCompileProgram( 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 (WINAPI *pfn_notify)(cl_program program, void *user_data),
void *user_data )
{
FIXME( "not yet implemented\n" );
return CL_INVALID_OPERATION;
}
cl_program WINAPI wrap_clLinkProgram( 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 (WINAPI *pfn_notify)(cl_program program, void *user_data),
void *user_data, cl_int *errcode_ret )
{
FIXME( "not yet implemented\n" );
*errcode_ret = CL_INVALID_OPERATION;
return NULL;
}
NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
{
if (reason != DLL_PROCESS_ATTACH) return STATUS_SUCCESS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment