summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
Commit message (Collapse)AuthorAgeFilesLines
* android: fix building errors on Android 7.0Chih-Wei Huang2016-11-011-7/+1
|
* android: support swrastWuZhen2016-11-011-2/+6
| | | | | | | | | | System boots up with gles_mesa/softpipe/llvmpipe. NO_REF_TASK Tested: local run Change-Id: I629ed0ca9fad12e32270eb8e8bfa9f7681b68474 Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
* android: print debug info to logcatWuZhen2016-11-011-0/+1
| | | | | | | | | | Redirect logs printed to stderr to logcat. NO_REF_TASK Tested: local run Change-Id: I58e3966a608af361b86c54b4c95a92561b711968 Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
* gallium: introduce load_pipe_screen()Rob Herring2016-11-011-0/+1
| | | | | | | | | | | | Introduce load_pipe_screen() public entry point for other code which dlopen()'s gralloc_dri.so for purposes of loading a pipe_screen. This way drm_gralloc can avoid static linking of each gallium winsys and driver, and avoid duplicated logic to figure out which pipe driver to load. This is based on Rob Clark's work. I moved it into pipe_loader which seems to be a better spot. Signed-off-by: Rob Herring <robh@kernel.org>
* Android: Export gallium_dri include filesRob Herring2016-11-011-0/+6
| | | | | | | This doesn't work yet because the exported include files can't be picked up by the android build system unless the library has a 'lib' prefix. Signed-off-by: Rob Herring <robh@kernel.org>
* gallium: annotate sw_driver_descriptor instance as const dataEmil Velikov2016-10-141-1/+1
| | | | | | | Already treated and handled as such. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* gallium: remove unused drm_driver_descriptor::driver_nameEmil Velikov2016-10-148-8/+8
| | | | | | | | | | | | Likely unused since day 1, although I've only checked back until the st/dri unification with commit 29ca7d2c948 ("st/dri: merge dri/drm and dri/sw backends") Based on the comment, referencing drmOpenByName it's not something we want to bring back. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* android: add support for libmesa_amdgpu_addrlibMauro Rossi2016-09-131-1/+1
| | | | | | | | | | | Android porting of the following commits: f1f1ba3 "radeonsi: move sid.h/r600d_common.h to a common place." 69fca64 "amd/addrlib: move addrlib from amdgpu winsys to common code" This patch fixes android building errors Reviewed-by: Dave Airlie <airlied@redhat.com>
* Introduce .editorconfigEric Engestrom2016-08-312-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | A few weeks ago, Jose Fonseca suggested [0] we use .editorconfig files to try and enforce the formatting of the code, to which Michel Dänzer suggested [1] we start by importing the existing .dir-locals.el settings. The first draft was discussed in the RFC [2]. These .editorconfig are a first step, one that has the advantage of requiring little to no intervention from the devs once the settings files are in place, but the settings are very limited. This does have the advantage of applying while the code is being written. This doesn't replace the need for more comprehensive formatting tools such as clang-format & clang-tidy, but those reformat the code after the fact. [0] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121545.html [1] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121639.html [2] https://lists.freedesktop.org/archives/mesa-dev/2016-July/123431.html Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium/dri: Add shared glapi to LIBADD on AndroidTomasz Figa2016-07-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | An earlier patch fixed the problem for classic drivers, however Gallium was still left broken. This patch applies the same workaround to Gallium, when compiled for Android. Following is a quote from the original patch: 0cbc90c57cfc mesa: dri: Add shared glapi to LIBADD on Android /system/vendor/lib/dri/*_dri.so actually depend on libglapi: without this, loading the so file fails with: cannot locate symbol "__emutls_v._glapi_tls_Context" On non-Android (non-bionic) platform, EGL uses the following workflow, which works fine: dlopen("libglapi.so", RTLD_LAZY | RTLD_GLOBAL); dlopen("dri/<driver>_dri.so", RTLD_NOW | RTLD_GLOBAL); However, bionic does not respect the RTLD_GLOBAL flag, and the dri library cannot find symbols in libglapi.so, so we need to link to libglapi.so explicitly. Android.mk already does this. Cc: "12.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* osmesa: Export OSMesaCreateContextAttribs.Mathias Fröhlich2016-07-073-0/+3
| | | | | | | | | | | Since the function is exported like any other public api function and put in the header as if you could link against it, export it also from shared objects. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com> Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
* st/va: hardlink driver instances to gallium_drv_video.soJimmy Berry2016-06-131-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>
* Android: move libdrm settings to top-level Android.common.mkRob Herring2016-06-131-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>
* scons: whitespace cleanupGiuseppe Bilotta2016-05-251-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>
* st/nine: Turn on thread_submit by default when on different deviceAxel Davy2016-05-181-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>
* d3dadapter9: Add ddebug, rbug and trace supportAxel Davy2016-05-181-0/+9
| | | | | | Add support for ddebug, rbug and trace Signed-off-by: Axel Davy <axel.davy@ens.fr>
* Treewide: Remove Elements() macroJan Vesely2016-05-172-4/+4
| | | | | Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: gallium: link against nir as neededEmil Velikov2016-05-175-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>
* gallium/swr: allow swr use as a swrast dri driverTim Rowley2016-04-152-5/+15
| | | | | Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
* scons: Allow building with Address Sanitizer.Jose Fonseca2016-04-131-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>
* mesa/build: add OpenSWR to buildTim Rowley2016-03-022-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>
* 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>
* Android: clean-up and fix DRI module path handlingRob Herring2016-02-291-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>
* Android: fix build break from nir/glsl move to compiler/Rob Herring2016-02-291-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>
* gallium/util: switch over to new u_debug_image.[ch] codeBrian Paul2016-02-081-0/+1
| | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* DRI_CONFIG: Add option to override vendor idPatrick Rudolph2016-02-041-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>
* virgl: also build vtest for AndroidRob Herring2016-02-021-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>
* nir: move to compiler/Emil Velikov2016-01-262-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>
* nir: move shader_enums.[ch] to compilerEmil Velikov2016-01-265-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>
* virgl: enable building on AndroidRob Herring2016-01-231-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>
* targets/dri: android: use WHOLE static librariesEmil Velikov2016-01-221-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>
* build: enable st/va with nouveau driverJulien Isorce2016-01-051-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>
* 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>
* scons: Use LD version script for libgl-xlib.Jose Fonseca2015-11-271-2/+6
| | | | Trivial.
* targets/xvmc: use the non-inline sw helpersMichel Dänzer2015-11-261-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.
* targets/nine: remove freedreno targetEmil Velikov2015-11-251-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>
* targets/nine: remove vc4 targetEmil Velikov2015-11-251-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>
* targets: use the non-inline sw helpersEmil Velikov2015-11-256-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>
* targets/nine: remove unused static functionsEmil Velikov2015-11-211-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>
* targets/nine: add note about messy header inclusion orderEmil Velikov2015-11-211-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>
* targets/nine: add note about fd owndershipEmil Velikov2015-11-211-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>
* {st,targets}/nine: use static/dynamic pipe-loaderEmil Velikov2015-11-212-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>
* {st,targets}/xa: use static/dynamic pipe-loaderEmil Velikov2015-11-212-3/+6
| | | | | | | Analogous to previous commits. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
* {auxiliary,targets}/vl: use static/dynamic pipe-loaderEmil Velikov2015-11-218-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>
* {st,targets}/dri: use static/dynamic pipe-loaderEmil Velikov2015-11-214-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>
* target-helpers: move the DRI specifics to the targetEmil Velikov2015-11-214-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>
* gallium: rename libpipe_loader to libpipe_loader_dynamicEmil Velikov2015-11-218-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>
* pipe-loader: rework the sw backendEmil Velikov2015-11-2111-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>
* gallium: remove library_path argument from pipe_loader_create_screen()Emil Velikov2015-11-212-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>