[PATCH 2/2] opencl: Basic OpenCL 1.0 implementation. (try 2)
Alexandre Julliard
julliard at winehq.org
Tue Nov 30 04:15:46 CST 2010
Peter Urbanec <winehq.org at urbanec.net> writes:
> +static BOOL load_funcs(void *handle)
> +{
> +#define LOAD_FUNCPTR(f) if((p##f = (void*)wine_dlsym(handle, #f, NULL, 0)) == NULL) \
> + { ERR("Can not find " #f "\n"); return FALSE; } else { TRACE("Loaded function " #f "\n"); };
> +
> + /* Platform API */
> + LOAD_FUNCPTR(clGetPlatformIDs)
> + LOAD_FUNCPTR(clGetPlatformInfo)
> +
> + /* Device APIs */
> + LOAD_FUNCPTR(clGetDeviceIDs)
> + LOAD_FUNCPTR(clGetDeviceInfo)
Why are you loading everything dynamically instead of simply linking to it?
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list