summaryrefslogtreecommitdiff
path: root/src/gallium/targets
AgeCommit message (Collapse)AuthorFilesLines
2016-06-13st/va: hardlink driver instances to gallium_drv_video.soJimmy Berry1-0/+14
Removes the need to set LIBVA_DRIVER_NAME=gallium for supported targets and is consistent with vdpau and general gallium drivers. Note: some versions of libva can detect the gallium name and use the backend. Although that behaviour seems inconsistent since it only works for some platforms/backends. Cc: "12.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-06-13Android: move libdrm settings to top-level Android.common.mkRob Herring1-5/+0
Fix warnings like these due to HAVE_LIBDRM being inconsistently defined: external/libdrm/include/drm/drm.h:839:30: warning: redefinition of typedef 'drm_clip_rect_t' is a C11 feature [-Wtypedef-redefinition] typedef struct drm_clip_rect drm_clip_rect_t; HAVE_LIBDRM needs to be set project wide to fix this. This change also harmlessly links libdrm with everything, but simplifies the makefiles a bit. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Emil Velikov <emil.velikov@collabora.com>
2016-05-25scons: whitespace cleanupGiuseppe Bilotta1-1/+1
This text transformation was done automatically via the following shell command: $ find -name SCons\* -exec sed -i s/\\s\\+$// '{}' \; Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-18st/nine: Turn on thread_submit by default when on different deviceAxel Davy1-10/+12
The last remaining issues with thread_submit have been resolved, thus turn it when on a different device (the case where is is beneficial). Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18d3dadapter9: Add ddebug, rbug and trace supportAxel Davy1-0/+9
Add support for ddebug, rbug and trace Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-17Treewide: Remove Elements() macroJan Vesely2-4/+4
Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-17scons: gallium: link against nir as neededEmil Velikov5-1/+5
... otherwise we'll produce uncomplete binaries with introduction of NIR as alternative IR with next commits. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-04-15gallium/swr: allow swr use as a swrast dri driverTim Rowley2-5/+15
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-04-13scons: Allow building with Address Sanitizer.Jose Fonseca1-4/+8
libasan is never linked to shared objects (which doesn't go well with -z,defs). It must either be linked to the main executable, or (more practically for OpenGL drivers) be pre-loaded via LD_PRELOAD. Otherwise works. I didn't find anything with llvmpipe. I suspect the fact that the JIT compiled code isn't instrumented means there are lots of errors it can't catch. But for non-JIT drivers, the Address/Leak Sanitizers seem like a faster alternative to Valgrind. Usage (Ubuntu 15.10): scons asan=1 libgl-xlib export LD_LIBRARY_PATH=$PWD/build/linux-x86_64-debug/gallium/targets/libgl-xlib LD_PRELOAD=libasan.so.2 any-opengl-application Acked-by: Roland Scheidegger <sroland@vmware.com>
2016-03-02mesa/build: add OpenSWR to buildTim Rowley2-0/+11
Tested on Linux (centos, ubuntu, and suse variants) Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-02-29st/clover: Add libelf cflags to the buildKoop Mast1-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>
2016-02-29Android: clean-up and fix DRI module path handlingRob Herring1-1/+2
MESA_DRI_MODULE_PATH is only getting set for classic DRI drivers and may or may not be set correctly for gallium_dri.so depending on the makefile include ordering. For Android 6 and earlier it is fine, but with build system changes in AOSP master, it is not. Move the path variables to a single place at the top level and introduce MESA_DRI_MODULE_REL_PATH for Android 5 and later which require relative paths. With this, there is a single variable to change. Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-02-29Android: fix build break from nir/glsl move to compiler/Rob Herring1-0/+2
Commits a39a8fbbaa12 ("nir: move to compiler/") and eb63640c1d38 ("glsl: move to compiler/") broke Android builds. Fix them. There is also a missing dependency between generated NIR headers and several libraries. This isn't a new issue, but seems to have been exposed by the NIR move. Built with i915, i965, freedreno, r300g, r600g, vc4, and virgl enabled. Cc: "11.2" <mesa-stable@lists.freedesktop.org> Cc: Mauro Rossi <issor.oruam@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-02-08gallium/util: switch over to new u_debug_image.[ch] codeBrian Paul1-0/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-02-04DRI_CONFIG: Add option to override vendor idPatrick Rudolph1-13/+48
Add config option override_vendorid to report a fake card in d3dadapter9 drm. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-02-02virgl: also build vtest for AndroidRob Herring1-1/+1
Enabling swrast on Android causes a link error because vtest is missing. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-26nir: move to compiler/Emil Velikov2-2/+2
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-01-26nir: move shader_enums.[ch] to compilerEmil Velikov5-1/+5
This way one can reuse it in glsl, nir or other infrastructure without pulling nir as dependency. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-01-23virgl: enable building on AndroidRob Herring1-0/+4
This is just a copy-n-paste and rename of vc4 Android makefiles. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-22targets/dri: android: use WHOLE static librariesEmil Velikov1-1/+3
By using whole static libraries the android buildsystem provides whole-archive (alike) solution. This means that we don't need to worry about the order of the static libraries and any reverse, recursive or circular dependencies that they have between one another. Without this the linker will discard any unused hunks of one library and we'll end up with unresolved symbols as those are required by another static library. This issue has become more prominent with the introduction of pipe-loader. Whole static libraries has been used in i915/i965 for a very long time, so we might do the same. v2: - Better commit message (Ilia) - Keep external dependencies as [normal] static libs (Mauro) Cc: mesa-stable@lists.freedesktop.org Cc: Mauro Rossi <issor.oruam@gmail.com> Reported-by: Mauro Rossi <issor.oruam@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-01-05build: enable st/va with nouveau driverJulien Isorce1-0/+2
vainfo fails in vaDriverInit because "dd_create_screen" does not reach strcmp(driver_name, "nouveau") code. Indeed when compiling the va target.c, the macro GALLIUM_NOUVEAU is not defined. This patch define the macro the same it is done for dri and vdpau targets. Tested with: ./autogen.sh --enable-glx --enable-gles2 --enable-egl --enable-vdpau --enable-glx-tls=yes --enable-va --with-gallium-drivers=swrast,nouveau --with-dri-drivers=swrast,nouveau --with-egl-platforms=x11 LIBVA_DRIVER_NAME=gallium vainfo Output: vainfo: Driver version: mesa gallium vaapi vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG4Simple : VAEntrypointVLD VAProfileMPEG4AdvancedSimple : VAEntrypointVLD VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileH264Baseline : VAEntrypointVLD VAProfileH264Main : VAEntrypointVLD VAProfileH264High : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-12-17configure.ac: use pkg-config for libelfJonathan Gray1-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>
2015-12-01automake: fix some occurrences of hardcoded -ldl and -lpthreadJonathan Gray1-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>
2015-11-27scons: Use LD version script for libgl-xlib.Jose Fonseca1-2/+6
Trivial.
2015-11-26targets/xvmc: use the non-inline sw helpersMichel Dänzer1-0/+1
This was missed in commit 59cfb21d ("targets: use the non-inline sw helpers"). Fixes build failure: CXXLD libXvMCgallium.la ../../../../src/gallium/auxiliary/pipe-loader/.libs/libpipe_loader_static.a(libpipe_loader_static_la-pipe_loader_sw.o):(.data.rel.ro+0x0): undefined reference to `sw_screen_create' collect2: error: ld returned 1 exit status Makefile:756: recipe for target 'libXvMCgallium.la' failed make[3]: *** [libXvMCgallium.la] Error 1 Trivial.
2015-11-25targets/nine: remove freedreno targetEmil Velikov1-3/+0
Analogous to previous commit. As we no longer have anyone who uses NIR we can drop the link. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robdclark@gmail.com>
2015-11-25targets/nine: remove vc4 targetEmil Velikov1-2/+0
There are no users for it. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-11-25targets: use the non-inline sw helpersEmil Velikov6-0/+6
Previously (with the inline ones) things were embedded into the pipe-loader, which means that we cannot control/select what we want in each target. That also meant that at runtime we ended up with the empty sw_screen_create() as the GALLIUM_SOFTPIPE/LLVMPIPE were not set. v2: Cover all the targets, not just dri. Cc: "11.1" <mesa-stable@lists.freedesktop.org> Cc: Ilia Mirkin <imirkin@alum.mit.edu> Cc: Edward O'Callaghan <edward.ocallaghan@koparo.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Oded Gabbay <oded.gabbay@gmail.com> Tested-by: Nick Sarnie <commendsarnex@gmail.com>
2015-11-21targets/nine: remove unused static functionsEmil Velikov1-36/+0
Dead code since commit 8f50614910c40366d94964fe2c5da5772aff2f96 Cc: Axel Davy <axel.davy@ens.fr> Cc: Tiziano Bacocco <tizbac2@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21targets/nine: add note about messy header inclusion orderEmil Velikov1-0/+1
Cc: Axel Davy <axel.davy@ens.fr> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21targets/nine: add note about fd owndershipEmil Velikov1-0/+2
v2: - move autotools hunk into correct patch - correct the note based on Axel's feedback Cc: Axel Davy <axel.davy@ens.fr> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21{st,targets}/nine: use static/dynamic pipe-loaderEmil Velikov2-30/+8
Analogous to previous commits. v2: add the missing winsys libs linkage Cc: Axel Davy <axel.davy@ens.fr> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21{st,targets}/xa: use static/dynamic pipe-loaderEmil Velikov2-3/+6
Analogous to previous commits. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21{auxiliary,targets}/vl: use static/dynamic pipe-loaderEmil Velikov8-12/+24
Analogous to previous commit. v2: rebase on top of vl_winsys_drm.c addition Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21{st,targets}/dri: use static/dynamic pipe-loaderEmil Velikov4-4/+8
Covert DRI to use only the pipe-loader interface. With drisw_create_screen and kms_swrast_create_screen replaced by their pipe-loader equivalent, we can now drop them. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21target-helpers: move the DRI specifics to the targetEmil Velikov4-3/+163
Rather than having all targets include the file, with only some defining the relevant guard macro, just move things where they are used. v2: rebase on top of virgl support. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21gallium: rename libpipe_loader to libpipe_loader_dynamicEmil Velikov8-8/+8
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>
2015-11-21pipe-loader: rework the sw backendEmil Velikov11-17/+46
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>
2015-11-21gallium: remove library_path argument from pipe_loader_create_screen()Emil Velikov2-7/+2
Currently the location is determined at configure/build time and consistently copied across gallium. Just remove the extra argument, and use PIPE_SEARCH_DIR where appropriate. This will allow us to remove the duplication in the *configuration and *screen_create APIs by moving util_dl_get_proc_address() and friends to probe time. v2: rebase on top of vl_winsys_drm.c addition Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21targets/nine: remove the custom pipe-driver path managementEmil Velikov1-18/+2
Since the up-streaming of nine, the static target was used by default. The dynamic pipe-drivers being available only via manual tweak of configure.ac. As we'll be removing the library_path argument from the pipe-loader with follow-up commits, we can remove D3D9_DRIVERS_PATH/D3D9_DRIVERS_DIR. Everyone doing local hacking on nine, or wishing to have a env override can bring them back within the pipe-loader. Cc: Axel Davy <axel.davy@ens.fr> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21targets/nine: use the existing sw_screen_wrap() over our custom versionEmil Velikov2-3/+2
Cc: Axel Davy <axel.davy@ens.fr> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-11-21automake: use GALLIUM_PIPE_LOADER_DEFINES only where applicableEmil Velikov1-2/+1
As of last commit we no longer need the defines in order to have the function prototypes. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
2015-10-23virgl: add driver for virtio-gpu 3D (v2)Dave Airlie1-0/+2
virgl is the 3D acceleration backend for the virtio-gpu shipping with qemu. The 3D acceleration is designed around gallium and TGSI as the virtualisation layer. The backend renderer translates the virgl interface into OpenGL currently. This is the initial import of the driver to mesa. The kernel driver portions are lined up for drm-next. Currently this driver supports up to GL3.3 and some misc extensions if the host driver exposes it. It is planned to iterate the virgl API to new GL levels as mesa host drivers gain features. v2: fix resource tracking across flushes to avoid ->bind hack in mapping. consolidate mapping and waiting code for transfers. use u_range for dirt tracking. handle larger shaders in protocol. include virtgpu_drm.h in mesa for now. add translation layer for gallium tgsi to virgl tgsi. Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-10-21osmesa: Expose GL entry points for Windows build via DEF file.Nigel Stewart2-0/+674
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92437 CC: "10.6 11.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
2015-10-19scons: Build nir/glsl_types.cpp once.Jose Fonseca6-27/+2
Undoes early hacks, and ensures nir/glsl_types.cpp is built once, and only once. The root problem is that SCons doesn't know about NIR nor any source file in the NIR_FILES source list. Tested with libgl-gdi and libgl-xlib scons targets. Reviewed-by: Brian Paul <brianp@vmware.com>
2015-10-17scons: fix MSVC, MinGW buildBrian Paul4-2/+21
Duplicate the glsl_types_hack.cpp work-around from the libgl-xlib target.
2015-10-16glsl: (mostly) remove libglsl_utilRob Clark3-3/+0
Now that NIR does not depend on glsl, we can (mostly[*]) get rid of the libglsl_util hack. [*] glsl_compiler is the one remaining user of libglsl_util Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-10-16nir: remove dependency on glslRob Clark2-0/+6
Move glsl_types into NIR, now that the dependency on glsl_symbol_table has been split out. Possibly makes sense to rename things at this point, but if we do that I'd like to keep it split out into a separate patch to make git history easier to follow (IMHO). v2: fix android build v3: I f***ing hate scons.. but at least it builds Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-10-02gallivm: Allow drivers and state trackers to initialize gallivm LLVM targets v2Tom Stellard1-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>
2015-09-16freedreno: one screen to rule them allRob Clark1-0/+1
Similar to fee0686c21c631d96d6042741267a3c218c23ffc, but in this case to ensure that drm_gralloc and libGLES_mesa are sharing a single screen. Bumps libdrm_freedreno version dependency, as it requires the new fd_device_fd() API. Signed-off-by: Rob Clark <robclark@freedesktop.org>