summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
Commit message (Collapse)AuthorAgeFilesLines
* 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 <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "11.2 12.0" <[email protected]>
* 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" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Acked-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* 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 <[email protected]>
* d3dadapter9: Add ddebug, rbug and trace supportAxel Davy2016-05-181-0/+9
| | | | | | Add support for ddebug, rbug and trace Signed-off-by: Axel Davy <[email protected]>
* Treewide: Remove Elements() macroJan Vesely2016-05-172-4/+4
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* 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 <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* gallium/swr: allow swr use as a swrast dri driverTim Rowley2016-04-152-5/+15
| | | | | Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* 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 <[email protected]>
* mesa/build: add OpenSWR to buildTim Rowley2016-03-022-0/+11
| | | | | | | Tested on Linux (centos, ubuntu, and suse variants) Reviewed-by: Emil Velikov <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* 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" <[email protected]> Fixes: 7f585a6a98d "configure.ac: use pkg-config for libelf" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93524 Signed-off-by: Emil Velikov <[email protected]>
* 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" <[email protected]> Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* 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" <[email protected]> Cc: Mauro Rossi <[email protected]> Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/util: switch over to new u_debug_image.[ch] codeBrian Paul2016-02-081-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* 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 <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* 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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nir: move to compiler/Emil Velikov2016-01-262-2/+2
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* 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 <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* 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 <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* 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: [email protected] Cc: Mauro Rossi <[email protected]> Reported-by: Mauro Rossi <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* 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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Michel Dänzer <[email protected]> Cc: "11.0 11.1" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Cc: "11.0 11.1" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Acked-by: Rob Clark <[email protected]>
* targets/nine: remove vc4 targetEmil Velikov2015-11-251-2/+0
| | | | | | | There are no users for it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* 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" <[email protected]> Cc: Ilia Mirkin <[email protected]> Cc: Edward O'Callaghan <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Oded Gabbay <[email protected]> Tested-by: Nick Sarnie <[email protected]>
* targets/nine: remove unused static functionsEmil Velikov2015-11-211-36/+0
| | | | | | | | | Dead code since commit 8f50614910c40366d94964fe2c5da5772aff2f96 Cc: Axel Davy <[email protected]> Cc: Tiziano Bacocco <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* targets/nine: add note about messy header inclusion orderEmil Velikov2015-11-211-0/+1
| | | | | | Cc: Axel Davy <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* 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 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* {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 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* {st,targets}/xa: use static/dynamic pipe-loaderEmil Velikov2015-11-212-3/+6
| | | | | | | Analogous to previous commits. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* {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 <[email protected]> Acked-by: Rob Clark <[email protected]>
* {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 <[email protected]> Acked-by: Rob Clark <[email protected]>
* 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 <[email protected]> Acked-by: Rob Clark <[email protected]>
* 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 <[email protected]> Acked-by: Rob Clark <[email protected]>
* 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 <[email protected]> Acked-by: Rob Clark <[email protected]>
* 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 <[email protected]> Acked-by: Rob Clark <[email protected]>
* targets/nine: remove the custom pipe-driver path managementEmil Velikov2015-11-211-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 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* targets/nine: use the existing sw_screen_wrap() over our custom versionEmil Velikov2015-11-212-3/+2
| | | | | | Cc: Axel Davy <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* automake: use GALLIUM_PIPE_LOADER_DEFINES only where applicableEmil Velikov2015-11-211-2/+1
| | | | | | | | As of last commit we no longer need the defines in order to have the function prototypes. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* virgl: add driver for virtio-gpu 3D (v2)Dave Airlie2015-10-231-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 <[email protected]>
* osmesa: Expose GL entry points for Windows build via DEF file.Nigel Stewart2015-10-212-0/+674
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92437 CC: "10.6 11.0" <[email protected]> Signed-off-by: Jose Fonseca <[email protected]>
* scons: Build nir/glsl_types.cpp once.Jose Fonseca2015-10-196-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 <[email protected]>
* scons: fix MSVC, MinGW buildBrian Paul2015-10-174-2/+21
| | | | Duplicate the glsl_types_hack.cpp work-around from the libgl-xlib target.
* glsl: (mostly) remove libglsl_utilRob Clark2015-10-163-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 <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* nir: remove dependency on glslRob Clark2015-10-162-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 <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* 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 <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Emil Velikov <[email protected]> CC: "10.6 11.0" <[email protected]>