summaryrefslogtreecommitdiff
path: root/src/gallium/targets
AgeCommit message (Collapse)AuthorFilesLines
2019-01-08autotools: Remove tegra vdpau driverDylan Baker1-2/+0
This has never functioned and probably wont ever function, due to the way gallium media state trackers are architected and the tegra video decoder is architected. Cc: Thierry Reding <thierry.reding@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Fixes: 1755f608f5201e0a23f00cc3ea1b01edd07eb6ef ("tegra: Initial support")
2018-12-13pipe-loader: meson: reference correct libraryEmil Velikov1-1/+1
The library is called libgalliumvl_stub - note singular. Fixes: 42ea0631f10 ("meson: build clover") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-12-01d3dadapter9: use snprintf(..., "%s", ...) instead of strncpyAndre Heider2-13/+22
Fixes -Wstringop-truncation compiler warnings. See f836d799f9066adf58f36 "intel/decoder: use snprintf(..., "%s", ...) instead of strncpy" Signed-off-by: Andre Heider <a.heider@gmail.com> Reviewed-by: Axel Davy <davyaxel0@gmail.com>
2018-11-28freedreno: Fix autotools build.Vinson Lee1-0/+2
Fix build error. CXXLD pipe_msm.la ../../../../src/gallium/drivers/freedreno/.libs/libfreedreno.a(freedreno_batch.o): In function `batch_init': src/gallium/drivers/freedreno/freedreno_batch.c:54: undefined reference to `fd_device_version' src/gallium/drivers/freedreno/freedreno_batch.c:59: undefined reference to `fd_submit_new' src/gallium/drivers/freedreno/freedreno_batch.c:61: undefined reference to `fd_submit_new_ringbuffer' src/gallium/drivers/freedreno/freedreno_batch.c:64: undefined reference to `fd_submit_new_ringbuffer' src/gallium/drivers/freedreno/freedreno_batch.c:66: undefined reference to `fd_submit_new_ringbuffer' src/gallium/drivers/freedreno/freedreno_batch.c:70: undefined reference to `fd_submit_new_ringbuffer' Fixes: b4476138d5ad ("freedreno: move drm to common location") Fixes: aa0fed10d357 ("freedreno: move ir3 to common location") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Rob Clark <robdclark@gmail.com>
2018-11-21st/nine: Remove thread_submit warningAxel Davy1-3/+0
thread_submit can be useful even without DRI_PRIME, as it can help avoid missed pageflips. Signed-off-by: Axel Davy <davyaxel0@gmail.com> Tested-by: Andre Heider <a.heider@gmail.com>
2018-11-02meson: link gallium nine with pthreadsDylan Baker1-1/+1
In some cases (not building with llvm, which automatically pulls in pthreads) nine needs to be directly linked with pthreads. Fixes building on x86 (32 bit) without llvm. Distro bug: https://bugs.gentoo.org/670094 Fixes: 6b4c7047d57178d3362a710ad503057c6a582ca3 ("meson: build gallium nine state_tracker") Tested-by: Rafal Lalik <rafallalik@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2018-10-19scons: Remove gles option.Jose Fonseca2-12/+0
It's broken, and WGL state tracker is always built with GLES support noawadays. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2018-10-12scons: Allow building with custom MSVC_USE_SCRIPT script.Jose Fonseca1-0/+1
SCons MSVC support relies on vcvarsall.bat to extract the PATH, CPP includes, library paths, etc. And SCons also has an build env var named MSVC_USE_SCRIPT which one can use to point to alternative vcvarsall.bat script. This change exposes this MSVC_USE_SCRIPT build env variable as a SCons command line variable. This will enable using MSVC outside Program Files (e.g, network shares, etc.) This change also links advapi32 library, necessary for the Windows Registry API used by WGL state tracker, avoiding missing symbols. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2018-10-03pipe-loader: move dup(fd) within pipe_loader_drm_probe_fdEmil Velikov1-1/+1
Currently pipe_loader_drm_probe_fd takes ownership of the fd given. To match that, pipe_loader_release closes it. Yet we have many instances which do not want the change of ownership, and thus duplicate the fd before passing it to the pipe-loader. Move the dup() within pipe-loader, explicitly document that and document all the cases through the codebase. A trivial git grep -2 pipe_loader_release makes things as obvious as it gets ;-) Cc: Leo Liu <leo.liu@amd.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Axel Davy <davyaxel0@gmail.com> Cc: Patrick Rudolph <siro@das-labor.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Axel Davy <davyaxel0@gmail.com> (for nine)
2018-10-03st/nine: do not double-close the fd on teardownEmil Velikov1-1/+1
As the newly introduced comment says: The pipe loader takes ownership of the fd Thus, there's no need to close it again. Cc: Patrick Rudolph <siro@das-labor.org> Cc: Axel Davy <davyaxel0@gmail.com> Cc: mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Axel Davy <davyaxel0@gmail.com>
2018-09-17build: Don't overlink gallium xlib targetDylan Baker2-2/+1
Currently gallium's xlib target will fail to link due to multiple definitions of all the symbols in libmesautil, this only shows up in autotools, and not in meson due to differences in the way that meson and autotools handle linking static archives into static archives. Autotools uses -Wl,--whole-archive implicitly, meson requires this behavior to be opted-into. The solution is just to remove libmesautils from the libgl-xlib target, since it will get all of those symbols form libmesagallium. I've dropped the link from meson as well, it doesn't seem to hurt anything and should make linking just a little faster. Fixes: 8396043f304bb2a752130230055605c5c966e89f ("Replace uses of _mesa_bitcount with util_bitcount") bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107923 Tested-by: Brian Paul <brianp@vmware.com> Tested-by: Vinson Lee <vlee@freedesktop.org> Cc: Sergii Romantsov<sergii.romantsov@globallogic.com>
2018-09-07Replace uses of _mesa_bitcount with util_bitcountDylan Baker1-0/+1
and _mesa_bitcount_64 with util_bitcount_64. This fixes a build problem in nir for platforms that don't have popcount or popcountll, such as 32bit msvc. v2: - Fix additional uses of _mesa_bitcount added after this was originally written Acked-by: Eric Engestrom <eric.engestrom@intel.com> (v1) Acked-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2018-08-23meson: Run the install script with Python 3Mathieu Bridon4-0/+4
The script was being run directly as an executable, and it has a Python 2 shebang. Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-08-17xmlconfig: add kernel_driver device attributeQiang Yu1-1/+1
This attribute can be used by loader to apply different option to device use specific kernel driver. Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> Acked-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-05-16v3d: Rename the driver files from "vc5" to "v3d".Eric Anholt1-1/+1
2018-05-16v3d: Rename the vc5_dri.so driver to v3d_dri.so.Eric Anholt2-6/+6
This allows the driver to load against the merged kernel DRM driver. In the process, rename most of the build system variables and gallium plumbing functions.
2018-05-14opencl: autotools: Fix linking order for OpenCL targetKai Wasserbäch1-2/+1
Otherwise the build fails with an undefined reference to clang::FrontendTimesIsEnabled. Bugzilla: https://bugs.freedesktop.org/106209 Cc: Jan Vesely <jan.vesely@rutgers.edu> Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org> Acked-by: Jan Vesely <jan.vesely@rutgers.edu> Tested-by: Aaron Watry <awatry@gmail.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-04-24meson: fix graw-xlib after auxiliary consolidationDylan Baker1-2/+1
This one's completely my fault, I didn't do good enough testing after rebasing and this got missed. Fixes: d28c24650110c130008be3d3fe584520ff00ceb1 ("meson: build graw tests") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-04-20gallium/util: Android backtrace supportStefan Schake1-0/+1
We can't use any of the existing implementations in u_debug_stack. Android technically has libunwind, but it's been modified to the point where it no longer compiles with the Mesa usage. The library is also not meant to be referenced by vendor libraries. The officially sanctioned way of obtaining backtraces is through the Android own libbacktrace, a C++ library. Access it through a separate C++ source file on Android only. Signed-off-by: Stefan Schake <stschake@gmail.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-04-18meson: build graw testsDylan Baker2-0/+67
This only enables the null and xlib target, so no windows support yet. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-04-17meson: Version libMesaOpenCL like autotools doesJan Alexander Steffens (heftig)1-2/+2
This is for parity with autotools. It names the library libMesaOpenCL.so.1.0.0 and points mesa.icd to the .1 symlink. opencl_version now matches configure.ac's OPENCL_VERSION. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Tested-By: Aaron Watry <awatry@gmail.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-04-13gallium/osmesa: link with winsock2 library on WindowsBrian Paul1-0/+3
To fix the MSVC build. The build broke because we started to compile the ddebug code on Windows after the mtypes.h changes. Building ddebug caused us to also use the u_network.c code for the first time. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2018-04-13gallium: move ddebug, noop, rbug, trace to auxiliary to improve build timesMarek Olšák18-76/+24
which also simplifies the build scripts.
2018-04-05radeonsi: don't build libradeon.la separatelyMarek Olšák1-1/+0
for better parallelism Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-04-05meson: Set .so version for xa like autotools doesDylan Baker1-1/+3
Fixes: 0ba909f0f111824223bc38563d1a6bc73e69c2cc ("meson: build gallium xa state tracker") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-30spirv: Fix building with SConsNeil Roberts5-1/+9
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 <brianp@vmware.com> Tested-by: Brian Paul <brianp@vmware.com>
2018-03-29meson: use dep_libdrm version for pkg-configDylan Baker1-1/+1
This corrects pkg-config to use the libdrm version (as computed by the previous patch) instead of using a hardcoded value that may or may not (probably not) be right. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2018-03-15meson: fix pipe-loaders after omx changesDylan Baker1-3/+4
with_gallium_omx used to be a boolean, but now it's a string. That means it needs to be compared to 'disabled' instead of false. CC: Rob Clark <robdclark@gmail.com> Fixes: 34e852d5b50772199797ea839fc8d6b3805633ff ("meson: Re-add auto option for omx") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Tested-by: Rob Clark <robdclark@gmail.com Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2018-03-12meson: Add moduledir to d3d.pcDylan Baker1-0/+1
This is required to build wine with the nine patchset Fixes: 6b4c7047d57178d3362a710ad503057c6a582ca3 ("meson: build gallium nine state_tracker") Reported-by: Mike Lothian <mike@fireburn.co.uk> Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2018-03-12gallium: work around libtool relink issue for libdrmRoman Gilg1-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 <subdiff@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-09tegra: Initial supportThierry Reding4-1/+11
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 <marcan@marcan.st>. 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 <emil.velikov@collabora.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Andre Heider <a.heider@gmail.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-03-06st/omx/tizonia: Add --enable-omx-tizonia flag and build filesGurkirpal Singh2-2/+18
Allow only bellagio or tizonia to be used at the same time. Detect tizonia package config file Generate libomx_mesa.so and install it to libtizcore.pc::pluginsdir Only compile empty source (target.c) for now. GSoC Project link: https://summerofcode.withgoogle.com/projects/#4737166321123328 Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Julien Isorce <julien.isorce@gmail.com>
2018-03-06st/omx/bellagio: Rename st and target directoriesGurkirpal Singh4-2/+3
v2: Refactor out screen functions to st/omx Allows to keep all the code under st/omx (st/omx/tizonia and st/omx/bellagio). Reverts targets/omx_bellagio to omx as additions to existing files is enough to compile for both bellagio and tizonia. * autotools changes: --enable-omx -> --enable-omx-bellagio * meson changes: -Dgallium-omx=false -> -Dgallium-omx=disabled -Dgallium-omx=true -> -Dgallium-omx=bellagio Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Julien Isorce <julien.isorce@gmail.com>
2018-02-16meson: Add Haiku platform support v4Alexander von Gluck IV1-0/+40
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-02-15meson: fix xvmc target linkageDylan Baker1-3/+4
This needs to link the state tracker with --whole-archive to expose the right symbols. v4: - Always add libswdri and libswkmsdri to the link_with list Fixes: 22a817af8a89eb3c7 ("meson: build gallium xvmc state tracker") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-15meson: Fix xa target linkageDylan Baker1-3/+5
This needs to use --whole-archive (link_whole in meson) to properly expose symbols. v4: - Always add libswdri and libswkmsdri to link_with list Fixes: 0ba909f0f111824 ("meson: build gallium xa state tracker") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-15meson: Fix omx-bellagio target linkageDylan Baker1-3/+4
This needs to use --whole-archive (link_whole in meson) to properly expose symbols. v4: - Always add libswdri and libswkmsdri to link_with Fixes: 1d36dc674d528b93b ("meson: build gallium omx state tracker") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-15meson: fix va target linkageDylan Baker1-3/+4
The state tracker needs to be linked with whole-archive (like autotools). As a result there are symbols from libswdri and libswkmsdri that are needed, so link those as well. v4: - Always add libswdri and libswkmsdri to link_with list Fixes: 5a785d51a6d6 ("meson: build gallium va state tracker") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-15meson: fix vdpau target linkageDylan Baker1-3/+5
The VDPAU state tracker needs to be linked with whole-archive (autotools does this). Because we are linking the whole archive we alos need to link with libswdri and libswkmsdri if those have been enabled. v4: - Always add libswdri and libswkmsdri to link_with list Fixes: 68076b87474e7959 ("meson: build gallium vdpau state tracker") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-15meson: link dri3 xcb libs into vlwinsys instead of into each targetDylan Baker5-17/+5
This makes the dependencies easier to manage, since each media target doesn't need to worry about linking to half a dozen libraries. Fixes: b1b65397d0c4978e3 ("meson: Build gallium auxiliary") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-15meson: add libswdri and libswkmsdri to dri link_withDylan Baker1-9/+2
Fixes: b154b44ae342 ("meson: build radeonsi gallium driver") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-15meson: add libswdri and libswkmsdri to d3dadaptor link_withDylan Baker1-10/+3
v5: - Fix libswdi -> libswdri typo Fixes: 6b4c7047d571 ("meson: build gallium nine state_tracker") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-07Revert "gallium: build ddebug, noop, rbug, trace as part of auxiliary"Roland Scheidegger5-5/+29
This reverts commit 6f82b8d8d0a986aac28e7bec47fc313fb950475c. This broke scons build, and reportedly clover with autotools/meson too.
2018-02-07gallium: build ddebug, noop, rbug, trace as part of auxiliaryMarek Olšák5-29/+5
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!
2018-02-06meson: ensure xmlpool/options.h is generated for libgalliumJon Turney1-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 <jon.turney@dronecode.org.uk> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2018-01-23meson: remove lib prefix from libd3dadapter9.soChristoph Haag1-0/+1
Fixes: 6b4c7047d57178d336 ("meson: build gallium nine state_tracker") Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
2018-01-19autotools: include meson build files in tarballDylan Baker11-10/+13
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 <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-01-18meson: ensure that xmlpool_options.h is generated for targets that need itDylan Baker2-10/+10
Currently a couple of gallium targets race with xmlpool_options.h being generated, don't do that. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-01-11meson: move libsensors dependency to libgalliumDylan Baker3-6/+3
This simplifies the build by removing the need to link targets against libsensors. Suggested-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com>
2018-01-11meson: Use dependencies for nirDylan Baker1-1/+1
This creates two new internal dependencies, idep_nir_headers and idep_nir. The former encapsulates the generation of nir_opcodes.h and nir_builder_opcodes.h and adding src/compiler/nir as an include path. This ensures that any target that needs nir headers will have the includes and that the generated headers will be generated before the target is build. The second, idep_nir, includes the first and additionally links to libnir. This is intended to make it easier to avoid race conditions in the build when using nir, since the number of consumers for libnir and it's headers are quite high. Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>