Commit Graph

79 Commits

Author SHA1 Message Date
Johannes Obermayr 873379a881 dri/nouveau: Fix build with --enable-shared-dricore.
- Based on the work of Себастьян Gliţa Κατινα <cglita@yahoo.com>
- Split Makefile.template into Makefile.defines and Makefile.targets
- Adapt other drivers to new situation
- Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35441

Signed-off-by: Brian Paul <brianp@vmware.com>
2011-06-02 17:21:26 -06:00
Brian Paul de1df26b5c mesa: check that flex/bison are installed
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=36651

NOTE: This is a candidate for the 7.10 branch.
2011-05-18 07:51:33 -06:00
Henri Verbeet c3c91a0fe5 glx: Take GLPROTO_CFLAGS into account. 2011-03-07 21:48:20 +01:00
Christopher James Halse Rogers d1e28b2267 mesa: Optionally build a dricore support library (v3)
This an adds --enable-shared-dricore option to configure.  When enabled,
DRI modules will link against a shared copy of the common mesa routines
rather than statically linking these.

This saves about 30MB on disc with a full complement of classic DRI
drivers.

v2: Only enable with a gcc-compatible compiler that handles rpath
    Handle DRI_CFLAGS without filter-out magic
    Build shared libraries with the full mklib voodoo
    Fix typos
v3: Resolve conflicts with talloc removal patches

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
2011-02-11 18:31:05 -08:00
Benjamin Franzke 214fc6e850 egl: Implement libwayland-egl
This library is required and defined by wayland for
EGL implementations supporting wayland.
2011-02-07 13:55:20 +01:00
Kenneth Graunke d1d8120545 Remove talloc from the make and automake build systems. 2011-01-31 10:17:09 -08:00
Chia-I Wu e8c7d7598f glapi: Fix OpenGL and OpenGL ES interop.
When --enable-shared-glapi is specified, libGL will share libglapi with
OpenGL ES instead of defining its own copy of glapi.  This makes sure an
app will get only one copy of glapi in its address space.

The new option is disabled by default.  When enabled, libGL and libglapi
must be built from the same source tree and distributed together.  This
requirement comes from the fact that the dispatch offsets used by these
libraries are re-assigned whenever GLAPI XMLs are changed.

For GLX, indirect rendering for has_different_protocol() functions is
tricky.  A has_different_protocol() function is assigned only one
dispatch offset, yet each entry point needs a different protocol opcode.
It cannot be supported by the shared glapi.  The fix to this is to make
glXGetProcAddress handle such functions specially before calling
_glapi_get_proc_address.

Note that these files are automatically generated/re-generated

 src/glx/indirect.c
 src/glx/indirect.h
 src/mapi/glapi/glapi_mapi_tmp.h
2011-01-20 17:15:50 +08:00
Chia-I Wu 9767d3b5ad glapi: Fix OpenGL ES 1.1 and 2.0 interop.
Move _glapi_* symbols from libGLESv1_CM.so and libGLESv2.so to
libglapi.so.  This makes sure an app will get only one copy of glapi in
its address space.

Note that with this change, libGLES* and libglapi must be built from the
same source tree and distributed together.  This requirement comes from
the fact that the dispatch offsets used by these libraries are
re-assigned whenever GLAPI XMLs are changed.
2011-01-20 17:15:50 +08:00
Tom Fogal 31351dc029 Export TLS support in gl.pc. 2011-01-10 12:34:02 -07:00
Chia-I Wu 12583174c5 mesa: Remove GLES overlay.
With core mesa doing runtime API checks, GLES overlay is no longer
needed.  Make --enable-gles-overlay equivalent to --enable-gles[12].
There may still be places where compile-time checks are done.  They
could be fixed case by case.
2011-01-10 11:50:35 +08:00
Kenneth Graunke 3acc826520 Fix build on systems where "python" is python 3.
First, it changes autoconf to use a "python2" binary when available,
rather than plain "python" (which is ambiguous).  Secondly, it changes
the Makefiles to use $(PYTHON) $(PYTHON_FLAGS) rather than calling
python directly.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Matthew William Cox <matt@mattcox.ca>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2010-10-27 12:49:53 -07:00
Jon TURNEY 2b9dac397b Make XF86VIDMODE extension optional
Code in glx/glxcmds.c which uses the XF86VIDMODE extension is already guarded.  Also use
that guard to control inclusion of the xf86vmode.h header, and only enable that guard if the
XF86VIDMODE extension is found by pkgconfig.

This changes the behaviour on platforms which XF86VIDMODE exists, in that XF86VIDMODE used to
be mandatory, but is now optional.

Presumably other build systems are already arranging for -DXF86VIDMODE to be supplied to the
complier when glxcmds.c is compiled, so are not affected by this change

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-09-07 13:30:19 -04:00
Eric Anholt 27e931f679 mesa: Fix typo in autoconf.in that made talloc cflags still detect at runtime. 2010-08-22 18:54:30 -07:00
Eric Anholt 639cdd3782 mesa: AC_SUBST the talloc libs/cflags so the ./configure results are saved.
I had used pkg-config from the Makefile because I didn't want to screw
around with the non-autoconf build, but that doesn't work because the
PKG_CONFIG_PATH or TALLOC_LIBS/TALLOC_CFLAGS that people set at
configure time needs to be respected and may not be present at build
time.

Bug #29585
2010-08-22 17:36:51 -07:00
Li Peng c33c1912dd configure: fix wrong variable name GLESv1_LIB_DEPS
GLESv1_CM_LIB_DEPS is defined in "configs/autoconf.in",
but configure.ac uses GLESv1_LIB_DEPS.

Signed-off-by: Li Peng <peng.li@linux.intel.com>
2010-07-30 08:52:58 -04:00
Chia-I Wu 08f4bc07e4 st/egl: Fix build on FreeBSD.
There is no libdl on FreeBSD.  Based on patch from Thinker
<thinker@branda.to>, which is against 7.8.

This fixes fdo bug #29093.
2010-07-16 20:19:13 +08:00
Kristian Høgsberg 2168b87b51 egl_dri2: Support _EGL_PLATFORM_DRM
This lets the egl_dri2 driver initialize on just a DRM fd.
2010-07-08 20:10:37 -04:00
Dan Nicholson 442c37e2ef Use GLW_CFLAGS when building libGLw
We check for libX11 and libXt, so we might as well use the CFLAGS
pkg-config tells us about.
2010-07-01 13:00:02 -07:00
John Hein 9617254a1e Use GLUT_CFLAGS when building glut
Fix this build error (in MesaGLUT-7.6.1)...
glut_cmap.c:23:66: error: X11/Xmu/StdCmap.h: No such file or directory

...by not preventing the cflags that pkg-config finds for glut dependencies
(including 'xmu') from being used.

Defining GLUT_CFLAGS before running the pkg-config prevents the
cflags found by pkg-config from being used.

This patch lets GLUT_CFLAGS that configure & pkg-config work
so hard to set actually get used.

Also make sure the generated configs/autoconf defines GLUT_CFLAGS
used in (at least) src/glut/glx/Makefile.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-07-01 13:00:02 -07:00
Chia-I Wu da39d5d3b4 egl: s/EGL_DISPLAY/EGL_PLATFORM/.
A platform is already used to mean a window system in EGL.  No need to
use a different term.
2010-06-17 16:30:26 +08:00
Brian Paul 3d07060ae3 mesa: remove PROGRAM_DIRS from config files 2010-06-04 17:47:53 -06:00
Chia-I Wu 8e1b375a8d autoconf: Remove unused APIS.
It was used by glapi, which has been moved to mapi.
2010-05-31 10:43:00 +08:00
Chia-I Wu 87cc2da16e mesa/es: Merge back to core mesa.
With the omit list gone, there are not too many differences in building
core mesa and ES overlay.  Remove the mesa/es and build both of them in
src/mesa/Makefile.
2010-05-12 15:03:42 +08:00
Chia-I Wu 63ab2509bf gallium: Add egl-apis target.
The new target installs client API modules to EGL_DRIVER_INSTALL_DIR.
They are used by st/egl.

The client APIs are built from OpenGL and OpenVG state trackers.  For
this to work, st/vega is modified to produce a static library,
libvega.a, instead.  st/es is also not needed any more.  It is removed
and --with-state-trackers=es is replaced by --enable-gles-overlay.

As st/egl now has its own client API modules, this solves the ABI issue
between st/egl and client APIs, as long as the client API modules are
distributed with st/egl.  Plus, this allows st/egl to support OpenGL
with non-Gallium libGL.so.
2010-05-08 14:57:21 +08:00
Chia-I Wu 874ccd5d83 Define OpenGL ES and OpenVG library names.
Define <API>_LIB, <API>_LIB_NAME, <API>_LIB_GLOB, and some other
variables in the configs.  Fix a typo in glesv1_cm.pc.in where an
inexistent variable is used.
2010-05-08 14:55:52 +08:00
Chia-I Wu a6ec153830 mesa: Fix build of ES overlay.
ES overlay is built with FEATURE_ES1 or FEATURE_ES2, and is built
without FEATURE_GL.  Fix the build by always building OpenGL ES sources,
but test for FEATURE_ES1 or FEATURE_ES2.  Also, define symbols that are
missing because FEATURE_GL is not defined.
2010-05-05 11:57:46 +08:00
Kristian Høgsberg 9e4f2da848 Fix gles .pc file generation 2010-05-04 14:13:46 -04:00
Kristian Høgsberg ceffd7b924 Add egl.pc file 2010-05-04 14:13:46 -04:00
Kristian Høgsberg da76a4d845 mesa: Only compile ES files when ES1 or ES2 are selected
This still requieres manual generation of the es1 and es2 glapis and is
disabled by default.
2010-05-02 14:09:52 -04:00
Kristian Høgsberg 0870e4a202 Merge branch 'gles2-2'
Conflicts:
	src/mesa/drivers/dri/common/dri_util.h
2010-05-02 10:17:07 -04:00
Kristian Høgsberg 9fd5fa0512 Hook in install rules for es1 and es2 2010-05-02 10:14:53 -04:00
Kristian Høgsberg 74399d4af5 Add glesv2.pc and glesv1_cm.pc pkg-config files for ES 1 and 2 2010-05-02 09:51:13 -04:00
Kristian Høgsberg 9339c1291d gles: Build libGLESv1_CM.so and libGLESv2.so from glapi files 2010-04-28 14:41:21 -04:00
Kristian Høgsberg 0f68032a7c configure.ac: Add options to enable GLES1/2 API support 2010-04-28 14:36:28 -04:00
Dave Airlie 81fe19843a llvmpipe: add initial autoconf support.
allows the swrastg_dri.so to be built with llvmpipe, also links llvm
to all dri drivers

use --enable-gallium-llvm to use it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-24 18:55:50 +10:00
Jakob Bornecrantz 41d2ebf202 gallium: Remove GALLIUM_WINSYS_DRM_DIRS 2010-03-24 17:02:17 +01:00
Dan Nicholson e725ef171b Change libX11 variables to not conflict with AC_PATH_XTRA
The variable X_LIBS from AC_PATH_XTRA contains only the -L searchdir
parameter and not the -lX11 to link to Xlib. Use X11 prefixed build vars
for linking with Xlib to avoid the conflict.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-23 13:26:50 -07:00
Jeff Smith 8d86d395dc Use X_LIBS from pkg-config, instead of libdir, for locating libX11
Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-13 11:42:24 -08:00
Keith Whitwell 0c96690a5b Merge commit 'origin/master' into gallium-sw-api-2
Conflicts:
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/softpipe/sp_texture.c
	src/gallium/drivers/softpipe/sp_winsys.h
	src/gallium/state_trackers/egl/common/egl_g3d.c
	src/gallium/state_trackers/egl/x11/native_x11.c
	src/gallium/state_trackers/egl/x11/native_x11.h
	src/gallium/state_trackers/egl/x11/native_ximage.c
2010-03-09 11:02:37 +00:00
Keith Whitwell 99f11d0e18 gallium: introduce target directory
Currently there are still at least two functions bundled up inside the
winsys concept:

a) that of a backend resource manager, sometimes capable of performing
   present() operations,

b) the initialization code/routine for the whole driver stack.

The inclusion of (b) makes it difficult to share implementations of
(a) between different drivers.  For instance, a clean xlib winsys
could be of use for software-rasterized VG, GLES, EGL, etc, stacks.
But that is only true as long as there is no dependency from the
winsys to higher level code, as would be the case when we include (b)
in this component.

This change creates a new gallium/targets subtree, specifically for
implementing the glue needed to build individual driver stacks, and
moves that code out of a single example winsys, namely xlib.

Other drivers continue to build unchanged, but hopefully can migrate
to this structure over time.
2010-03-08 19:11:35 +00:00
George Sapountzis 9009a854d1 config: drop WINDOW_SYSTEM var 2010-03-06 06:44:36 +02:00
Kristian Høgsberg 077bc2fda2 egl_dri2: Use pkg-config cflags and libs from configure output
Running pkg-config in Makefiles is bad form, since it doesn't respect the
PKG_CONFIG_PATH value set at ./configure time.
2010-02-05 13:55:45 -05:00
Chia-I Wu 28c3e57c83 egl: Install drivers to ${libdir}/egl.
Install EGL drivers to EGL_DRIVER_INSTALL_DIR, which is default to
${libdir}/egl.
2010-01-23 20:30:11 +08:00
Chia-I Wu 2a928899e3 egl: Remove USING_EGL and the related drivers.
They do not build for a long while and there seems to be no active
users.  It might be better for them to live in the git histroy.
2010-01-22 15:16:31 +08:00
Chia-I Wu 49381d63e6 st/egl_g3d: New EGL state tracker that uses Gallium.
This new (intermediate) EGL state tracker is the base work for EGL
drivers that uses Gallium.  It makes it easier to support new window
systems.

Currently, there is support only for X11.  This driver supports multiple
APIs (OpenVG, OpenGL, ...) and supports hardware acceleration through
winsys/drm.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:08:57 +08:00
Chia-I Wu d4c1ee0534 egl: Clean up the Makefile rules.
This allows libEGL to be built as a static library and removes libX11
from the dependencies.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-11 01:11:05 +08:00
Kristian Høgsberg 8616cec5c9 Check for libdrm_$chipset.pc when needed
This adds missing pkg-config lookup for intel and moves the radeon
lookup into a case...esac so it's only looked up when one or more of
the radeon drivers are enabled.
2010-01-04 11:47:59 -05:00
José Fonseca c978ab017d gallium: Hunt down all references to GALLIUM_AUXILIARY_DIRS. 2010-01-02 20:22:52 +00:00
Marc Dietrich 995c342018 autoconf: fix build breakage 2010-01-02 10:33:15 -07:00
Chow Loong Jin 35506dec67 Add --with-dri-searchpath argument
* Add an extra argument to configure which allows for specifying
  different DRI driver search paths to libGL (FDO #24766)

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2009-10-30 06:00:13 -07:00