summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/dri
Commit message (Collapse)AuthorAgeFilesLines
* gallium: move ddebug, noop, rbug, trace to auxiliary to improve build timesMarek Olšák2018-04-133-24/+4
| | | | which also simplifies the build scripts.
* spirv: Fix building with SConsNeil Roberts2018-03-301-0/+1
| | | | | | | | | | | | | The SCons build broke with commit ba975140d3c9 because a SPIR-V function is called from Mesa main. This adds a convenience library for SPIR-V and adds it to everything that was including nir. It also adds both nir and spirv to drivers/x11/SConscript. Also add nir/spirv modules to osmesa and libgl-gdi targets. (Brian Paul) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105817 Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* gallium: work around libtool relink issue for libdrmRoman Gilg2018-03-121-1/+1
| | | | | | | | | | | | This is similar to commit 90633079. libtool links first to system directories instead of custom locations of libdrm on relinking. Since a more recent libdrm version than the one provided by the system is often needed when compiling mesa, make sure this works by putting libdrm in front. See also: https://bugs.freedesktop.org/show_bug.cgi?id=100259 Signed-off-by: Roman Gilg <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* tegra: Initial supportThierry Reding2018-03-093-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tegra K1 and later use a GPU that can be driven by the Nouveau driver. But the GPU is a pure render node and has no display engine, hence the scanout needs to happen on the Tegra display hardware. The GPU and the display engine each have a separate DRM device node exposed by the kernel. To make the setup appear as a single device, this driver instantiates a Nouveau screen with each instance of a Tegra screen and forwards GPU requests to the Nouveau screen. For purposes of scanout it will import buffers created on the GPU into the display driver. Handles that userspace requests are those of the display driver so that they can be used to create framebuffers. This has been tested with some GBM test programs, as well as kmscube and weston. All of those run without modifications, but I'm sure there is a lot that can be improved. Some fixes contributed by Hector Martin <[email protected]>. Changes in v2: - duplicate file descriptor in winsys to avoid potential issues - require nouveau when building the tegra driver - check for nouveau driver name on render node - remove unneeded dependency on libdrm_tegra - remove zombie references to libudev - add missing headers to C_SOURCES variable - drop unneeded tegra/ prefix for includes - open device files with O_CLOEXEC - update copyrights Changes in v3: - properly unwrap resources in ->resource_copy_region() - support vertex buffers passed by user pointer - allocate custom stream and const uploader - silence error message on pre-Tegra124 - support X without explicit PRIME Changes in v4: - ship Meson build files in distribution tarball - drop duplicate driver_tegra dependency Reviewed-by: Emil Velikov <[email protected]> Acked-by: Emil Velikov <[email protected]> Tested-by: Andre Heider <[email protected]> Reviewed-by: Dmitry Osipenko <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
* meson: add libswdri and libswkmsdri to dri link_withDylan Baker2018-02-151-9/+2
| | | | | | | Fixes: b154b44ae342 ("meson: build radeonsi gallium driver") Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Revert "gallium: build ddebug, noop, rbug, trace as part of auxiliary"Roland Scheidegger2018-02-071-1/+9
| | | | | | This reverts commit 6f82b8d8d0a986aac28e7bec47fc313fb950475c. This broke scons build, and reportedly clover with autotools/meson too.
* gallium: build ddebug, noop, rbug, trace as part of auxiliaryMarek Olšák2018-02-071-9/+1
| | | | | | | Building gallium is faster by 7.5 seconds on a 4core/8thread 3GHz CPU. (gallium build time is reduced by 15% when building only radeonsi) Non-recursive makefiles are great!
* meson: ensure xmlpool/options.h is generated for libgalliumJon Turney2018-02-061-1/+1
| | | | | | | | | | | In file included from ../src/gallium/targets/dri/target.c:1: In file included from ../src/gallium/auxiliary/target-helpers/drm_helper.h:8: ../src/util/xmlpool.h:103:10: fatal error: 'xmlpool/options.h' file not found See also 26bde1e3. Signed-off-by: Jon Turney <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* autotools: include meson build files in tarballDylan Baker2018-01-191-0/+1
| | | | | | | | | | | | This adds the meson.build, meson_options.txt, and a few scripts that are used exclusively by the meson build. v2: - Remove accidentally included changes needed to test make dist with LLVM > 3.9 Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: move libsensors dependency to libgalliumDylan Baker2018-01-111-1/+1
| | | | | | | | | This simplifies the build by removing the need to link targets against libsensors. Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* meson: Turn on swr for relevant targetsDylan Baker2018-01-081-2/+2
| | | | | | | | | | | | Currently that's dri, libgl-xlib, and osmesa. v2: - put drivers on a separate line from normal dependencies (Eric E) cc: George Kyriazis <[email protected]> cc: Tim Rowley <[email protected]> cc: Bruce Cherniak <[email protected]> Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: use the driver dependencies for the gallium dri targetDylan Baker2017-12-041-100/+26
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Add lmsensors supportDylan Baker2017-12-011-1/+1
| | | | | | | | v2: - Make -Dlmsensors=false work - Simplify auto and true cases Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: build virgl driverDylan Baker2017-11-281-0/+5
| | | | | | | Build tested only. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build svga driver on linuxDylan Baker2017-11-281-0/+5
| | | | | | | Build tested only. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build r600 driverDylan Baker2017-11-281-1/+6
| | | | | | | | | v4: - Ensure inc_amd_common defined when radeonsi is disabled (needed by r600) Signed-off-by: Dylan Baker <[email protected]> Tested-by: Aaron Watry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build r300 driverDylan Baker2017-11-281-2/+10
| | | | | | | This is build tested only Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build i915g driverDylan Baker2017-11-281-0/+5
| | | | | | | Build tested only. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: add si_driinfo.h in libgallium_driJuan A. Suarez Romero2017-11-221-0/+1
| | | | | | v2: generate target conditionally (Dylan) Reviewed-by: Dylan Baker <[email protected]>
* meson: Always link libgallium_dri.so against dep_thread.Eric Anholt2017-11-091-0/+1
| | | | | | | | Somehow on my cross build the -pthread is getting lost. All the other deps seem to work out fine. Reviewed-by: Dylan Baker <[email protected]> Tested-by: Timothy Arceri <[email protected]>
* Android: move drivers' symlinks to /vendor (v2)Mauro Rossi2017-10-301-2/+3
| | | | | | | | | | | | | | | | Having moved gallium_dri.so library to /vendor/lib/dri also symlinks need to be coherently created using TARGET_OUT_VENDOR instead of TARGET_OUT or all non Intel drivers will not be loaded with Android N and earlier, thus causing SurfaceFlinger SIGABRT (v2) simplification of post install command Fixes: c3f75d483c ("Android: move libraries to /vendor") Cc: 17.3 <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> (v1) Reviewed-by: Rob Herring <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]>
* meson: build freedrenoRob Clark2017-10-241-0/+6
| | | | | | | | Mostly copy/pasta from Dylan Baker's conversion of nouveau and i965. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: build imx driverDylan Baker2017-10-231-0/+5
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* meson: build etnaviv driver + winsysDylan Baker2017-10-231-0/+5
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* meson: Add support for the vc5 driver.Eric Anholt2017-10-171-2/+11
| | | | | | | v2: Default vc5 to off, since it requires the simulator currently. Add missing dep on the XML generation from libbroadcom_vc5. Reviewed-by: Dylan Baker <[email protected]> (v1)
* meson: Add support for the pl111 driver.Eric Anholt2017-10-171-0/+5
| | | | Reviewed-by: Dylan Baker <[email protected]>
* meson: Add support for the vc4 driver.Eric Anholt2017-10-171-1/+10
| | | | Reviewed-by: Dylan Baker <[email protected]>
* meson: build llvmpipeDylan Baker2017-10-161-0/+4
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build softpipeDylan Baker2017-10-161-0/+8
| | | | | | | | | | This doesn't include llvmpipe. v2: - Fix inconsistent use of with_gallium_swrast and with_gallium_softpipe. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build nouveau (gallium) driverDylan Baker2017-10-161-0/+5
| | | | | | | | | | | Tested with a GK107. v2: - Add target for nouveau standalone compiler. This target is not built by default. v3: - Add nouveau to list of drivers built by default Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <eric at anholt.net>
* meson: build radeonsi gallium driverDylan Baker2017-10-161-0/+89
| | | | | | | | | | This hooks up the bits necessary to build gallium dri drivers, with radeonSI as the first example driver. This isn't tested yet. v4: - drop radeonsi generated header from sources. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <eric at anholt.net>
* broadcom: Add V3D 3.3 gallium driver called "vc5", for BCM7268.Eric Anholt2017-10-102-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | V3D 3.3 is a continuation of the 3D implementation in VC4 (v2.1 and v2.6). V3D 3.3 introduces an MMU (no more CMA allocations) and support for GLES3.1. This driver is not currently conformant, though that will be a target as soon as possible. V3D 3.x parts use a new texture tiling layout common across many Broadcom graphics parts including and the HVS scanout engine. It also massively changes the QPU instructions, introducing a common physical register file (no more A/B split) and half-float instructions, while removing the 4x8 unorm instructions in favor of half-float for talking to fixed function interfaces. Because so much has changed, vc5 is implemented in a separate gallium driver, using only the XML code-generation support from vc4. v2: Fix tile layout for 64bpp textures. Fix texture swizzling for 32-bit returns. Fix up a bit of MRT setup. Sync the simulator to kernel behavior a bit more. Improve uniform debugging code. Rebase on QIR->VIR rename. Move texture state mostly to the CSOs. Improve cache flushing on the simulator. Fix program deletion use-after-frees. Acked-by: Dave Airlie <[email protected]> (uabi plan) Acked-by: Daniel Vetter <[email protected]> (uabi plan)
* scons: use python3-compatible print()Eric Engestrom2017-09-251-1/+1
| | | | | | | | | These changes were generated using python's `2to3` tool. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102852 Reported-by: Alex Granni <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* Android: gallium_dri: pass dri.sym to linkerRob Herring2017-08-221-0/+7
| | | | | | | | | | | | | | | | Pass the dri.sym version script to the linker. This ensures only explicitly exported symbols are exported and shrinks the library by up to 60KB. HAVE_DLADDR also needs to be set so that __driDriverExtensions is defined. We need to pass "--undefined-version" because the Android build system sets --no-undefined-version by default and we get an error on driver specific symbols if those drivers are disabled without the option. Suggested-by: Emil Velikov <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* Android: fix typo in symlink for driver loading and 32 bit buildsMauro Rossi2017-06-301-2/+2
| | | | | | | | | | | | There is typo in the mkdir command path, the correct one is $(TARGET_OUT)/$(l)/$(MESA_DRI_MODULE_REL_PATH) The other issue is in 32bit builds, because lib64 does not exist there, we can use TARGET_IS_64_BIT to refine the post install command. Fixes: a3d98ca62f ("Android: use symlinks for driver loading") Signed-off-by: Rob Herring <[email protected]>
* Android: use symlinks for driver loadingRob Herring2017-06-291-0/+10
| | | | | | | | | Instead of having special driver loading logic for Android, create symlinks to gallium_dri.so so we can use the standard loading logic. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* gallium: Add renderonly-based support for pl111+vc4.Eric Anholt2017-06-152-0/+4
| | | | | | | | | | | | | | | | | | | This follows the model of imx (display) and etnaviv (render): pl111 is a display-only device, so when asked to do GL for it, we see if we have a vc4 renderer, make the vc4 screen, and have vc4 call back to pl111 to do scanout allocations. The difference from etnaviv is that we share the same BO between vc4 and pl111, rather than having a vc4 bo and a pl11 bo and copies between the two. The only mismatch between their requirements is that vc4 requires 4-pixel (at 32bpp) stride alignment, while pl111 requires that stride match width. The kernel will reject any modesets to an incorrect stride, so the 3D driver doesn't need to worry about that. v2: Rebase on Android rework, drop unused include. v3: Fix another Android bug, from Rob Herring's build-testing. Reviewed-by: Christian Gmeiner <[email protected]>
* Android: correct libz dependencyChih-Wei Huang2017-05-171-1/+2
| | | | | | | | | | | | | | | | | | | Commit 6facb0c0 ("android: fix libz dynamic library dependencies") unconditionally adds libz as a dependency to all shared libraries. That is unnecessary. Commit 85a9b1b5 introduced libz as a dependency to libmesa_util. So only the shared libraries that use libmesa_util need libz. Fix Android Lollipop build by adding the include path of zlib to libmesa_util explicitly instead of getting the path implicitly from zlib since it doesn't export the include path in Lollipop. Fixes: 6facb0c0 "android: fix libz dynamic library dependencies" Signed-off-by: Chih-Wei Huang <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Rob Herring <[email protected]>
* Android: Drop linking libgccRob Herring2017-05-111-4/+0
| | | | | | | | | Including libgcc breaks on Android O (master). This doesn't appear to be needed any more as both Android M and N have also been built w/o libgcc. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Chih-Wei Huang <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Android: rework libelf dependenciesRob Herring2017-05-111-3/+0
| | | | | | | | | Add libelf as a library dependency rather than explicitly listing its include paths. This should work for Android M and later which have the necessary exported directories in libelf. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Android: push driver build details to driver makefilesRob Herring2017-05-111-54/+6
| | | | | | | | | | | | | src/gallium/targets/dri/Android.mk contains lots of conditional for individual drivers. Let's move these details into the individual driver makefiles. In the process, align the make driver conditionals with automake (i.e. HAVE_GALLIUM_*). Signed-off-by: Rob Herring <[email protected]> [Emil Velikov: add the radeon winsys for radeonsi] Signed-off-by: Emil Velikov <[email protected]>
* Android: drop static linking of R600 LLVM librariesMauro Rossi2017-05-111-6/+1
| | | | | | | | | | | | | | | | | Inspired by Chih-Wei Huang and Zhen Wu similar patches Linking against llvm with both static and shared may be avoided, provided that libLLVM shared library for device supports whole static R600/AMDGPU libraries, necessary for radeonsi/amdgpu. Complementary changes, limited to android external/llvm project are necessary to correclty build libLLVM Tested with marshmallow-x86 and nougat-x86 builds Reviewed-by: Chih-Wei Huang <[email protected]> Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/dri: remove unneeded HAVE_SHARED_GLAPI guardEmil Velikov2017-05-041-5/+1
| | | | | | | | | | | Always true, since the dri modules required shared glapi. With earlier commit (da410e6afad "configure: explicitly require shared glapi for enable-dri") we even made that explicit during the configure stage. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/dri: always link against shared glapiEmil Velikov2017-05-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the early days of Xorg and Mesa we had multiple providers of the GLAPI. All of those were the ones responsible for dlopening the DRI module. Hence it was perfectly fine, and actually expected, for the DRI modules to have unresolved symbols. Since then we've moved the API to a separate shared library and no other libraries provide the symbols. Here comes the picky part: It's possible that one uses old Xorg (where libglx.so provides the GLAPI) and new Mesa (with DRI modules linking against libglapi.so). That should still work, since the the libglx.so symbols will take precedence over the libglapi.so ones. I've verified this while running 1.14 series Xorg alongside this (and next) patch. It may seem a bit fragile, but that's of reasonably OK since all of the affected Xorg versions have been EOL for years. The final one being the 1.14 series, which saw its final bug fix release 1.14.7 in June 2014. To ensure that the binaries do not have unresolved symbols add -no-undefined and $(LD_NO_UNDEFINED), just like we do everywhere else throughout mesa. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98428 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* Android: fix r300g only buildRob Herring2017-04-251-3/+5
| | | | | | | | | | | | | | | | | | | | If r300g is the only radeon driver built, the Android build fails to build: ninja: error: 'out/target/product/linaro_x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/export_includes', needed by 'out/target/product/linaro_x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/import_includes', missing and no known rule to make it This is because the path to build libmesa_pipe_radeon was only getting added for r600g and radeonsi, but the library dependency was added for all radeon drivers. As libmesa_pipe_radeon is not needed for r300g, drop the library dependency. Cc: Mauro Rossi <[email protected]> Signed-off-by: Rob Herring <[email protected]> Acked-by: Emil Velikov <[email protected]>
* Android: drop Android 4.4 (KitKat) supportRob Herring2017-03-221-8/+2
| | | | | | | | | | | Any users of KitKat are likely using an older version of Mesa and KitKat support adds complexity to the make files. Dropping support allows removing the MESA_LOLLIPOP_BUILD make variable in various make files. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Android: clean-up trailing '\' in make variablesRob Herring2017-03-221-2/+2
| | | | | | | | | Fixed with the following command: perl -pe 'BEGIN{undef $/;} s/ \\\n\n/\n\n/smg' $(find . -name 'Android.*') Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/targets: rework the empty targets removalEmil Velikov2017-03-081-2/+1
| | | | | | | | | | | | | | | | | Earlier commit added extra tracking and we've attempted to remove the vdpau/other folder if empty. V2 of said commit dropped the pipe to /dev/null and the explicit "true" override. Sadly both of those are needed since there's no guarantee that the folder will be empty before we [mesa] make install. Since we're bringing those two back, there's no need to track if we've installed anything, and simply do "rm -d foo/ &>/dev/null || true" Tested-by: Andy Furniss <[email protected]> Reported-by: Andy Furniss <[email protected]> Fixes: 1cd4fde053 ("gallium/targets: don't leave an empty target directory(ies)") Signed-off-by: Emil Velikov <[email protected]>
* gallium/targets: don't leave an empty target directory(ies)Emil Velikov2017-03-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some drivers do not support certain targets - for example nouveau doesn't do VAAPI, while freedreno doesn't do of the video backends. As such if we enter vdpau when building freedreno/ilo/etc, a vdpau/ folder will be created, empty library will be build and almost immediately removed. Thus keeping an empty vdpau/ folder around. There are two ways to fix this. * add substantial tracking in configure/makefiles so that we never end up in targets/vdpau Downsides: Error prone, as the configure checks and the 'include gallium/drivers/foo/Automake.inc' can easily get out of sync. * remove the folder, if empty, alongside the empty library. Downsides: In the latter case vdpau/ might be empty before the mesa build has started, yet we'll remove it either way. This patch implements the latter option, as the downside isn't that significant, plus the patch is way shorter ;-) v2: use has_drivers to track since TARGET_DRIVERS can contain space, hence neither string comparison nor -n/-z works correctly. Gentoo Bugzilla: https://bugs.gentoo.org/545230 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* gallium: Remove vc4 simulator hack from loader infrastructure.Eric Anholt2017-02-061-10/+0
| | | | | | | | | | Now that there's MESA_LOADER_DRIVER_OVERRIDE for choosing the driver name we load, we don't need this any more. v2: Get the junk out of pipe_loader_drm.c, too. Reviewed-by: Emil Velikov <[email protected]> (v1) Reviewed-by: Nicolai Hähnle <[email protected]> (v2)