Commit 2a863f40 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

opencl: Use types with consistent alignment for unixlib params structures.

parent 7aaeec35
...@@ -37,21 +37,22 @@ my %core_categories = (); ...@@ -37,21 +37,22 @@ my %core_categories = ();
my %arg_types = my %arg_types =
( (
"cl_bitfield" => [ "int64", "wine_dbgstr_longlong(%s)" ], # spec unixlib format
"double" => [ "double", "%.16e" ], "cl_bitfield" => [ "int64", "ULONGLONG", "wine_dbgstr_longlong(%s)" ],
"float" => [ "float", "%.8e" ], "double" => [ "double", "DOUBLE", "%.16e" ],
"int" => [ "long", "%d" ], "float" => [ "float", "float", "%.8e" ],
"int8_t" => [ "long", "%d" ], "int" => [ "long", "int", "%d" ],
"int16_t" => [ "long", "%d" ], "int8_t" => [ "long", "int8_t", "%d" ],
"int32_t" => [ "long", "%d" ], "int16_t" => [ "long", "int16_t", "%d" ],
"int64_t" => [ "int64", "wine_dbgstr_longlong(%s)" ], "int32_t" => [ "long", "int32_t", "%d" ],
"intptr_t" => [ "long", "%Id" ], "int64_t" => [ "int64", "LONGLONG", "wine_dbgstr_longlong(%s)" ],
"size_t" => [ "long", "%Iu" ], "intptr_t" => [ "long", "INT_PTR", "%Id" ],
"uint8_t" => [ "long", "%u" ], "size_t" => [ "long", "SIZE_T", "%Iu" ],
"uint16_t" => [ "long", "%u" ], "uint8_t" => [ "long", "uint8_t", "%u" ],
"uint32_t" => [ "long", "%u" ], "uint16_t" => [ "long", "uint16_t", "%u" ],
"uint64_t" => [ "int64", "wine_dbgstr_longlong(%s)" ], "uint32_t" => [ "long", "uint32_t", "%u" ],
"unsigned int" => [ "long", "%u" ], "uint64_t" => [ "int64", "ULONGLONG", "wine_dbgstr_longlong(%s)" ],
"unsigned int" => [ "long", "unsigned int", "%u" ],
); );
my %unsupported_extensions = my %unsupported_extensions =
...@@ -99,7 +100,7 @@ sub generate_pe_thunk($$) ...@@ -99,7 +100,7 @@ sub generate_pe_thunk($$)
} }
elsif (defined $arg_types{$ptype}) elsif (defined $arg_types{$ptype})
{ {
my $format = ${$arg_types{$ptype}}[1]; my $format = ${$arg_types{$ptype}}[2];
$trace_arg .= ", " . ($format =~ /^%/ ? $format : "%s"); $trace_arg .= ", " . ($format =~ /^%/ ? $format : "%s");
$trace_call_arg .= ", " . sprintf $format =~ /^%/ ? "%s" : $format, $pname; $trace_call_arg .= ", " . sprintf $format =~ /^%/ ? "%s" : $format, $pname;
} }
...@@ -220,10 +221,23 @@ sub get_func_params($$) ...@@ -220,10 +221,23 @@ sub get_func_params($$)
$params .= " $proto* __retval;\n" unless $proto eq "cl_int"; $params .= " $proto* __retval;\n" unless $proto eq "cl_int";
foreach my $arg (@{$func->[1]}) foreach my $arg (@{$func->[1]})
{ {
my $ptype = get_arg_type( $arg );
next unless $arg->findnodes("./name"); next unless $arg->findnodes("./name");
(my $argtext = $arg->textContent()) =~ s/ +/ /g; my $pname = get_arg_name( $arg );
$argtext =~ s/CL_CALLBACK/WINAPI/g; (my $param = $arg->textContent()) =~ s/ +/ /g;
$params .= " $argtext;\n"; $param =~ s/CL_CALLBACK/WINAPI/g;
if ($param =~ /[[*]/)
{
$params .= " $param;\n";
}
elsif (defined $arg_types{$ptype})
{
$params .= " ${$arg_types{$ptype}}[1] $pname;\n";
}
else
{
die "Unknown type %s in %s\n", $param, $name;
}
} }
return $params . "};\n"; return $params . "};\n";
} }
...@@ -398,7 +412,7 @@ sub parse_file($) ...@@ -398,7 +412,7 @@ sub parse_file($)
my $basetype = @{$type->findnodes("./type")}[0]; my $basetype = @{$type->findnodes("./type")}[0];
if ($type->textContent() =~ /[[*]/) if ($type->textContent() =~ /[[*]/)
{ {
$arg_types{$name} = ["ptr", "%p"]; $arg_types{$name} = ["ptr", $name, "%p"];
} }
elsif (defined($basetype) and defined($arg_types{$basetype->textContent})) elsif (defined($basetype) and defined($arg_types{$basetype->textContent}))
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
struct clBuildProgram_params struct clBuildProgram_params
{ {
cl_program program; cl_program program;
cl_uint num_devices; uint32_t num_devices;
const cl_device_id* device_list; const cl_device_id* device_list;
const char* options; const char* options;
void (WINAPI* pfn_notify)(cl_program program, void* user_data); void (WINAPI* pfn_notify)(cl_program program, void* user_data);
...@@ -13,10 +13,10 @@ struct clBuildProgram_params ...@@ -13,10 +13,10 @@ struct clBuildProgram_params
struct clCompileProgram_params struct clCompileProgram_params
{ {
cl_program program; cl_program program;
cl_uint num_devices; uint32_t num_devices;
const cl_device_id* device_list; const cl_device_id* device_list;
const char* options; const char* options;
cl_uint num_input_headers; uint32_t num_input_headers;
const cl_program* input_headers; const cl_program* input_headers;
const char** header_include_names; const char** header_include_names;
void (WINAPI* pfn_notify)(cl_program program, void* user_data); void (WINAPI* pfn_notify)(cl_program program, void* user_data);
...@@ -27,8 +27,8 @@ struct clCreateBuffer_params ...@@ -27,8 +27,8 @@ struct clCreateBuffer_params
{ {
cl_mem* __retval; cl_mem* __retval;
cl_context context; cl_context context;
cl_mem_flags flags; ULONGLONG flags;
size_t size; SIZE_T size;
void* host_ptr; void* host_ptr;
cl_int* errcode_ret; cl_int* errcode_ret;
}; };
...@@ -38,7 +38,7 @@ struct clCreateCommandQueue_params ...@@ -38,7 +38,7 @@ struct clCreateCommandQueue_params
cl_command_queue* __retval; cl_command_queue* __retval;
cl_context context; cl_context context;
cl_device_id device; cl_device_id device;
cl_command_queue_properties properties; ULONGLONG properties;
cl_int* errcode_ret; cl_int* errcode_ret;
}; };
...@@ -46,7 +46,7 @@ struct clCreateContext_params ...@@ -46,7 +46,7 @@ struct clCreateContext_params
{ {
cl_context* __retval; cl_context* __retval;
const cl_context_properties* properties; const cl_context_properties* properties;
cl_uint num_devices; uint32_t num_devices;
const cl_device_id* devices; const cl_device_id* devices;
void (WINAPI* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data); void (WINAPI* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data);
void* user_data; void* user_data;
...@@ -57,7 +57,7 @@ struct clCreateContextFromType_params ...@@ -57,7 +57,7 @@ struct clCreateContextFromType_params
{ {
cl_context* __retval; cl_context* __retval;
const cl_context_properties* properties; const cl_context_properties* properties;
cl_device_type device_type; ULONGLONG device_type;
void (WINAPI* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data); void (WINAPI* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data);
void* user_data; void* user_data;
cl_int* errcode_ret; cl_int* errcode_ret;
...@@ -67,7 +67,7 @@ struct clCreateImage_params ...@@ -67,7 +67,7 @@ struct clCreateImage_params
{ {
cl_mem* __retval; cl_mem* __retval;
cl_context context; cl_context context;
cl_mem_flags flags; ULONGLONG flags;
const cl_image_format* image_format; const cl_image_format* image_format;
const cl_image_desc* image_desc; const cl_image_desc* image_desc;
void* host_ptr; void* host_ptr;
...@@ -78,11 +78,11 @@ struct clCreateImage2D_params ...@@ -78,11 +78,11 @@ struct clCreateImage2D_params
{ {
cl_mem* __retval; cl_mem* __retval;
cl_context context; cl_context context;
cl_mem_flags flags; ULONGLONG flags;
const cl_image_format* image_format; const cl_image_format* image_format;
size_t image_width; SIZE_T image_width;
size_t image_height; SIZE_T image_height;
size_t image_row_pitch; SIZE_T image_row_pitch;
void* host_ptr; void* host_ptr;
cl_int* errcode_ret; cl_int* errcode_ret;
}; };
...@@ -91,13 +91,13 @@ struct clCreateImage3D_params ...@@ -91,13 +91,13 @@ struct clCreateImage3D_params
{ {
cl_mem* __retval; cl_mem* __retval;
cl_context context; cl_context context;
cl_mem_flags flags; ULONGLONG flags;
const cl_image_format* image_format; const cl_image_format* image_format;
size_t image_width; SIZE_T image_width;
size_t image_height; SIZE_T image_height;
size_t image_depth; SIZE_T image_depth;
size_t image_row_pitch; SIZE_T image_row_pitch;
size_t image_slice_pitch; SIZE_T image_slice_pitch;
void* host_ptr; void* host_ptr;
cl_int* errcode_ret; cl_int* errcode_ret;
}; };
...@@ -113,7 +113,7 @@ struct clCreateKernel_params ...@@ -113,7 +113,7 @@ struct clCreateKernel_params
struct clCreateKernelsInProgram_params struct clCreateKernelsInProgram_params
{ {
cl_program program; cl_program program;
cl_uint num_kernels; uint32_t num_kernels;
cl_kernel* kernels; cl_kernel* kernels;
cl_uint* num_kernels_ret; cl_uint* num_kernels_ret;
}; };
...@@ -122,7 +122,7 @@ struct clCreateProgramWithBinary_params ...@@ -122,7 +122,7 @@ struct clCreateProgramWithBinary_params
{ {
cl_program* __retval; cl_program* __retval;
cl_context context; cl_context context;
cl_uint num_devices; uint32_t num_devices;
const cl_device_id* device_list; const cl_device_id* device_list;
const size_t* lengths; const size_t* lengths;
const unsigned char** binaries; const unsigned char** binaries;
...@@ -134,7 +134,7 @@ struct clCreateProgramWithBuiltInKernels_params ...@@ -134,7 +134,7 @@ struct clCreateProgramWithBuiltInKernels_params
{ {
cl_program* __retval; cl_program* __retval;
cl_context context; cl_context context;
cl_uint num_devices; uint32_t num_devices;
const cl_device_id* device_list; const cl_device_id* device_list;
const char* kernel_names; const char* kernel_names;
cl_int* errcode_ret; cl_int* errcode_ret;
...@@ -144,7 +144,7 @@ struct clCreateProgramWithSource_params ...@@ -144,7 +144,7 @@ struct clCreateProgramWithSource_params
{ {
cl_program* __retval; cl_program* __retval;
cl_context context; cl_context context;
cl_uint count; uint32_t count;
const char** strings; const char** strings;
const size_t* lengths; const size_t* lengths;
cl_int* errcode_ret; cl_int* errcode_ret;
...@@ -154,9 +154,9 @@ struct clCreateSampler_params ...@@ -154,9 +154,9 @@ struct clCreateSampler_params
{ {
cl_sampler* __retval; cl_sampler* __retval;
cl_context context; cl_context context;
cl_bool normalized_coords; uint32_t normalized_coords;
cl_addressing_mode addressing_mode; uint32_t addressing_mode;
cl_filter_mode filter_mode; uint32_t filter_mode;
cl_int* errcode_ret; cl_int* errcode_ret;
}; };
...@@ -164,8 +164,8 @@ struct clCreateSubBuffer_params ...@@ -164,8 +164,8 @@ struct clCreateSubBuffer_params
{ {
cl_mem* __retval; cl_mem* __retval;
cl_mem buffer; cl_mem buffer;
cl_mem_flags flags; ULONGLONG flags;
cl_buffer_create_type buffer_create_type; uint32_t buffer_create_type;
const void* buffer_create_info; const void* buffer_create_info;
cl_int* errcode_ret; cl_int* errcode_ret;
}; };
...@@ -174,7 +174,7 @@ struct clCreateSubDevices_params ...@@ -174,7 +174,7 @@ struct clCreateSubDevices_params
{ {
cl_device_id in_device; cl_device_id in_device;
const cl_device_partition_property* properties; const cl_device_partition_property* properties;
cl_uint num_devices; uint32_t num_devices;
cl_device_id* out_devices; cl_device_id* out_devices;
cl_uint* num_devices_ret; cl_uint* num_devices_ret;
}; };
...@@ -194,7 +194,7 @@ struct clEnqueueBarrier_params ...@@ -194,7 +194,7 @@ struct clEnqueueBarrier_params
struct clEnqueueBarrierWithWaitList_params struct clEnqueueBarrierWithWaitList_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -204,10 +204,10 @@ struct clEnqueueCopyBuffer_params ...@@ -204,10 +204,10 @@ struct clEnqueueCopyBuffer_params
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem src_buffer; cl_mem src_buffer;
cl_mem dst_buffer; cl_mem dst_buffer;
size_t src_offset; SIZE_T src_offset;
size_t dst_offset; SIZE_T dst_offset;
size_t size; SIZE_T size;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -220,11 +220,11 @@ struct clEnqueueCopyBufferRect_params ...@@ -220,11 +220,11 @@ struct clEnqueueCopyBufferRect_params
const size_t* src_origin; const size_t* src_origin;
const size_t* dst_origin; const size_t* dst_origin;
const size_t* region; const size_t* region;
size_t src_row_pitch; SIZE_T src_row_pitch;
size_t src_slice_pitch; SIZE_T src_slice_pitch;
size_t dst_row_pitch; SIZE_T dst_row_pitch;
size_t dst_slice_pitch; SIZE_T dst_slice_pitch;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -234,10 +234,10 @@ struct clEnqueueCopyBufferToImage_params ...@@ -234,10 +234,10 @@ struct clEnqueueCopyBufferToImage_params
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem src_buffer; cl_mem src_buffer;
cl_mem dst_image; cl_mem dst_image;
size_t src_offset; SIZE_T src_offset;
const size_t* dst_origin; const size_t* dst_origin;
const size_t* region; const size_t* region;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -250,7 +250,7 @@ struct clEnqueueCopyImage_params ...@@ -250,7 +250,7 @@ struct clEnqueueCopyImage_params
const size_t* src_origin; const size_t* src_origin;
const size_t* dst_origin; const size_t* dst_origin;
const size_t* region; const size_t* region;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -262,8 +262,8 @@ struct clEnqueueCopyImageToBuffer_params ...@@ -262,8 +262,8 @@ struct clEnqueueCopyImageToBuffer_params
cl_mem dst_buffer; cl_mem dst_buffer;
const size_t* src_origin; const size_t* src_origin;
const size_t* region; const size_t* region;
size_t dst_offset; SIZE_T dst_offset;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -273,10 +273,10 @@ struct clEnqueueFillBuffer_params ...@@ -273,10 +273,10 @@ struct clEnqueueFillBuffer_params
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem buffer; cl_mem buffer;
const void* pattern; const void* pattern;
size_t pattern_size; SIZE_T pattern_size;
size_t offset; SIZE_T offset;
size_t size; SIZE_T size;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -288,7 +288,7 @@ struct clEnqueueFillImage_params ...@@ -288,7 +288,7 @@ struct clEnqueueFillImage_params
const void* fill_color; const void* fill_color;
const size_t* origin; const size_t* origin;
const size_t* region; const size_t* region;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -298,11 +298,11 @@ struct clEnqueueMapBuffer_params ...@@ -298,11 +298,11 @@ struct clEnqueueMapBuffer_params
void** __retval; void** __retval;
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem buffer; cl_mem buffer;
cl_bool blocking_map; uint32_t blocking_map;
cl_map_flags map_flags; ULONGLONG map_flags;
size_t offset; SIZE_T offset;
size_t size; SIZE_T size;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
cl_int* errcode_ret; cl_int* errcode_ret;
...@@ -313,13 +313,13 @@ struct clEnqueueMapImage_params ...@@ -313,13 +313,13 @@ struct clEnqueueMapImage_params
void** __retval; void** __retval;
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem image; cl_mem image;
cl_bool blocking_map; uint32_t blocking_map;
cl_map_flags map_flags; ULONGLONG map_flags;
const size_t* origin; const size_t* origin;
const size_t* region; const size_t* region;
size_t* image_row_pitch; size_t* image_row_pitch;
size_t* image_slice_pitch; size_t* image_slice_pitch;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
cl_int* errcode_ret; cl_int* errcode_ret;
...@@ -334,7 +334,7 @@ struct clEnqueueMarker_params ...@@ -334,7 +334,7 @@ struct clEnqueueMarker_params
struct clEnqueueMarkerWithWaitList_params struct clEnqueueMarkerWithWaitList_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -342,10 +342,10 @@ struct clEnqueueMarkerWithWaitList_params ...@@ -342,10 +342,10 @@ struct clEnqueueMarkerWithWaitList_params
struct clEnqueueMigrateMemObjects_params struct clEnqueueMigrateMemObjects_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_uint num_mem_objects; uint32_t num_mem_objects;
const cl_mem* mem_objects; const cl_mem* mem_objects;
cl_mem_migration_flags flags; ULONGLONG flags;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -354,11 +354,11 @@ struct clEnqueueNDRangeKernel_params ...@@ -354,11 +354,11 @@ struct clEnqueueNDRangeKernel_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_kernel kernel; cl_kernel kernel;
cl_uint work_dim; uint32_t work_dim;
const size_t* global_work_offset; const size_t* global_work_offset;
const size_t* global_work_size; const size_t* global_work_size;
const size_t* local_work_size; const size_t* local_work_size;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -368,11 +368,11 @@ struct clEnqueueNativeKernel_params ...@@ -368,11 +368,11 @@ struct clEnqueueNativeKernel_params
cl_command_queue command_queue; cl_command_queue command_queue;
void (WINAPI* user_func)(void*); void (WINAPI* user_func)(void*);
void* args; void* args;
size_t cb_args; SIZE_T cb_args;
cl_uint num_mem_objects; uint32_t num_mem_objects;
const cl_mem* mem_list; const cl_mem* mem_list;
const void** args_mem_loc; const void** args_mem_loc;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -381,11 +381,11 @@ struct clEnqueueReadBuffer_params ...@@ -381,11 +381,11 @@ struct clEnqueueReadBuffer_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem buffer; cl_mem buffer;
cl_bool blocking_read; uint32_t blocking_read;
size_t offset; SIZE_T offset;
size_t size; SIZE_T size;
void* ptr; void* ptr;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -394,16 +394,16 @@ struct clEnqueueReadBufferRect_params ...@@ -394,16 +394,16 @@ struct clEnqueueReadBufferRect_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem buffer; cl_mem buffer;
cl_bool blocking_read; uint32_t blocking_read;
const size_t* buffer_origin; const size_t* buffer_origin;
const size_t* host_origin; const size_t* host_origin;
const size_t* region; const size_t* region;
size_t buffer_row_pitch; SIZE_T buffer_row_pitch;
size_t buffer_slice_pitch; SIZE_T buffer_slice_pitch;
size_t host_row_pitch; SIZE_T host_row_pitch;
size_t host_slice_pitch; SIZE_T host_slice_pitch;
void* ptr; void* ptr;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -412,13 +412,13 @@ struct clEnqueueReadImage_params ...@@ -412,13 +412,13 @@ struct clEnqueueReadImage_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem image; cl_mem image;
cl_bool blocking_read; uint32_t blocking_read;
const size_t* origin; const size_t* origin;
const size_t* region; const size_t* region;
size_t row_pitch; SIZE_T row_pitch;
size_t slice_pitch; SIZE_T slice_pitch;
void* ptr; void* ptr;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -427,7 +427,7 @@ struct clEnqueueTask_params ...@@ -427,7 +427,7 @@ struct clEnqueueTask_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_kernel kernel; cl_kernel kernel;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -437,7 +437,7 @@ struct clEnqueueUnmapMemObject_params ...@@ -437,7 +437,7 @@ struct clEnqueueUnmapMemObject_params
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem memobj; cl_mem memobj;
void* mapped_ptr; void* mapped_ptr;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -445,7 +445,7 @@ struct clEnqueueUnmapMemObject_params ...@@ -445,7 +445,7 @@ struct clEnqueueUnmapMemObject_params
struct clEnqueueWaitForEvents_params struct clEnqueueWaitForEvents_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_uint num_events; uint32_t num_events;
const cl_event* event_list; const cl_event* event_list;
}; };
...@@ -453,11 +453,11 @@ struct clEnqueueWriteBuffer_params ...@@ -453,11 +453,11 @@ struct clEnqueueWriteBuffer_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem buffer; cl_mem buffer;
cl_bool blocking_write; uint32_t blocking_write;
size_t offset; SIZE_T offset;
size_t size; SIZE_T size;
const void* ptr; const void* ptr;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -466,16 +466,16 @@ struct clEnqueueWriteBufferRect_params ...@@ -466,16 +466,16 @@ struct clEnqueueWriteBufferRect_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem buffer; cl_mem buffer;
cl_bool blocking_write; uint32_t blocking_write;
const size_t* buffer_origin; const size_t* buffer_origin;
const size_t* host_origin; const size_t* host_origin;
const size_t* region; const size_t* region;
size_t buffer_row_pitch; SIZE_T buffer_row_pitch;
size_t buffer_slice_pitch; SIZE_T buffer_slice_pitch;
size_t host_row_pitch; SIZE_T host_row_pitch;
size_t host_slice_pitch; SIZE_T host_slice_pitch;
const void* ptr; const void* ptr;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -484,13 +484,13 @@ struct clEnqueueWriteImage_params ...@@ -484,13 +484,13 @@ struct clEnqueueWriteImage_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_mem image; cl_mem image;
cl_bool blocking_write; uint32_t blocking_write;
const size_t* origin; const size_t* origin;
const size_t* region; const size_t* region;
size_t input_row_pitch; SIZE_T input_row_pitch;
size_t input_slice_pitch; SIZE_T input_slice_pitch;
const void* ptr; const void* ptr;
cl_uint num_events_in_wait_list; uint32_t num_events_in_wait_list;
const cl_event* event_wait_list; const cl_event* event_wait_list;
cl_event* event; cl_event* event;
}; };
...@@ -508,8 +508,8 @@ struct clFlush_params ...@@ -508,8 +508,8 @@ struct clFlush_params
struct clGetCommandQueueInfo_params struct clGetCommandQueueInfo_params
{ {
cl_command_queue command_queue; cl_command_queue command_queue;
cl_command_queue_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -517,8 +517,8 @@ struct clGetCommandQueueInfo_params ...@@ -517,8 +517,8 @@ struct clGetCommandQueueInfo_params
struct clGetContextInfo_params struct clGetContextInfo_params
{ {
cl_context context; cl_context context;
cl_context_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -526,8 +526,8 @@ struct clGetContextInfo_params ...@@ -526,8 +526,8 @@ struct clGetContextInfo_params
struct clGetDeviceIDs_params struct clGetDeviceIDs_params
{ {
cl_platform_id platform; cl_platform_id platform;
cl_device_type device_type; ULONGLONG device_type;
cl_uint num_entries; uint32_t num_entries;
cl_device_id* devices; cl_device_id* devices;
cl_uint* num_devices; cl_uint* num_devices;
}; };
...@@ -535,8 +535,8 @@ struct clGetDeviceIDs_params ...@@ -535,8 +535,8 @@ struct clGetDeviceIDs_params
struct clGetDeviceInfo_params struct clGetDeviceInfo_params
{ {
cl_device_id device; cl_device_id device;
cl_device_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -544,8 +544,8 @@ struct clGetDeviceInfo_params ...@@ -544,8 +544,8 @@ struct clGetDeviceInfo_params
struct clGetEventInfo_params struct clGetEventInfo_params
{ {
cl_event event; cl_event event;
cl_event_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -553,8 +553,8 @@ struct clGetEventInfo_params ...@@ -553,8 +553,8 @@ struct clGetEventInfo_params
struct clGetEventProfilingInfo_params struct clGetEventProfilingInfo_params
{ {
cl_event event; cl_event event;
cl_profiling_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -562,8 +562,8 @@ struct clGetEventProfilingInfo_params ...@@ -562,8 +562,8 @@ struct clGetEventProfilingInfo_params
struct clGetImageInfo_params struct clGetImageInfo_params
{ {
cl_mem image; cl_mem image;
cl_image_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -571,9 +571,9 @@ struct clGetImageInfo_params ...@@ -571,9 +571,9 @@ struct clGetImageInfo_params
struct clGetKernelArgInfo_params struct clGetKernelArgInfo_params
{ {
cl_kernel kernel; cl_kernel kernel;
cl_uint arg_index; uint32_t arg_index;
cl_kernel_arg_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -581,8 +581,8 @@ struct clGetKernelArgInfo_params ...@@ -581,8 +581,8 @@ struct clGetKernelArgInfo_params
struct clGetKernelInfo_params struct clGetKernelInfo_params
{ {
cl_kernel kernel; cl_kernel kernel;
cl_kernel_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -591,8 +591,8 @@ struct clGetKernelWorkGroupInfo_params ...@@ -591,8 +591,8 @@ struct clGetKernelWorkGroupInfo_params
{ {
cl_kernel kernel; cl_kernel kernel;
cl_device_id device; cl_device_id device;
cl_kernel_work_group_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -600,15 +600,15 @@ struct clGetKernelWorkGroupInfo_params ...@@ -600,15 +600,15 @@ struct clGetKernelWorkGroupInfo_params
struct clGetMemObjectInfo_params struct clGetMemObjectInfo_params
{ {
cl_mem memobj; cl_mem memobj;
cl_mem_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
struct clGetPlatformIDs_params struct clGetPlatformIDs_params
{ {
cl_uint num_entries; uint32_t num_entries;
cl_platform_id* platforms; cl_platform_id* platforms;
cl_uint* num_platforms; cl_uint* num_platforms;
}; };
...@@ -616,8 +616,8 @@ struct clGetPlatformIDs_params ...@@ -616,8 +616,8 @@ struct clGetPlatformIDs_params
struct clGetPlatformInfo_params struct clGetPlatformInfo_params
{ {
cl_platform_id platform; cl_platform_id platform;
cl_platform_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -626,8 +626,8 @@ struct clGetProgramBuildInfo_params ...@@ -626,8 +626,8 @@ struct clGetProgramBuildInfo_params
{ {
cl_program program; cl_program program;
cl_device_id device; cl_device_id device;
cl_program_build_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -635,8 +635,8 @@ struct clGetProgramBuildInfo_params ...@@ -635,8 +635,8 @@ struct clGetProgramBuildInfo_params
struct clGetProgramInfo_params struct clGetProgramInfo_params
{ {
cl_program program; cl_program program;
cl_program_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -644,8 +644,8 @@ struct clGetProgramInfo_params ...@@ -644,8 +644,8 @@ struct clGetProgramInfo_params
struct clGetSamplerInfo_params struct clGetSamplerInfo_params
{ {
cl_sampler sampler; cl_sampler sampler;
cl_sampler_info param_name; uint32_t param_name;
size_t param_value_size; SIZE_T param_value_size;
void* param_value; void* param_value;
size_t* param_value_size_ret; size_t* param_value_size_ret;
}; };
...@@ -653,9 +653,9 @@ struct clGetSamplerInfo_params ...@@ -653,9 +653,9 @@ struct clGetSamplerInfo_params
struct clGetSupportedImageFormats_params struct clGetSupportedImageFormats_params
{ {
cl_context context; cl_context context;
cl_mem_flags flags; ULONGLONG flags;
cl_mem_object_type image_type; uint32_t image_type;
cl_uint num_entries; uint32_t num_entries;
cl_image_format* image_formats; cl_image_format* image_formats;
cl_uint* num_image_formats; cl_uint* num_image_formats;
}; };
...@@ -664,10 +664,10 @@ struct clLinkProgram_params ...@@ -664,10 +664,10 @@ struct clLinkProgram_params
{ {
cl_program* __retval; cl_program* __retval;
cl_context context; cl_context context;
cl_uint num_devices; uint32_t num_devices;
const cl_device_id* device_list; const cl_device_id* device_list;
const char* options; const char* options;
cl_uint num_input_programs; uint32_t num_input_programs;
const cl_program* input_programs; const cl_program* input_programs;
void (WINAPI* pfn_notify)(cl_program program, void* user_data); void (WINAPI* pfn_notify)(cl_program program, void* user_data);
void* user_data; void* user_data;
...@@ -757,7 +757,7 @@ struct clRetainSampler_params ...@@ -757,7 +757,7 @@ struct clRetainSampler_params
struct clSetEventCallback_params struct clSetEventCallback_params
{ {
cl_event event; cl_event event;
cl_int command_exec_callback_type; int32_t command_exec_callback_type;
void (WINAPI* pfn_notify)(cl_event event, cl_int event_command_status, void *user_data); void (WINAPI* pfn_notify)(cl_event event, cl_int event_command_status, void *user_data);
void* user_data; void* user_data;
}; };
...@@ -765,8 +765,8 @@ struct clSetEventCallback_params ...@@ -765,8 +765,8 @@ struct clSetEventCallback_params
struct clSetKernelArg_params struct clSetKernelArg_params
{ {
cl_kernel kernel; cl_kernel kernel;
cl_uint arg_index; uint32_t arg_index;
size_t arg_size; SIZE_T arg_size;
const void* arg_value; const void* arg_value;
}; };
...@@ -780,7 +780,7 @@ struct clSetMemObjectDestructorCallback_params ...@@ -780,7 +780,7 @@ struct clSetMemObjectDestructorCallback_params
struct clSetUserEventStatus_params struct clSetUserEventStatus_params
{ {
cl_event event; cl_event event;
cl_int execution_status; int32_t execution_status;
}; };
struct clUnloadCompiler_params struct clUnloadCompiler_params
...@@ -794,7 +794,7 @@ struct clUnloadPlatformCompiler_params ...@@ -794,7 +794,7 @@ struct clUnloadPlatformCompiler_params
struct clWaitForEvents_params struct clWaitForEvents_params
{ {
cl_uint num_events; uint32_t num_events;
const cl_event* event_list; const cl_event* event_list;
}; };
......
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