opencl: Initial stub implementation of OpenCL 1.0.

oldstable
Peter Urbanec 2010-12-02 23:41:48 +11:00 committed by Alexandre Julliard
parent f0f3157da1
commit 65c84d773f
6 changed files with 198 additions and 0 deletions

66
configure vendored
View File

@ -640,6 +640,7 @@ HALINCL
XSLTINCL
XML2INCL
XML2LIBS
LIBOPENCL
NASLIBS
X_EXTRA_LIBS
X_LIBS
@ -790,6 +791,7 @@ with_ldap
with_mpg123
with_nas
with_openal
with_opencl
with_opengl
with_openssl
with_oss
@ -1480,6 +1482,7 @@ Optional Packages:
--without-mpg123 do not use the mpg123 library
--without-nas do not use the NAS sound support
--without-openal do not use OpenAL
--without-opencl do not use OpenCL
--without-opengl do not use OpenGL
--without-openssl do not use OpenSSL
--without-oss do not use the OSS sound support
@ -2644,6 +2647,12 @@ if test "${with_openal+set}" = set; then :
fi
# Check whether --with-opencl was given.
if test "${with_opencl+set}" = set; then :
withval=$with_opencl; if test "x$withval" = "xno"; then ac_cv_header_CL_opencl_h=no; ac_cv_header_OpenCL_opencl_h=no; fi
fi
# Check whether --with-opengl was given.
if test "${with_opengl+set}" = set; then :
withval=$with_opengl;
@ -5759,12 +5768,14 @@ for ac_header in \
AL/al.h \
AudioToolbox/AudioConverter.h \
AudioUnit/AudioUnit.h \
CL/opencl.h \
Carbon/Carbon.h \
CoreAudio/CoreAudio.h \
DiskArbitration/DiskArbitration.h \
IOKit/IOKitLib.h \
IOKit/hid/IOHIDLib.h \
OpenAL/al.h \
OpenCL/opencl.h \
alias.h \
alsa/asoundlib.h \
arpa/inet.h \
@ -9052,6 +9063,60 @@ Use the --without-x option if you really want this." "$LINENO" 5 ;;
esac
fi
if test "$ac_cv_header_CL_opencl_h" = "yes" -o "$ac_cv_header_OpenCL_opencl_h" = "yes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clGetPlatformInfo in -lOpenCL" >&5
$as_echo_n "checking for clGetPlatformInfo in -lOpenCL... " >&6; }
if test "${ac_cv_lib_OpenCL_clGetPlatformInfo+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lOpenCL $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char clGetPlatformInfo ();
int
main ()
{
return clGetPlatformInfo ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_OpenCL_clGetPlatformInfo=yes
else
ac_cv_lib_OpenCL_clGetPlatformInfo=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_clGetPlatformInfo" >&5
$as_echo "$ac_cv_lib_OpenCL_clGetPlatformInfo" >&6; }
if test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" = x""yes; then :
LIBOPENCL="-lOpenCL"
fi
fi
if test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes; then :
case "x$with_opencl" in
x) as_fn_append wine_notices "|OpenCL ${notice_platform}development files not found, OpenCL won't be supported." ;;
xno) ;;
*) as_fn_error $? "OpenCL ${notice_platform}development files not found, OpenCL won't be supported.
This is an error since --with-opencl was requested." "$LINENO" 5 ;;
esac
fi
test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes && enable_opencl=${enable_opencl:-no}
XML2LIBS=""
@ -15056,6 +15121,7 @@ wine_fn_config_dll olesvr.dll16 enable_win16
wine_fn_config_dll olesvr32 enable_olesvr32 olesvr32
wine_fn_config_dll olethk32 enable_olethk32
wine_fn_config_dll openal32 enable_openal32
wine_fn_config_dll opencl enable_opencl
wine_fn_config_dll opengl32 enable_opengl32 opengl32
wine_fn_config_test dlls/opengl32/tests opengl32_test
wine_fn_config_dll pdh enable_pdh pdh

View File

@ -70,6 +70,8 @@ AC_ARG_WITH(nas, AS_HELP_STRING([--without-nas],[do not use the NAS sound
[if test "x$withval" = "xno"; then ac_cv_header_audio_audiolib_h=no; fi])
AC_ARG_WITH(openal, AS_HELP_STRING([--without-openal],[do not use OpenAL]),
[if test "x$withval" = "xno"; then ac_cv_header_AL_al_h=no; ac_cv_header_OpenAL_al_h=no; fi])
AC_ARG_WITH(opencl, AS_HELP_STRING([--without-opencl],[do not use OpenCL]),
[if test "x$withval" = "xno"; then ac_cv_header_CL_opencl_h=no; ac_cv_header_OpenCL_opencl_h=no; fi])
AC_ARG_WITH(opengl, AS_HELP_STRING([--without-opengl],[do not use OpenGL]))
AC_ARG_WITH(openssl, AS_HELP_STRING([--without-openssl],[do not use OpenSSL]),
[if test "x$withval" = "xno"; then ac_cv_header_openssl_err_h=no; ac_cv_header_openssl_ssl_h=no; fi])
@ -370,12 +372,14 @@ AC_CHECK_HEADERS(\
AL/al.h \
AudioToolbox/AudioConverter.h \
AudioUnit/AudioUnit.h \
CL/opencl.h \
Carbon/Carbon.h \
CoreAudio/CoreAudio.h \
DiskArbitration/DiskArbitration.h \
IOKit/IOKitLib.h \
IOKit/hid/IOHIDLib.h \
OpenAL/al.h \
OpenCL/opencl.h \
alias.h \
alsa/asoundlib.h \
arpa/inet.h \
@ -1097,6 +1101,15 @@ WINE_ERROR_WITH(x,[test "x$XLIB" = "x"],[X ${notice_platform}development files n
without X support, which probably isn't what you want. You will need
to install ${notice_platform}development packages of Xlib/Xfree86 at the very least.])
dnl **** Check for OpenCL ****
if test "$ac_cv_header_CL_opencl_h" = "yes" -o "$ac_cv_header_OpenCL_opencl_h" = "yes"
then
AC_CHECK_LIB(OpenCL,clGetPlatformInfo,[AC_SUBST(LIBOPENCL,["-lOpenCL"])])
fi
WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes],
[OpenCL ${notice_platform}development files not found, OpenCL won't be supported.])
test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes && enable_opencl=${enable_opencl:-no}
dnl **** Check for libxml2 ****
AC_SUBST(XML2LIBS,"")
@ -2633,6 +2646,7 @@ WINE_CONFIG_DLL(olesvr.dll16,enable_win16)
WINE_CONFIG_DLL(olesvr32,,[olesvr32])
WINE_CONFIG_DLL(olethk32)
WINE_CONFIG_DLL(openal32)
WINE_CONFIG_DLL(opencl)
WINE_CONFIG_DLL(opengl32,,[opengl32])
WINE_CONFIG_TEST(dlls/opengl32/tests)
WINE_CONFIG_DLL(pdh,,[pdh])

View File

@ -0,0 +1,7 @@
MODULE = opencl.dll
EXTRALIBS = @LIBOPENCL@
C_SRCS = \
opencl.c
@MAKE_DLL_RULES@

View File

@ -0,0 +1,30 @@
/*
* OpenCL.dll proxy for native OpenCL implementation.
*
* Copyright 2010 Peter Urbanec
*
* 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
*/
#include "config.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(opencl);
#if defined(HAVE_CL_OPENCL_H)
#include <CL/opencl.h>
#elif defined(HAVE_OPENCL_OPENCL_H)
#include <OpenCL/opencl.h>
#endif

View File

@ -0,0 +1,75 @@
# OpenCL 1.0
@ stub clBuildProgram
@ stub clCreateBuffer
@ stub clCreateCommandQueue
@ stub clCreateContext
@ stub clCreateContextFromType
@ stub clCreateFromGLBuffer
@ stub clCreateFromGLRenderbuffer
@ stub clCreateFromGLTexture2D
@ stub clCreateFromGLTexture3D
@ stub clCreateImage2D
@ stub clCreateImage3D
@ stub clCreateKernel
@ stub clCreateKernelsInProgram
@ stub clCreateProgramWithBinary
@ stub clCreateProgramWithSource
@ stub clCreateSampler
@ stub clEnqueueAcquireGLObjects
@ stub clEnqueueBarrier
@ stub clEnqueueCopyBuffer
@ stub clEnqueueCopyBufferToImage
@ stub clEnqueueCopyImage
@ stub clEnqueueCopyImageToBuffer
@ stub clEnqueueMapBuffer
@ stub clEnqueueMapImage
@ stub clEnqueueMarker
@ stub clEnqueueNDRangeKernel
@ stub clEnqueueNativeKernel
@ stub clEnqueueReadBuffer
@ stub clEnqueueReadImage
@ stub clEnqueueReleaseGLObjects
@ stub clEnqueueTask
@ stub clEnqueueUnmapMemObject
@ stub clEnqueueWaitForEvents
@ stub clEnqueueWriteBuffer
@ stub clEnqueueWriteImage
@ stub clFinish
@ stub clFlush
@ stub clGetCommandQueueInfo
@ stub clGetContextInfo
@ stub clGetDeviceIDs
@ stub clGetDeviceInfo
@ stub clGetEventInfo
@ stub clGetEventProfilingInfo
@ stub clGetExtensionFunctionAddress
@ stub clGetGLObjectInfo
@ stub clGetGLTextureInfo
@ stub clGetImageInfo
@ stub clGetKernelInfo
@ stub clGetKernelWorkGroupInfo
@ stub clGetMemObjectInfo
@ stub clGetPlatformIDs
@ stub clGetPlatformInfo
@ stub clGetProgramBuildInfo
@ stub clGetProgramInfo
@ stub clGetSamplerInfo
@ stub clGetSupportedImageFormats
@ stub clReleaseCommandQueue
@ stub clReleaseContext
@ stub clReleaseEvent
@ stub clReleaseKernel
@ stub clReleaseMemObject
@ stub clReleaseProgram
@ stub clReleaseSampler
@ stub clRetainCommandQueue
@ stub clRetainContext
@ stub clRetainEvent
@ stub clRetainKernel
@ stub clRetainMemObject
@ stub clRetainProgram
@ stub clRetainSampler
@ stub clSetCommandQueueProperty
@ stub clSetKernelArg
@ stub clUnloadCompiler
@ stub clWaitForEvents

View File

@ -54,6 +54,9 @@
/* Define to 1 if you have the `chsize' function. */
#undef HAVE_CHSIZE
/* Define to 1 if you have the <CL/opencl.h> header file. */
#undef HAVE_CL_OPENCL_H
/* Define to 1 if you have the <CoreAudio/CoreAudio.h> header file. */
#undef HAVE_COREAUDIO_COREAUDIO_H
@ -580,6 +583,9 @@
/* Define to 1 if you have the <OpenAL/al.h> header file. */
#undef HAVE_OPENAL_AL_H
/* Define to 1 if you have the <OpenCL/opencl.h> header file. */
#undef HAVE_OPENCL_OPENCL_H
/* Define if OpenGL is present on the system */
#undef HAVE_OPENGL