"description": "clover: Fixes building with mingw-x86",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
namespace clover {
extern const cl_icd_dispatch _dispatch;
- cl_int
+ cl_int CL_API_CALL
GetPlatformInfo(cl_platform_id d_platform, cl_platform_info param,
size_t size, void *r_buf, size_t *r_size);
- void *
+ void * CL_API_CALL
GetExtensionFunctionAddress(const char *p_name);
- void *
+ void * CL_API_CALL
GetExtensionFunctionAddressForPlatform(cl_platform_id d_platform,
const char *p_name);
- cl_int
+ cl_int CL_API_CALL
IcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id *rd_platforms,
cl_uint *rnum_platforms);
- cl_int
+ cl_int CL_API_CALL
EnqueueSVMFree(cl_command_queue command_queue,
cl_uint num_svm_pointers,
void *svm_pointers[],
cl_event *event,
cl_int cmd);
- cl_int
+ cl_int CL_API_CALL
EnqueueSVMMemcpy(cl_command_queue command_queue,
cl_bool blocking_copy,
void *dst_ptr,
cl_event *event,
cl_int cmd);
- cl_int
+ cl_int CL_API_CALL
EnqueueSVMMap(cl_command_queue command_queue,
cl_bool blocking_map,
cl_map_flags map_flags,
cl_event *event,
cl_int cmd);
- cl_int
+ cl_int CL_API_CALL
EnqueueSVMMemFill(cl_command_queue command_queue,
void *svm_ptr,
const void *pattern,
cl_event *event,
cl_int cmd);
- cl_int
+ cl_int CL_API_CALL
EnqueueSVMUnmap(cl_command_queue command_queue,
void *svm_ptr,
cl_uint num_events_in_wait_list,
cl_event *event,
cl_int cmd);
- cl_program
+ cl_program CL_API_CALL
CreateProgramWithILKHR(cl_context d_ctx, const void *il,
size_t length, cl_int *r_errcode);
}
}
CLOVER_API cl_int
-clEnqueueNativeKernel(cl_command_queue d_q, void (*func)(void *),
+clEnqueueNativeKernel(cl_command_queue d_q,
+ void (CL_CALLBACK * func)(void *),
void *args, size_t args_size,
cl_uint num_mems, const cl_mem *d_mems,
const void **mem_handles, cl_uint num_deps,
class build_notifier {
public:
build_notifier(cl_program prog,
- void (*notifer)(cl_program, void *), void *data) :
+ void (CL_CALLBACK * notifer)(cl_program, void *), void *data) :
prog_(prog), notifer(notifer), data_(data) { }
~build_notifier() {
private:
cl_program prog_;
- void (*notifer)(cl_program, void *);
+ void (CL_CALLBACK * notifer)(cl_program, void *);
void *data_;
};
void
validate_build_common(const program &prog, cl_uint num_devs,
const cl_device_id *d_devs,
- void (*pfn_notify)(cl_program, void *),
+ void (CL_CALLBACK * pfn_notify)(cl_program, void *),
void *user_data) {
if (!pfn_notify && user_data)
throw error(CL_INVALID_VALUE);
CLOVER_API cl_int
clBuildProgram(cl_program d_prog, cl_uint num_devs,
const cl_device_id *d_devs, const char *p_opts,
- void (*pfn_notify)(cl_program, void *),
+ void (CL_CALLBACK * pfn_notify)(cl_program, void *),
void *user_data) try {
auto &prog = obj(d_prog);
auto devs =
const cl_device_id *d_devs, const char *p_opts,
cl_uint num_headers, const cl_program *d_header_progs,
const char **header_names,
- void (*pfn_notify)(cl_program, void *),
+ void (CL_CALLBACK * pfn_notify)(cl_program, void *),
void *user_data) try {
auto &prog = obj(d_prog);
auto devs =
CLOVER_API cl_program
clLinkProgram(cl_context d_ctx, cl_uint num_devs, const cl_device_id *d_devs,
const char *p_opts, cl_uint num_progs, const cl_program *d_progs,
- void (*pfn_notify) (cl_program, void *), void *user_data,
+ void (CL_CALLBACK * pfn_notify) (cl_program, void *), void *user_data,
cl_int *r_errcode) try {
auto &ctx = obj(d_ctx);
const auto opts = build_options(p_opts, "CLOVER_EXTRA_LINK_OPTIONS");
return e.get();
}
+static void CL_CALLBACK
+free_queue(cl_command_queue d_q, cl_uint num_svm_pointers,
+ void *svm_pointers[], void *) {
+ clover::context &ctx = obj(d_q).context();
+ for (void *p : range(svm_pointers, num_svm_pointers)) {
+ ctx.remove_svm_allocation(p);
+ free(p);
+ }
+}
+
cl_int
clover::EnqueueSVMFree(cl_command_queue d_q,
cl_uint num_svm_pointers,
CLOVER_NOT_SUPPORTED_UNTIL("2.0");
return CL_INVALID_VALUE;
}
- pfn_free_func = [](cl_command_queue d_q, cl_uint num_svm_pointers,
- void *svm_pointers[], void *) {
- clover::context &ctx = obj(d_q).context();
- for (void *p : range(svm_pointers, num_svm_pointers)) {
- ctx.remove_svm_allocation(p);
- free(p);
- }
- };
+ pfn_free_func = free_queue;
}
auto hev = create<hard_event>(q, cmd, deps,
-EXPORTS
-clGetPlatformInfo
-clGetExtensionFunctionAddress
-clGetExtensionFunctionAddressForPlatform
-clIcdGetPlatformIDsKHR
\ No newline at end of file
+; stdcall calling convention have @number suffix on 32 bits architecture for gcc
+clGetPlatformInfo@20
+clGetExtensionFunctionAddress@4
+clGetExtensionFunctionAddressForPlatform@8
+clIcdGetPlatformIDsKHR@12
\ No newline at end of file
-EXPORTS
-clBuildProgram
-clCreateBuffer
-clCreateCommandQueue
-clCreateContext
-clCreateContextFromType
+; stdcall calling convention have @number suffix on 32 bits architecture for gcc
+clBuildProgram@24
+clCreateBuffer@24
+clCreateCommandQueue@20
+clCreateContext@24
+clCreateContextFromType@24
; clCreateFromGLBuffer
; clCreateFromGLRenderbuffer
; clCreateFromGLTexture2D
; clCreateFromGLTexture3D
-clCreateImage2D
-clCreateImage3D
-clCreateKernel
-clCreateKernelsInProgram
-clCreateProgramWithBinary
-clCreateProgramWithSource
-clCreateSampler
+clCreateImage2D@36
+clCreateImage3D@44
+clCreateKernel@12
+clCreateKernelsInProgram@16
+clCreateProgramWithBinary@28
+clCreateProgramWithSource@20
+clCreateSampler@20
; clEnqueueAcquireGLObjects
-clEnqueueBarrier
-clEnqueueCopyBuffer
-clEnqueueCopyBufferToImage
-clEnqueueCopyImage
-clEnqueueCopyImageToBuffer
-clEnqueueMapBuffer
-clEnqueueMapImage
-clEnqueueMarker
-clEnqueueNDRangeKernel
-clEnqueueNativeKernel
-clEnqueueReadBuffer
-clEnqueueReadImage
+clEnqueueBarrier@4
+clEnqueueCopyBuffer@36
+clEnqueueCopyBufferToImage@36
+clEnqueueCopyImage@36
+clEnqueueCopyImageToBuffer@36
+clEnqueueMapBuffer@44
+clEnqueueMapImage@52
+clEnqueueMarker@8
+clEnqueueNDRangeKernel@36
+clEnqueueNativeKernel@40
+clEnqueueReadBuffer@36
+clEnqueueReadImage@44
; clEnqueueReleaseGLObjects
-clEnqueueTask
-clEnqueueUnmapMemObject
-clEnqueueWaitForEvents
-clEnqueueWriteBuffer
-clEnqueueWriteImage
-clFinish
-clFlush
-clGetCommandQueueInfo
-clGetContextInfo
-clGetDeviceIDs
-clGetDeviceInfo
-clGetEventInfo
-clGetEventProfilingInfo
-clGetExtensionFunctionAddress
+clEnqueueTask@20
+clEnqueueUnmapMemObject@24
+clEnqueueWaitForEvents@12
+clEnqueueWriteBuffer@36
+clEnqueueWriteImage@44
+clFinish@4
+clFlush@4
+clGetCommandQueueInfo@20
+clGetContextInfo@20
+clGetDeviceIDs@24
+clGetDeviceInfo@20
+clGetEventInfo@20
+clGetEventProfilingInfo@20
+clGetExtensionFunctionAddress@4
; clGetGLObjectInfo
; clGetGLTextureInfo
-clGetImageInfo
-clGetKernelInfo
-clGetKernelWorkGroupInfo
-clGetMemObjectInfo
-clGetPlatformIDs
-clGetPlatformInfo
-clGetProgramBuildInfo
-clGetProgramInfo
-clGetSamplerInfo
-clGetSupportedImageFormats
-clReleaseCommandQueue
-clReleaseContext
-clReleaseEvent
-clReleaseKernel
-clReleaseMemObject
-clReleaseProgram
-clReleaseSampler
-clRetainCommandQueue
-clRetainContext
-clRetainEvent
-clRetainKernel
-clRetainMemObject
-clRetainProgram
-clRetainSampler
+clGetImageInfo@20
+clGetKernelInfo@20
+clGetKernelWorkGroupInfo@24
+clGetMemObjectInfo@20
+clGetPlatformIDs@12
+clGetPlatformInfo@20
+clGetProgramBuildInfo@24
+clGetProgramInfo@20
+clGetSamplerInfo@20
+clGetSupportedImageFormats@28
+clReleaseCommandQueue@4
+clReleaseContext@4
+clReleaseEvent@4
+clReleaseKernel@4
+clReleaseMemObject@4
+clReleaseProgram@4
+clReleaseSampler@4
+clRetainCommandQueue@4
+clRetainContext@4
+clRetainEvent@4
+clRetainKernel@4
+clRetainMemObject@4
+clRetainProgram@4
+clRetainSampler@4
; clSetCommandQueueProperty
-clSetKernelArg
-clUnloadCompiler
-clWaitForEvents
-clCreateSubBuffer
-clCreateUserEvent
-clEnqueueCopyBufferRect
-clEnqueueReadBufferRect
-clEnqueueWriteBufferRect
-clSetEventCallback
-clSetMemObjectDestructorCallback
-clSetUserEventStatus
-clCompileProgram
+clSetKernelArg@16
+clUnloadCompiler@0
+clWaitForEvents@8
+clCreateSubBuffer@24
+clCreateUserEvent@8
+clEnqueueCopyBufferRect@52
+clEnqueueReadBufferRect@56
+clEnqueueWriteBufferRect@56
+clSetEventCallback@16
+clSetMemObjectDestructorCallback@12
+clSetUserEventStatus@8
+clCompileProgram@36
; clCreateFromGLTexture
-clCreateImage
-clCreateProgramWithBuiltInKernels
-clCreateSubDevices
-clEnqueueBarrierWithWaitList
-clEnqueueFillBuffer
-clEnqueueFillImage
-clEnqueueMarkerWithWaitList
-clEnqueueMigrateMemObjects
-clGetExtensionFunctionAddressForPlatform
-clGetKernelArgInfo
-clLinkProgram
-clReleaseDevice
-clRetainDevice
-clUnloadPlatformCompiler
-clCreateCommandQueueWithProperties
-clCreatePipe
+clCreateImage@28
+clCreateProgramWithBuiltInKernels@20
+clCreateSubDevices@20
+clEnqueueBarrierWithWaitList@16
+clEnqueueFillBuffer@36
+clEnqueueFillImage@32
+clEnqueueMarkerWithWaitList@16
+clEnqueueMigrateMemObjects@32
+clGetExtensionFunctionAddressForPlatform@8
+clGetKernelArgInfo@24
+clLinkProgram@36
+clReleaseDevice@4
+clRetainDevice@4
+clUnloadPlatformCompiler@4
+clCreateCommandQueueWithProperties@16
+clCreatePipe@28
; clCreateSamplerWithProperties
-clEnqueueSVMFree
-clEnqueueSVMMap
-clEnqueueSVMMemcpy
-clEnqueueSVMMemFill
-clEnqueueSVMUnmap
-clGetPipeInfo
-clSetKernelArgSVMPointer
-clSetKernelExecInfo
-clSVMAlloc
-clSVMFree
+clEnqueueSVMFree@32
+clEnqueueSVMMap@36
+clEnqueueSVMMemcpy@32
+clEnqueueSVMMemFill@32
+clEnqueueSVMUnmap@20
+clGetPipeInfo@20
+clSetKernelArgSVMPointer@12
+clSetKernelExecInfo@16
+clSVMAlloc@20
+clSVMFree@8
; clCloneKernel
-clCreateProgramWithIL
-clEnqueueSVMMigrateMem
-clGetDeviceAndHostTimer
-clGetHostTimer
-clGetKernelSubGroupInfo
-clSetDefaultDeviceCommandQueue
-clSetProgramReleaseCallback
-clSetProgramSpecializationConstant
-clCreateBufferWithProperties
-clCreateImageWithProperties
-clSetContextDestructorCallback
+clCreateProgramWithIL@16
+clEnqueueSVMMigrateMem@36
+clGetDeviceAndHostTimer@12
+clGetHostTimer@8
+clGetKernelSubGroupInfo@32
+clSetDefaultDeviceCommandQueue@12
+clSetProgramReleaseCallback@12
+clSetProgramSpecializationConstant@16
+clCreateBufferWithProperties@28
+clCreateImageWithProperties@32
+clSetContextDestructorCallback@12
endif
endif
-ocldef = files(opencl_libname + '.def.in')[0]
+ocldef_in = files(opencl_libname + '.def.in')[0]
+ocldef = custom_target(
+ 'ocldef.def',
+ input: ocldef_in,
+ output : 'ocldef.def',
+ command : gen_vs_module_defs_normal_command,
+)
libopencl = shared_library(
opencl_libname,