summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/opencl
Commit message (Collapse)AuthorAgeFilesLines
* st/clover: Add libelf cflags to the buildKoop Mast2016-02-291-3/+0
| | | | | | | | | | | | | Otherwise the build will fail, when the library is in a non default location. v2 [Emil Velikov] - drop the unneeded cflags from targets/opencl. Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Fixes: 7f585a6a98d "configure.ac: use pkg-config for libelf" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93524 Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* configure.ac: use pkg-config for libelfJonathan Gray2015-12-171-1/+4
| | | | | | | | | | | | | Use PKG_CHECK_MODULES to get the flags to link libelf v2: keep AC_CHECK_LIB as a fallback for elfutils provided libelf that doesn't install a pkg-config file. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* automake: fix some occurrences of hardcoded -ldl and -lpthreadJonathan Gray2015-12-011-1/+1
| | | | | | | | | Correct some occurrences of -ldl and -lpthread to use $(DLOPEN_LIBS) and $(PTHREAD_LIBS) respectively. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gallium: rename libpipe_loader to libpipe_loader_dynamicEmil Velikov2015-11-211-1/+1
| | | | | | | | | With the next commits we'll introduce a 'static' version, which will essentially load the statically linked-in pipe-drivers, rather than the standalone pipe-$foo.so ones. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
* pipe-loader: rework the sw backendEmil Velikov2015-11-211-1/+0
| | | | | | | | | | | | Move the winsys into the pipe-target, similar to the hardware pipe-driver. v2: - move int declaration outside of loop (Brian) - fold the teardown into a goto + separate function. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
* gallivm: Allow drivers and state trackers to initialize gallivm LLVM targets v2Tom Stellard2015-10-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drivers and state trackers that use LLVM for generating code, must register the targets they use with LLVM's global TargetRegistry. The TargetRegistry is not thread-safe, so all targets must be added to the registry before it can be queried for target information. When drivers and state trackers initialize their own targets, they need a way to force gallivm to initialize its targets at the same time. Otherwise, there can be a race condition in some multi-threaded applications (e.g. glx-multihreaded-shader-compile in piglit), when one thread creates a context for a driver that uses LLVM (e.g. radeonsi) and another thread creates a gallivm context (glxContextCreate does this). The race happens when the driver thread initializes its LLVM targets and then starts using the registry before the gallivm thread has a chance to register its targets. This patch allows users to force gallivm to register its targets by calling the gallivm_init_llvm_targets() function. v2: - Use call_once and remove mutexes and static initializations. - Replace gallivm_init_llvm_{begin,end}() with gallivm_init_llvm_targets(). Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> CC: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
* Add mesa.icd to the .gitignoreNeil Roberts2015-08-181-0/+1
| | | | | | Since 4d7e0fa8c731776 this file is generated by the configure script. Reviewed-by: Tapani Palli <tapani.palli@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
* opencl: use versioned .so in mesa.icdIgor Gnatenko2015-08-013-2/+2
| | | | | | | | | | | | We must have versioned library in mesa.icd, because ICD loader would fail if the mesa-devel package wasn't installed. Cc: "10.6" <mesa-stable@lists.freedesktop.org> Reported-by: Fabian Deutsch <fabian.deutsch@gmx.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73512 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Michel Dänzer <michel.daenzer@amd.com>
* automake: remove empty GALLIUM_PIPE_LOADER_LIBSEmil Velikov2015-07-131-1/+0
| | | | | | Cc: Rob Clark <robclark@freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* automake: pipe-loader: remove the 'client' pipe-loaderEmil Velikov2015-07-131-2/+2
| | | | | | | | | | Was only around as opencl's pipe-loader wanted to link against xcb in some cases. Cc: Rob Clark <robclark@freedesktop.org> Cc: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* mesa: Enable subdir-objects globally.Matt Turner2015-06-261-2/+0
| | | | Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gallium,clover: add OpenCL interoperability support for CL eventsMarek Olšák2015-04-301-0/+1
| | | | | | | | | | | v2: - move interop.cpp to clover/api - change intptr_t to void* in the interface - add a virtual function fence() to simplify some code v3: - use bool in the interface v4: - enclose the last two interop functions in try..catch Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* gallium/targets: Add *.sym files to distribution.Matt Turner2014-12-121-1/+1
| | | | And add d3dadapter9's extra dependency.
* targets: bundle all files in the tarballEmil Velikov2014-11-161-0/+2
| | | | | | | | | We were missing a few files - The version scripts - Android & scons build scripts - A few headers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* clover: Add support for compiling to native object code v3Tom Stellard2014-10-161-0/+1
| | | | | | | | | | | v2: - Split build_module_native() into three separate functions. - Code cleanups. v3: - More cleanups. Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* targets/clover: link against libmesautil.laJan Vesely2014-08-051-0/+1
| | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
* automake: include the libdeps in the correct orderEmil Velikov2014-06-191-2/+2
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80254 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* targets: use GALLIUM_PIPE_LOADER_WINSYS_LIB_DEPSEmil Velikov2014-06-191-14/+4
| | | | | | Drop ~50 lines of buildsystem mayhem. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* automake: correctly append the version-scriptEmil Velikov2014-05-251-3/+4
| | | | | | | | | | Turns out that the AC conditional did not include the the version-scripts as expected. Rather it truncated the remaining linker flags. Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Make DRI dependencies and build depend on the targetJon TURNEY2014-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't require xcb-dri[23] etc. if we aren't building for a target with DRM, as we won't be using dri[23] - Enable a more fine-grained control of what DRI code is built, so that a libGL using direct swrast can be built on targets which don't have DRM. The HAVE_DRI automake conditional is retired in favour of a number of other conditionals: HAVE_DRI2 enables building of code using the DRI2 interface (and possibly DRI3 with HAVE_DRI3) HAVE_DRISW enables building of DRI swrast HAVE_DRICOMMON enables building of target-independent DRI code, and also enables some makefile cases where a more detailled decision is made at a lower level. HAVE_APPLEDRI enables building of an Apple-specific direct rendering interface, still which requires additional fixing up to build properly. v2: Place xfont.c and drisw_glx.c into correct categories. Update 'make check' as well Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* Fix build for darwinJon TURNEY2014-05-231-0/+2
| | | | | | | | | | | | | | | | | | | Fix build for darwin, when ./configured --disable-driglx-direct - darwin ld doesn't support -Bsymbolic or --version-script, so check if ld supports those options before using them - define GLX_ALIAS_UNSUPPORTED as config/darwin used to, as aliasing of non-weak symbols isn't supported - default to -with-dri-drivers=swrast v2: Use -Wl,-Bsymbolic, as before, not -Bsymbolic Test that ld --version-script works, rather than just looking for it in ld --help Don't use -Wl,--no-undefined on darwin, either Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* targets/opencl: hide all the exported llvm/clang mayhem... hopefullyEmil Velikov2014-05-022-0/+7
| | | | | | | | | | Both llvm and clang polute the exported symbol table, as soon as we try to link with either one. Other than those two everything else looks good (clean). Cc: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* automake: cleanup pipe-loader handling when using sw/xlib winsysEmil Velikov2014-04-251-1/+1
| | | | | | | Rather than defining our own set of variables, use NEED_WINSYS_XLIB and based on it include the sw/xlib winsys. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* automake: don't enable -Wl,--no-undefined on OpenBSDJonathan Gray2014-04-051-1/+1
| | | | | | | | | | | | | | | | OpenBSD does not have DT_NEEDED entries for libc by design, over concerns how the symbols would be referenced after changing the major version of the library. So avoid -no-undefined checks on OpenBSD as they will fail. v2: don't include the -no-undefined libtool option in the variable and change -Wl,--no-undefined references in Automake.inc as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76856 Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* automake: ask the linker to do garbage collectionEmil Velikov2014-03-311-0/+1
| | | | | | | | | | | | | | By doing GC the linker removes all the symbols that are not referenced and/or used by the final library. This results in a saving of ~100K up-to ~600K per (stripped) binary (classic vs gallium drivers). If interested one can ask the compiler to print the sections that are removed using -Wl,--print-gc-sections. v2: Check if ld supports the flag before using it. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com> (v1)
* automake: add -Wl,--no-undefined to all librariesEmil Velikov2014-03-311-1/+3
| | | | | | | | | ... apart from the dri drivers. With this final change we can build mesa without fear that the resulting libraries will have unresolved symbols. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* gallium/targets: explicitly include a dummy.cpp and remove all the LINK mayhemEmil Velikov2014-03-311-2/+1
| | | | | | | | | | | | | | | Explicitly setting the linker variable was required for old and broken build toolchains. At this point this should no longer be needed, and setting the sources lists will trigger generation of the correct LINK variables. Explicitly include dummy.cpp to use g++ to link the static library which in most cases is based upon C++ code. v2: Reword commit message. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* gallium/targets: use install-gallium-targets.mkEmil Velikov2014-03-111-5/+1
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* targets/opencl: resolve undefined symbols at link timeEmil Velikov2014-02-241-0/+1
| | | | | | | | Current automake build does not try to resolve undefined symbols thus we could end up with a broken library. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* gallium/targets: resolve undefined reference to pipe_loader_sw_probe_driEmil Velikov2014-02-241-0/+5
| | | | | | | | | | | | | With the introduction of the pipe_loader_sw_probe_dri helper we require the sw/dri winsys during linking stage despite it being unused by any of the targets. This will cause a minor increase in the resulting library which will be cleaned up via linker options with upcoming patches. v2: Link with libswdri.la only when available. Reported-and-tested-by: Tom Stellard <thomas.stellard@amd.com> (v1) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* pipe-loader: wrap pipe_loader_sw_probe_xlib within HAVE_PIPE_LOADER_XLIBEmil Velikov2014-02-241-0/+7
| | | | | | | | | | | | | | | | | | | The above function implies using the the xlib winsys, which has additional library dependencies that should not be forced. Make the software xlib pipe loader optional thus avoid all the dependency hell. A user that wishes to use the particular pipe-loader would need to set the following within configure.ac. enable_gallium_xlib_loader=yes v2: - Wrap sw/xlib/xlib_sw_winsys.h to handle compilation on systems lacking X11 headers. Spotted by Christian Prochaska. Tested-by: Tom Stellard <thomas.stellard@amd.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75356 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* pipe-loader: split out "client" versionRob Clark2014-02-161-2/+2
| | | | | | | | Build two versions of pipe-loader, with only the client version linking in x11 client side dependencies. This will allow the XA state tracker to use pipe-loader. Signed-off-by: Rob Clark <robclark@freedesktop.org>
* opencl: do not link against libudevEmil Velikov2014-02-111-1/+1
| | | | | | | Previously the linking was required due to dependency of udev in the pipe-loader. Now this is no longer the case, as we dlopen the library. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* clover: Implement support for the ICD extension.Francisco Jerez2013-10-212-0/+6
| | | | Tested-by: Tom Stellard <thomas.stellard@amd.com>
* clover: Prepare the build system for ICD support.Tom Stellard2013-10-211-8/+7
| | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* build: Remove libpipe_loader.la from GALLIUM_PIPE_LOADER_LIBS.Matt Turner2013-04-301-0/+1
| | | | | | Tested-by: Tom Stellard <thomas.stellard@amd.com> Tested-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* build: Remove libws_null.la from GALLIUM_PIPE_LOADER_LIBS.Matt Turner2013-04-301-0/+1
| | | | | | Tested-by: Tom Stellard <thomas.stellard@amd.com> Tested-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* build: Build pipe-loader before gallium testsMatt Turner2013-04-151-3/+0
| | | | | | | | | And don't build it from other Makefiles. That's awful, and breaks distclean. Tested-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* pipe-loader: Fix out of source buildNiels Ole Salscheider2013-04-101-2/+2
| | | | Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
* clover: Fix build with LLVM 3.3 v2Tom Stellard2013-02-281-1/+1
| | | | | | | | v2: - Fix order that the clang libraries are passed to the linker to avoid missing symbol errors. Acked-by: Francisco Jerez <currojerez@riseup.net>
* Revert "Revert "targets/opencl: Link against libgallium.la instead of ↵Tom Stellard2013-01-241-3/+1
| | | | | | | | | libgallium.a"" This reverts commit 7824ab807050c03c6df01c44774914dcbef88248. Now that we force linking with LLVM shared libs when building clover, we can link against libgallium.la with no problems.
* Revert "targets/opencl: Link against libgallium.la instead of libgallium.a"Tom Stellard2013-01-151-1/+3
| | | | | | | | | | | | | | | This reverts commit 4148a29ed83d1d85bff3d4e40e847128011c3f20. This is a work-around for bug: https://bugs.freedesktop.org/show_bug.cgi?id=59334 We really should be linking against libgallium.la instead of libgallium.a, but until we can figure why linking against libgallium.la causes runtime failures in clover we will continue to link against libgallium.a Acked-by: Andreas Boll <andreas.boll.dev@gmail.com> Tested-by: Aaron Watry <awatry@gmail.com>
* Remove hacks for static MakefilesMatt Turner2013-01-131-4/+0
| | | | | | | | | | | v2: Andreas Boll <andreas.boll.dev@gmail.com> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <andreas.boll.dev@gmail.com> - remove more obsolete hacks v4: Andreas Boll <andreas.boll.dev@gmail.com> - add a previously removed TOP variable to fix vgapi build
* targets/opencl: Link against libgallium.la instead of libgallium.aTom Stellard2013-01-111-1/+1
|
* Clean up .gitignore filesMatt Turner2013-01-101-1/+0
|
* targets/pipe-loader: Convert to automakeMatt Turner2013-01-101-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++ linking (controlled by the nodist_EXTRA idiom) is needed unconditionally for: nouveau (uses C++ in the driver) r300 (since LLVM is always required) radeonsi (since LLVM is always required) swrast (if builting LLVM pipe) and conditionally (depends whether LLVM is enabled) for i915 r600 vmwgfx and never needed for swrast (softpipe). Unfortunately, automake seems to *always* link with C++ if nodist_EXTRA is specified, even inside a false conditional. Not sure if this is a bug, but it does seem to be weird behavior. v2: Johannes Obermayr <johannesobermayr@gmx.de> - Fix some undefined symbols. v3: Johannes Obermayr <johannesobermayr@gmx.de> - Install pipe_* to $(libdir)/gallium-pipe. v4: Johannes Obermayr <johannesobermayr@gmx.de> - Build it only once on --enable-gallium-gbm / --enable-opencl.
* clover: Don't link against libclangRewriteTom Stellard2012-10-111-1/+0
| | | | | | | This library does not exist in LLVM 3.2 and libOpenCL.so links fine without it on LLVM 3.1 Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* clover: Fix build with LLVM libs installed to non-standard directoriesAlexey Shvetsov2012-06-151-0/+1
| | | | | | Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
* clover: Link to the necessary LLVM and Clang libsTom Stellard2012-06-011-1/+17
|
* Add .gitignore files for recently-added gallium projectsPaul Berry2012-05-151-0/+1
| | | | | | | This patch adds .gitignore files to ignore the makefiles generated by the gallium pipe loader and the clover OpenCL state tracker. Reviewed-by: Francisco Jerez <currojerez@riseup.net>