Commit Graph

27 Commits

Author SHA1 Message Date
Erik Faye-Lund 2acdcf0b31 libgl-gdi: support building without softpipe
While we do need *some* fallback-driver, there's no good reason to
*always* require that to be Softpipe. LLVMpipe for instance does the job
just fine.

This makes the minimal build a bit smaller on Windows.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7506>
2020-11-09 16:58:45 +00:00
Marek Olšák d6287a94b6 gallium: rename 'state tracker' to 'frontend'
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
2020-05-13 13:46:53 -04:00
Jose Fonseca 2e92d33819 scons: Prune out unnecessary targets.
This prunes out all targets except libgl-gdi, libgl-xlib, and svga, as
suggested by Marek Olšák.

libgl-xlib will be remove once I have had time to confirm no automated
tests we have rely upon it.

There are also a bunch of Makefile.sources which become orphaned as
result, that are not taken care of in this change.

v2: Prune remainders of swr support.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348>
2020-03-30 13:38:01 +00:00
Erik Faye-Lund 9c57b54994 gallium/gdi: use GALLIUM_FOO rather than HAVE_FOO
This matches what other targets do, and makes it easier to port to
meson.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-09-16 17:54:00 +00:00
Jose Fonseca 45bacc4b63 scons: Remove gles option.
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-19 16:50:26 +01:00
Jose Fonseca 7c5aececda scons: Allow building with custom MSVC_USE_SCRIPT script.
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-12 07:45:53 +01:00
Marek Olšák 6ff0c6f4eb gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times
which also simplifies the build scripts.
2018-04-13 14:08:14 -04:00
Neil Roberts 31d91f019b spirv: Fix building with SCons
The SCons build broke with commit ba975140d3 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-30 14:33:03 -06:00
George Kyriazis 9aae167e94 gallium: Add support for SWR compilation
Include swr library and include -DHAVE_SWR in the compile line.

v3: split to a separate commit

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-11-21 12:44:47 -06:00
Giuseppe Bilotta 8c00fe3970 scons: whitespace cleanup
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-25 12:23:12 -06:00
Emil Velikov 52addd90d1 scons: gallium: link against nir as needed
... 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-05-17 14:22:46 -04:00
Emil Velikov 1a882fd2ee nir: move shader_enums.[ch] to compiler
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-26 16:08:20 +00:00
Jose Fonseca b23a4859f4 scons: Build nir/glsl_types.cpp once.
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-19 15:59:59 +01:00
Brian Paul 3272f632ee scons: fix MSVC, MinGW build
Duplicate the glsl_types_hack.cpp work-around from the libgl-xlib target.
2015-10-17 10:06:49 -06:00
Brian Paul c4e23f039e targets/libgl-gdi: link with mesautil
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2014-08-04 15:22:48 -06:00
José Fonseca 3276c3d42b libgl-gdi: Mingw-w64 in 32bit mode matches the Mingw32's .DEF semantics. 2011-11-03 09:59:34 +00:00
José Fonseca a68ba5e0f0 libgl-gdi: Fix mingw-w64 build.
Mingw-w64 actually seems to be closer to MSVC in terms of .DEF parsing.
2011-08-30 09:42:01 +01:00
Kenneth Graunke 8aac5d123c Remove talloc from the SCons build system. 2011-01-31 10:17:10 -08:00
Chia-I Wu bb770af3a5 scons: Add support for GLES.
GLES can be enabled by running scons with

  $ scons gles=yes

When gles=yes is given, the build is changed in three ways.  First,
libmesa.a will be built with FEATURE_ES1 and FEATURE_ES2.  This makes
DRI drivers and libEGL support and advertise GLES support.  Second, GLES
libraries will be created.  They are libGLESv1_CM, libGLESv2, and
libglapi.  Last, libGL or opengl32 will link to libglapi.  This change
is required as _glapi_* will be declared as __declspec(dllimport) in
libmesa.a on windows.  libmesa.a expects those symbols to be defined in
another DLL.  Due to this change to GL, GLES support is marked
experimental.

Note that GLES requires libxml2-python to generate some of its sources.
2011-01-22 11:59:05 +08:00
José Fonseca 4f84a3aa32 libgl-gdi: Allow to pick softpipe/llvmpipe on runtime. 2010-11-16 18:56:39 +00:00
José Fonseca 601498ae73 scons: Revamp how to specify targets to build.
Use scons target and dependency system instead of ad-hoc options.

Now is simply a matter of naming what to build. For example:

  scons libgl-xlib

  scons libgl-gdi

  scons graw-progs

  scons llvmpipe

and so on. And there is also the possibility of scepcified subdirs, e.g.

  scons src/gallium/drivers

If nothing is specified then everything will be build.

There might be some rough corners over the next days. Please bare with me.
2010-11-01 13:30:22 +00:00
José Fonseca 3a3cdb909d scons: Build the new glsl2 code. 2010-08-13 13:55:34 +01:00
Jakob Bornecrantz 53cbb81576 rbug: Add to all targets that link against trace
Also added calls to the create function in target helpers and in
tr_drm.c the latter being a hack and should be replaced with the
wrap screen target helper. But at least this way we don't regress.
2010-05-12 20:15:23 +01:00
José Fonseca 47a89e9255 scons: Always build softpipe and llvmpipe (when llvm available).
These are our reference software rasterizers. They can build everywhere
and are a precious debugging tool.

Making them always present immensily simplifies the scons logic.

If people want to avoid building it is still possible to pass
direcotries and target names to scons to narrow the build.
2010-04-11 17:17:35 +09:00
José Fonseca ea532f0e72 scons: Make LLVM a black-white dependency.
Now that draw depends on llvm it is very difficult to correctly handle
broken llvm installations. Either the user requests LLVM and it needs to
supply a working installation. Or it doesn't, and it gets no LLVM
accelerate pipe drivers.
2010-04-11 17:17:34 +09:00
Vinson Lee 9503006285 gallium: Fix Windows SCons build. 2010-03-26 18:58:44 -07:00
Keith Whitwell 0df858a8d5 gallium: create target for gdi libgl 2010-03-09 17:58:40 +00:00