[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#717500: mesa: Please add support for OpenCL/GalliumCompute



Hi Julien,

> > @@ -749,6 +751,36 @@ Description: Developer documentation for Mesa
> >   extensions, the complete set of release notes and the development
> > header files common to all Mesa packages.
> >  
> > +Package: libopencl1-mesa
> > +Section: libs
> > +Architecture: linux-any
> > +Provides: libopencl1
> > +Depends:
> > + libclc-r600,
> 
> That looks like a no-go to me.  I don't want a runtime lib depending
> on -dev packages (libclc-r600 appears to pull in libclc-dev and
> libclang-foo-dev).  How does that stuff all work?
it may look like a no-go but it is intentional since libclc-r600
contains LLVM IR bitcode, which has to be compiled as soon, as you want
to execute an OpenCL program. For that the headers in libclc-dev and
the files from libclang-common-3.3-dev are needed.

> > diff --git a/debian/libopencl1-mesa.install.in
> > b/debian/libopencl1-mesa.install.in new file mode 100644
> > index 0000000..867081c
> > --- /dev/null
> > +++ b/debian/libopencl1-mesa.install.in
> > @@ -0,0 +1,2 @@
> > +dri/etc/OpenCL/vendors/mesa.icd etc/OpenCL/vendors
> 
> Why does that belong in /etc?  It doesn't smell like something users
> should need to configure.
It belongs there, because the ICD loader looks for the *.icd config
files under /etc/OpenCL/vendors. Other packages (e.g. amd-opencl-icd,
beignet, ...) put their *.icd files in to that directory too.

By the way: I realized, that the patch could not be applied to the
current mesa packaging and had a "dri/" in front of the new entries in
"debian/not-installed" missing, sorry for that. The attached patch
works.


Cheers,
Julian
From c50089a67bb3fd68fd6d22221ee128c77bc81782 Mon Sep 17 00:00:00 2001
From: Julian Wollrath <jwollrath@web.de>
Date: Tue, 20 Aug 2013 15:34:40 -0400
Subject: [PATCH] Add OpenCL support

---
 debian/control                    | 31 +++++++++++++++++++++++++++++++
 debian/libopencl1-mesa.install.in |  2 ++
 debian/not-installed              |  7 +++++++
 debian/rules                      |  1 +
 5 files changed, 42 insertions(+)
 create mode 100644 debian/libopencl1-mesa.install.in

diff --git a/debian/control b/debian/control
index d0631eb..99035d5 100644
--- a/debian/control
+++ b/debian/control
@@ -33,6 +33,8 @@ Build-Depends:
  llvm-3.3-dev (>= 1:3.3-4) [amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf],
  libelf-dev [amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf],
  libwayland-dev (>= 1.0.2) [linux-any],
+ libclang-3.3-dev [linux-any],
+ libclc-dev [linux-any],
 Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/mesa
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/mesa.git
 Homepage: http://mesa3d.sourceforge.net/
@@ -749,6 +751,35 @@ Description: Developer documentation for Mesa
  extensions, the complete set of release notes and the development header
  files common to all Mesa packages.
 
+Package: libopencl1-mesa
+Section: libs
+Architecture: linux-any
+Depends:
+ libclc-r600,
+ ocl-icd-libopencl1,
+ ${shlibs:Depends},
+ ${misc:Depends},
+Description: free implementation of the OpenCL API -- ICD runtime
+ This package contains the mesa implementation of the OpenCL (Open Compute
+ Language) library, which is intended for use with an ICD loader. OpenCL
+ provides a standardized interface for computational analysis on graphical
+ processing units.
+
+Package: libopencl1-mesa-dbg
+Section: debug
+Architecture: linux-any
+Depends:
+ libopencl1-mesa (= ${binary:Version}),
+ ${shlibs:Depends},
+ ${misc:Depends},
+Description: free implementation of the OpenCL API -- debugging symbols
+ This package contains the mesa implementation of the OpenCL (Open Compute
+ Language) library, which is intended for use with an ICD loader. OpenCL
+ provides a standardized interface for computational analysis on graphical
+ processing units.
+ .
+ This package contains the debugging symbols for the mesa OpenCL ICD library.
+
 Package: libosmesa6
 Section: libs
 Architecture: any
diff --git a/debian/libopencl1-mesa.install.in b/debian/libopencl1-mesa.install.in
new file mode 100644
index 0000000..867081c
--- /dev/null
+++ b/debian/libopencl1-mesa.install.in
@@ -0,0 +1,2 @@
+dri/etc/OpenCL/vendors/mesa.icd etc/OpenCL/vendors
+dri/usr/lib/${DEB_HOST_MULTIARCH}/libMesaOpenCL* usr/lib/${DEB_HOST_MULTIARCH}
diff --git a/debian/not-installed b/debian/not-installed
index 03e3006..3d62725 100644
--- a/debian/not-installed
+++ b/debian/not-installed
@@ -2,6 +2,13 @@
 
 # Common list:
 NOT_INSTALLED := \
+	dri/usr/include/CL/cl.h \
+	dri/usr/include/CL/cl_ext.h \
+	dri/usr/include/CL/cl_gl.h \
+	dri/usr/include/CL/cl_gl_ext.h \
+	dri/usr/include/CL/cl_platform.h \
+	dri/usr/include/CL/opencl.h \
+	dri/usr/include/CL/cl.hpp \
 	dri/usr/include/GL/wglext.h \
 	dri/usr/include/GL/wmesa.h \
 	usr/include/GL/glext.h \
diff --git a/debian/rules b/debian/rules
index 696678d..50ecfa3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -109,6 +109,7 @@ confflags-dri = \
 	--with-dri-drivers="$(DRI_DRIVERS)" \
 	--with-dri-driverdir=/usr/lib/$(DEB_HOST_MULTIARCH)/dri \
 	--with-dri-searchpath='/usr/lib/$(DEB_HOST_MULTIARCH)/dri:\$$$${ORIGIN}/dri:/usr/lib/dri' \
+	--enable-opencl --enable-opencl-icd \
 	--enable-osmesa \
 	--enable-glx-tls \
 	--enable-shared-glapi \
-- 
1.8.4.rc3

Attachment: signature.asc
Description: PGP signature


Reply to: