Commit graph

228 commits

Author SHA1 Message Date
Kristian Høgsberg
e82dd8c6e1 DRI interface changes and DRI2 direct rendering support.
Add DRI2 direct rendering support to libGL and add DRI2 client side
protocol code.  Extend the GLX 1.3 create drawable functions in
glx_pbuffer.c to call into the DRI driver when possible.

Introduce __DRIconfig, opaque struct that represents a DRI driver
configuration.  Get's rid of the open coded __GLcontextModes in the
DRI driver interface and the context modes create and destroy
functions that the loader was requires to provide.  glcore.h is no
longer part of the DRI driver interface.  The DRI config is GL binding
agnostic, that is, not specific to GLX, EGL or other bindings.

The core API is now also an extension, and the driver exports a list
of extensions as the symbol __driDriverExtensions, which the loader
must dlsym() for.  The list of extension will always include the DRI
core extension, which allows creating and manipulating DRI screens,
drawables and contexts.  The DRI legacy extension, when available,
provides alternative entry points for creating the DRI objects that
work with the XF86DRI infrastructure.

Change DRI2 client code to not use drm drawables or contexts.  We
never used drm_drawable_t's and the only use for drm_context_t was as
a unique identifier when taking the lock.  We now just allocate a
unique lock ID out of the DRILock sarea block.  Once we get rid of the
lock entirely, we can drop this hack.

Change the interface between dri_util.c and the drivers, so that the
drivers now export the DriverAPI struct as driDriverAPI instead of the
InitScreen entry point.  This lets us avoid dlsym()'ing for the DRI2
init screen function to see if DRI2 is supported by the driver.
2008-03-31 16:51:26 -04:00
Jeremy Huddleston
4dfd2dcbe7 Darwin: Fixed small error in darwin config files
(cherry picked from commit a21c61ee8b)
2008-03-10 16:03:29 -07:00
Jeremy Huddleston
7c7fece977 Darwin: Config/source fixes to now build glxdemo apps and OSMesa
Also added darwin-fat-32bit darwin-fat-all configs and deleted old darwin-x86ppc config
(cherry picked from commit 7120c0089d)
2008-03-10 15:21:39 -07:00
José Fonseca
60159c1b09 Convert crlf->lf line endings.
Windows/DOS users should enable core.autocrlf from now on:

  git config --global core.autocrlf true
2008-02-28 16:34:32 +09:00
Kristian Høgsberg
bcecea6ea6 autoconf: Add gcc search patch to MKDEP_OPTIONS to eliminate warnings.
Also, use -include to avoid error message when make initially fails to
include the non-existent depend file.
2008-02-25 19:02:07 -05:00
Jeremy Huddleston
9993ccce69 Apple: Pulled in changes from Apple's patchset to allow mesa to build on darwin again
(cherry picked from commit e70609b7b8)
2008-02-19 00:55:11 -08:00
Dan Nicholson
817af9bec2 glapi: Use variable for indent and flags
Put the path to indent and the flags to call it with in configs/default
rather than in the Makefile. This makes it easier to change the values
globally.
2008-02-12 06:43:23 -08:00
Dan Nicholson
2b440d5461 Merge branch 'master' into autoconf2 2007-12-26 15:41:24 -06:00
Dan Nicholson
da693b7c89 Don't try to build nonexistent i915tex driver on linux-x86-64 2007-12-18 22:20:37 -08:00
Dan Nicholson
88586332d3 autoconf: Allow static library builds
Allow the user to specify that they want static libraries through the
--{enable,disable}-{static,shared} switches like libtool. The mesa build
only allows for one at a time, so static will be chosen if someone has
passed --enable-static or --disable-shared.

This also allows the mklib options to be set at build time. This allows
-static to be set for mklib, but any platform specific settings are
allowed by setting MKLIB_OPTIONS for configure.

Handling of the program libraries through the APP_LIB_DEPS variable is
pretty ugly, but it seems to work.
2007-12-07 14:34:27 -08:00
Dan Nicholson
6689f9ebcb autoconf: Configure the osmesa channel size for OSMesa16 and OSMesa32
Allow the user to specify channel bits of 16 or 32 to enable OSMesa16 or
OSMesa32 instead of the default OSMesa. This option is controlled
through the option --with-osmesa-bits=BITS and is only honored when the
driver is osmesa.

The osdemos are not enabled in the 16 or 32 bit case because the
Makefile is currently hardcoded to link to -lOSMesa.
2007-12-07 14:34:27 -08:00
Dan Nicholson
44d9914b29 autoconf: Add support for shared DRI build on linux and freebsd
Added autoconf bits to allow using DRI as the driver through the option
--with-dri-driver=DRIVER. The options are x11 (default) and dri. Three
DRI specific options for controlling the driver directory, direct
rendering and TLS are also added.

The DRI will probably not work for platforms besides linux and freebsd.
2007-12-07 14:34:27 -08:00
Dan Nicholson
dca1b796b7 autoconf: Initial support for an autoconf configuration
This adds the initial support for using autoconf configuration. Support
is available for shared Xlib driver builds. Later this will be extended
to dri and osmesa-only builds and possibly targetting non-X backends.
Support for static library builds will also be added.

The configure script fills in the autoconf config. This is then used by
running `make autoconf' after ./configure.

Testing has been done on Linux/GNU. The configure script tries to
faithfully reproduce the current configs/linux* and configs/freebsd*.
Other platforms can be handled later by adding similar statements and
feature tests.

Pkg-config is used to search for packages when possible. This makes the
build much more flexible and robust to the user's configuration. This
requires that the pkg-config autoconf macros pkg.m4 are included in
aclocal.m4. This requires autoconf and aclocal from autoconf and
automake, respectively.
2007-12-07 14:34:27 -08:00
Dan Nicholson
f1efacb92b Make osdemos linking like other programs
Most of the programs list their dependencies on the Mesa libraries in
their Makefiles. This works with the default configuration where
APP_LIB_DEPS only lists external libraries. This changes the
linux-osmesa configs and the osdemos Makefile to follow that convention.

Some cleanup of the Makefile is also added to refer to the GL libraries
through the existing variables rather than hardcoding their names.
2007-12-07 14:10:27 -08:00
Dan Nicholson
6aaf9bdd41 configs: Fix linking with static libGL and --as-needed
Linking of the programs breaks when using a static libGL and the GNU ld
option --as-needed. This is because libXext is needed for the XShm
functions.
2007-12-07 11:49:40 -08:00
Brian
ce98779571 glut doesn't need -lXt 2007-12-03 12:00:28 -07:00
Dan Nicholson
01b18abf93 Add -fno-strict-aliasing workaround for all GCC targets
Use a GCC option to work around aliasing bugs. See commit 013dbcd for
more details.
2007-11-01 06:03:31 -07:00
Dan Nicholson
dbcd20f1c2 configs: Set -fexceptions for GLUT on linux-dri like other targets
Quite a while ago, the GCC option -fexceptions was added for building
libglut. See here:

  http://article.gmane.org/gmane.comp.video.mesa3d.devel/9499

This was missing in the linux-dri targets.
2007-10-31 16:18:29 -07:00
Dan Nicholson
c3b5adaa9a configs: Always use -fPIC for shared libraries, never for static
Mesa currently disables -fPIC for DRI on x86, but most Linux distros are
re-enabling -fPIC for all DRI arches. Let's just do that here since
that's normally what's wanted for shared libraries. Some justification:

http://bugs.gentoo.org/show_bug.cgi?id=110840#c9

On the other hand, position-independent code is only necessary when
building shared libraries, so disable it for the static cases.
2007-10-31 14:19:20 -07:00
Dan Nicholson
013dbcd611 Add -fno-strict-aliasing workaround for Linux GCC targets
Most Linux distros work around aliasing problems in Mesa by compiling
with the GCC option -fno-strict-aliasing. Two examples:

  https://bugs.freedesktop.org/show_bug.cgi?id=6046
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=394311

This makes -fno-strict-aliasing the default with a comment that
developers should consider commenting it out. There is a already a note
about these bugs in docs/helpwanted.html.
2007-10-31 09:47:39 -07:00
Dan Nicholson
06ca14543e Build xdemos programs by default on linux-dri
Since libglut is no longer hardcoded, we can build the xdemos programs
so long as a GLX enabled libGL and libGLU have been built.
2007-10-29 11:43:20 -07:00
Dan Nicholson
3b9e28d507 linux-dri-xcb: Fix undefined refs when linking with libGL
GL_LIB_DEPS was missing -lXdamage and -lXfixes, which was causing
linker errors when trying to build the programs.
2007-10-29 11:17:04 -07:00
Dan Nicholson
162914675a update APP_LIB_DEPS for static library configs (patch 3/3) 2007-10-29 09:05:13 -06:00
Dan Nicholson
9ef1d9f03a simplify APP_LIB_DEPS (patch 2/3) 2007-10-29 09:04:30 -06:00
Dan Nicholson
9514209593 configs: Fix linux-static to link correctly
The linux-static target was missing necessary libraries and hardcoding
their location to /usr/X11R6/lib. This makes it comparable to the x86
and x86-64 static targets.
2007-10-26 15:46:37 -07:00
Alex Neundorf
cae5b7f1e3 added catamount-osmesa-pgi config 2007-10-24 16:31:22 -06:00
Eric Anholt
ffa94e5b1e FreeBSD: more /usr/X11R6->/usr/local 2007-10-04 12:28:48 -07:00
Dan Nicholson
2a3e33865d add support for LDFLAGS env var 2007-09-28 18:42:21 -06:00
Eric Anholt
b2c8b1385a FreeBSD: Chase /usr/X11R6 death (replaced by everything in one prefix). 2007-09-27 15:11:45 -07:00
Eric Anholt
8cf9085bc7 Move i915tex driver into place as just i915. 2007-09-24 10:03:25 -07:00
Eric Anholt
8fba8d2018 Remove the old i915 driver now that i915tex works without TTM. 2007-09-24 09:56:40 -07:00
Brian
6016de689f fix -D_BSD_SOURC 2007-09-20 18:42:47 -06:00
Brian
58484dc00a Added bluegene-xlc-osmesa config (Alexander Neundorf) 2007-09-20 15:09:57 -06:00
Eric Anholt
eecec25478 Add missing -g in FreeBSD OPT_CFLAGS 2007-09-19 10:51:07 -07:00
Brian
23f71f2ea5 add OSMESA_LIB_NAME 2007-08-03 10:08:39 -06:00
Brian
002942913d added -lm 2007-08-03 07:24:11 -06:00
Brian
2457f4cf67 OSmesa on BlueGene (Alexander Neundorf) 2007-08-02 14:22:02 -06:00
Brian
6fae66715b fix some FreeBSD issues 2007-07-31 14:57:37 -06:00
Brian
58f9f96c68 New sunos5-v9-cc-gcc config (Roland Egger) 2007-07-30 09:01:02 -06:00
Zhang
76fb808910 Fix a number of MINGW32 issues 2007-07-21 11:28:06 -06:00
Eric Anholt
1a413b4d77 Use -pthread instead of -lpthread on FreeBSD. 2007-06-22 11:19:42 -07:00
Dave Airlie
b2dde0a783 miniglx: update defines in linux-solo config 2007-06-05 09:36:28 +10:00
Brian
c128c3ce8c master/trunk is now for Mesa 7.1 devel: bump versions 2007-05-14 14:30:36 -06:00
Dave Airlie
b3378f6cc5 nouveau: disable nouveau build by default
Until this is API/ABI stable building it by default isn't a good idea.
2007-05-05 15:43:01 +10:00
Brian
ae5f67575d Makefile clean-ups for miniglx. 2007-05-04 18:27:12 -06:00
Brian
e371a5f084 Version bumps for 7.0 2007-04-27 17:01:23 -06:00
Jeremy Kolb
838a2a2633 Make xcb backend compile.
Add nouveau to match linux-dri config.
2007-04-20 21:53:38 -04:00
Brian
5dba996dba add glsl to PROGRAM_DIRS 2007-04-08 15:50:31 -06:00
Brian
20d85c609a bump version to 6.5.3 to match version.h 2007-03-28 09:07:41 -06:00
Brian
c4ac5ac9d7 Overhaul of error handling. 2007-02-26 14:32:53 -07:00