[PATCH 1/2] opencl: Initial stub implementation of OpenCL 1.0

Peter Urbanec peter at urbanec.net
Mon Nov 29 05:08:52 CST 2010


diff --git a/configure.ac b/configure.ac
index de1ba7d..933deff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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_cl_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])
@@ -382,6 +384,7 @@ AC_CHECK_HEADERS(\
  	arpa/nameser.h \
  	asm/types.h \
  	capi20.h \
+	CL/opencl.h \
  	curses.h \
  	direct.h \
  	dirent.h \
@@ -1609,6 +1612,15 @@ WINE_NOTICE_WITH(openal,[test 
"x$ac_cv_lib_openal" != xyes],
                   [libopenal ${notice_platform}development files not 
found (or too old), OpenAL won't be supported.])
  test "x$ac_cv_lib_openal" = xyes || enable_openal32=${enable_openal32:-no}
  +dnl **** Check for OpenCL ****
+if test "$ac_cv_header_CL_opencl_h" = "yes"
+then
+    WINE_CHECK_SONAME(OpenCL,clGetPlatformInfo,[AC_DEFINE(HAVE_OPENCL, 
1, [Define if you have OpenCL])])
+fi
+WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_soname_OpenCL" = "x"],
+                 [OpenCL ${notice_platform}development files not found, 
OpenCL won't be supported.])
+test "x$ac_cv_lib_soname_OpenCL" != "x" || 
enable_opencl=${enable_opencl:-no}
+
  dnl **** Check for libkstat ****
  if test "$ac_cv_header_kstat_h" = "yes"
  then
@@ -2632,6 +2644,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,,[opencl])
  WINE_CONFIG_DLL(opengl32,,[opengl32])
  WINE_CONFIG_TEST(dlls/opengl32/tests)
  WINE_CONFIG_DLL(pdh,,[pdh])
diff --git a/dlls/opencl/Makefile.in b/dlls/opencl/Makefile.in
new file mode 100644
index 0000000..4a596c7
--- /dev/null
+++ b/dlls/opencl/Makefile.in
@@ -0,0 +1,6 @@
+MODULE    = opencl.dll
+
+C_SRCS = \
+	opencl.c
+
+ at MAKE_DLL_RULES@
diff --git a/dlls/opencl/opencl.c b/dlls/opencl/opencl.c
new file mode 100644
index 0000000..ef316f7
--- /dev/null
+++ b/dlls/opencl/opencl.c
@@ -0,0 +1,29 @@
+/*
+ * 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);
+
+#ifdef HAVE_OPENCL
+#include <CL/opencl.h>
+
+#endif /* HAVE_OPENCL */
diff --git a/dlls/opencl/opencl.spec b/dlls/opencl/opencl.spec
new file mode 100644
index 0000000..46c972a
--- /dev/null
+++ b/dlls/opencl/opencl.spec
@@ -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




More information about the wine-patches mailing list