Commit Graph

861 Commits

Author SHA1 Message Date
Marek Olšák 9b67a347f6 configure.ac: consolidate stripping unwanted LLVM flags
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2012-11-29 00:07:27 +01:00
Marek Olšák a84a8da4f8 configure.ac: print LLVM flags
to see what we're mixing with ours

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2012-11-29 00:07:27 +01:00
Johannes Obermayr 53636fdf93 configure.ac: Remove -O., -g and -Wall from LLVM_C{PP,XX}FLAGS.
Signed-off-by: Marek Olšák <maraeo@gmail.com>
2012-11-28 00:19:17 +01:00
Maarten Lankhorst ddb901fbf4 automake: strip LLVM_CXXFLAGS and LLVM_CPPFLAGS too
It seems that -NDEBUG and other flags might still be leaked through
those variables, so strip those off there as well.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2012-11-19 09:43:29 +01:00
Eric Anholt 35fd61bd99 mesa: Import a copy of the open-addressing hash table code I wrote.
Mesa's chaining hash table for object names is slow, and this should be much
faster.  I namespaced the functions under _mesa_*, to avoid visibility
troubles that we may have had before with hash_table_* functions.

v2: Move .c file to main/, const a few things, clean up loop conditions,
    add/extend some comments.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
2012-11-12 15:52:42 -08:00
Eric Anholt 9078441072 automake,android: Build program/ into a helper lib (v2)
While simplifying mesa/Makefile.am, the more important feature of this commit
is allowing a file with the same name to appear in both main/ and program/.

v2: [chadv] Add changes to Android makefiles.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
Signed-off-by: Chad Versace <chad.versace@linux.intel.com> (v2)
2012-11-12 15:52:42 -08:00
Andreas Boll 5ecbc3a9e8 build: fix enable/disable language in ./configure --help
Based on patch from Brian Paul.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32317
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-10 21:32:09 +01:00
Marek Olšák c80ceded6f configure.ac: require libdrm_radeon 2.4.40 2012-11-06 02:36:12 +01:00
Vincent Lejeune 1feb6b79ab configure.ac: Prevent build of radeon llvm backend with llvm < 3.2
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
2012-11-02 23:18:16 +01:00
Thierry Reding 9948a33653 build: Don't cross-compile GLSL builtin compiler
The builtin_compiler binary is used during the build process to generate
code for the builtin GLSL functions. Since this binary needs to be run
on the build host, it must not be cross-compiled.

This patch fixes the build system to compile a second version of the
source files and the builtin_compiler binary itself for the build
system. It does so by defining the CC_FOR_BUILD and CXX_FOR_BUILD
variables, which are searched for by the configure script and point to
the location of native C and C++ compilers.

In order for this to work properly, builtin_function.cpp is removed
from BUILT_SOURCES, otherwise the build system would try to generate it
before having had a chance to descend into the builtin_compiler
subdirectory. With the builtin_compiler and glsl_compiler now being
generated at different stages, the build instructions for glsl_compiler
can be simplified a bit.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-01 18:18:21 -07:00
Matt Turner 9a51edfb5a Re-add HAVE_PTHREADS preprocessor macro
Broken in commit 814345f54b.

NOTE: This is a candidate for the 9.0 branch.
2012-10-22 10:52:47 -07:00
Kristian Høgsberg 259fc154f1 gbm: Use the kms dumb ioctls for cursor instead of libkms
We need to create bos suitable for cursor usage that we can map and
write data into.  The kms dumb ioctls is all we need for this, so drop
the dependency on libkms.
2012-10-21 13:00:49 -04:00
Dmitry Cherkasov b21455f27d configure.ac: Fix LLVM 3.2 r600/radeonsi error message
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Dmitry Cherkasov <Dmitrii.Cherkasov@amd.com>
2012-10-17 17:43:35 -04:00
Kristian Høgsberg 0229e3ae41 egl/wayland: Update to Wayland 0.99 API
The 0.99.0 Wayland release changes the event API to provide a thread-safe
mechanism for receiving events specific to a subsystem (such as EGL) and
we need to use it in the EGL platform.

The Wayland protocol now also requires a commit request to make changes
take effect, issue that from eglSwapBuffers.
2012-10-17 16:32:13 -04:00
Vinson Lee 53e36d333c build: Build on Cygwin with gnu99 instead of c99.
The GCC c99 standard on Cygwin sets __STRICT_ANSI__ and symbols such as
strdup are not available.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-16 23:28:22 -07:00
Daniel Stone 4004620d34 build: Don't fail if libX11 isn't installed
configure.ac would previously refuse to complete if libX11 wasn't
installed, even if we'd disabled GLX and weren't building an X11 EGL
platform.  Make the check simply set the no_x variable that's used (but
never set) immediately below for what looks like this very case.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2012-10-14 20:41:35 -07:00
Eric Anholt da3f7c127b egl: Quit checking for a bug in old xcb when we require new xcb.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09 14:32:02 -07:00
Eric Anholt b477384f40 egl: Drop xcb ifdefs by just requiring a version from this year.
glx and gallium's xcb_dri2 usage already require this version, so this is
nothing really new.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09 14:32:02 -07:00
Eric Anholt bb01f671bb glx: Require xcb_dri2 for building glxdri2.c.
I'm going to transition a bunch of the protocol to using XCB so we can stop
rolling it ourselves.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09 14:32:02 -07:00
Eric Anholt dc6fa41076 glx: Remove the last user of -DUSE_XCB.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09 14:32:02 -07:00
Matt Turner 900cc7cf80 Remove VAAPI support.
Not working and unmaintained.

Reviewed-by: Christian König <christian.koenig@amd.com>
2012-10-09 14:00:05 -07:00
Matt Turner 159ca32fec build: Remove autoconf check for signbit
rebase failure in 7da12426f7.
2012-10-02 22:50:02 -07:00
Matt Turner 523c015246 build: Don't build libdricore if not building classic drivers 2012-10-01 15:23:05 -07:00
Matt Turner 63c3a051cd build: Order src/Makefile correctly 2012-10-01 15:23:04 -07:00
Matt Turner 814345f54b build: Use AX_PTHREAD's HAVE_PTHREAD preprocessor definition 2012-10-01 15:23:04 -07:00
Matt Turner b6651ae6ad build: Use PTHREAD_LIBS and PTHREAD_CFLAGS 2012-10-01 15:23:04 -07:00
Matt Turner dd4fde8f67 build: Set PTHREAD_LIBS for pkgconfig files if empty 2012-10-01 15:20:50 -07:00
Tom Stellard 00d80b3a6f llvmpipe: Fix build with LLVM 2.8
Commit 8d9778589f added all-targets to the
LLVM_COMPONENTS list, but this component does not exist with LLVM 2.8.

Adding all-targets is not necessary for any drivers, and it seems to be
left over from earlier versions of the commit mentioned above.

Tested-by: Stéphane Marchesin <marcheu@chromium.org>
2012-10-01 17:42:56 -04:00
Tom Stellard 67fcb3c2b4 configure.ac: Use amdgpu component for LLVM 3.2
The amdgpu component actually does exist.  I must have been using an
older version of llvm-config by accident when I first made this change.
2012-10-01 21:14:10 +00:00
Tom Stellard 8d9778589f radeon: Support LLVM 3.2
LLVM 3.2 and newer requires that the R600/SI backend be part of the
LLVM tree.
2012-10-01 15:37:17 +00:00
Matt Turner 9ed00075d8 build: Link libglapi with pthreads
NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=839060
          https://bugs.gentoo.org/show_bug.cgi?id=435152
Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-09-27 10:25:26 -07:00
Matt Turner 7da12426f7 build: Use AX_PTHREAD to detect pthreads
NOTE: This is a candidate for the 9.0 branch.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-09-27 10:25:20 -07:00
Brian Paul 24a8e0c3da build: remove signbit check in configure.ac
We now have a fallback macro in imports.h
This reverts part of 0f3ba405.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-09-24 14:48:23 -06:00
Robert Bragg dda49c3cb7 build: substitute X11_INCLUDES variable
There are a few automake files that reference $(X11_INCLUDES) such as
src/glx/Makefile.am but configure.ac wasn't declaring the variable for
substitution. This would break builds of glx if libxcb, for example, was
installed in its own prefix since AM_CFLAGS wouldn't coincidentally
list the needed include path in that case.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-09-24 09:49:53 -07:00
Matt Turner 0f3ba405ea Use signbit() in IS_NEGATIVE and DIFFERENT_SIGNS
signbit() appears to be available everywhere (even MSVC according to
MSDN), so let's use it instead of open-coding some messy and confusing
bit twiddling macros.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54805
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Suggested-by: Ian Romanick <ian.d.romanick@intel.com>
2012-09-24 09:45:17 -07:00
Matt Turner af6aeae4e1 build: Don't list glproto and dri2proto in pkg-config file
No files provided by glproto or dri2proto are needed for building
something with Mesa.

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=342393
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2012-09-12 11:26:28 -07:00
Andreas Boll e81ee67b51 mesa: bump version to 9.1 (devel)
Now that branch 9.0 is created, bump the minor version in
master.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-09 03:00:17 -07:00
Johannes Obermayr 10a96f4a4d Set OSMESA_VERSION=8.
VERSION_NUMBER is not required anymore. So it will be removed.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-09-07 14:44:48 -04:00
Matt Turner 058fb00716 build: Disable building of d3d1x
It's broken and unmaintained, and I'm tired of seeing bug reports about
it.
2012-09-06 16:20:18 -07:00
Tom Stellard d68e337c60 configure.ac: Don't link gallium drivers with libdricore
Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-09-05 14:01:56 -04:00
Matt Turner e0f510b1c9 build: Remove left over echo from GLU removal 2012-08-31 15:12:21 -07:00
Matt Turner b95d598323 Remove libGLU
It's been moved to its own repository, found at
	http://cgit.freedesktop.org/mesa/glu/

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-31 10:58:15 -07:00
Andreas Boll 3678f8904c mesa: also bump version in Makefile.am and configure.ac to 9.0
Signed-off-by: Brian Paul <brianp@vmware.com>
2012-08-31 09:22:16 -06:00
Marek Olšák 1ff5f08823 configure.ac: require libdrm_radeon 2.6.39 for MSAA 2012-08-30 19:43:55 +02:00
Andreas Boll 17f09b664b configure.ac: add radeonsi to --with-gallium-drivers help string
the help string is used by ./configure --help

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-08-28 17:35:36 +02:00
Eric Anholt f0159018d7 i965/gen6+: Add support for GL_ARB_timer_query.
Needs updated libdrm.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-26 10:40:33 -07:00
Jakob Bornecrantz a669a5055e gbm: Use libkms to replace DRI cursor images
Uses libkms instead of dri image cursor. Since this is the only user of the
DRI cursor and write interface we can remove cursor surfaces entirely from
the DRI interface and as a consequence also from the Gallium interface as
well. Tho to make everybody happy with this it would probably should add a
kms_bo_write function, but that is probably wise in anyways.

The only downside is that it adds a dependancy on libkms, this could how ever
be replaced with the dumb_bo drm ioctl interface.

Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2012-08-26 15:39:23 +02:00
Matt Turner 261719b21c automake: convert vgapi 2012-08-24 11:08:19 -07:00
Matt Turner ba4a36d8cd build: Check for bison-generated file before bailing because of no bison
.y/.c was a typo.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-08-24 11:08:19 -07:00
Tapani Pälli 57c57df7b4 mesa/dlopen: use HAVE_DLOPEN instead of _GNU_SOURCE
Patches changes mesa to use 'HAVE_DLOPEN' defined by configure and Android.mk
instead of _GNU_SOURCE for detecting dlopen capability. This makes dlopen to
work also on Android where _GNU_SOURCE is not defined.

[mattst88] v2: HAVE_DLOPEN is sufficient for including dlfcn.h, remove
	       mingw/blrts checks around dlfcn.h inclusion.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
2012-08-24 11:08:19 -07:00
Matt Turner df4dccc7a9 build: Only add links to .so files if we're building them
Xlib-GLX and OSMesa support static building.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53962
2012-08-24 11:08:19 -07:00
Matt Turner a8fd8cb9e7 build: Replace OSMESA_VERSION with generic VERSION_NUMBER
Can be used by other modules.
2012-08-24 11:08:19 -07:00
Matt Turner 383a70bf9a build: Order AC_CONFIG_FILES list
Makefiles before .pc files before directories. Alphabetize files of the
same type.
2012-08-24 11:08:19 -07:00
Matt Turner 8cdce6c136 build: Only build libmesa.la when needed
Namely, for Xlib-GLX, OSMesa, or test programs.
2012-08-24 11:08:19 -07:00
Matt Turner 00f3d9b11a build: Remove duplicate DRI automake conditionals 2012-08-24 11:08:19 -07:00
Matt Turner d23b1b7977 build: Remove GLU_DIRS 2012-08-24 11:08:19 -07:00
Matt Turner a6b8b709cd automake: convert es1api 2012-08-23 09:40:06 -07:00
Matt Turner 0f8110cb0c automake: convert es2api 2012-08-23 09:38:32 -07:00
Matt Turner bee2edbf3d build: Link DRI drivers with dricore in case of no direct rendering
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-22 11:08:06 -07:00
Matt Turner bfd7d6f58b build: Only build libmesagallium.la if building Gallium
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-22 11:08:06 -07:00
Matt Turner d9b109892d build: Put mapi/shared-glapi in CORE_DIRS
SRC_DIRS was overwritten (visible in the second hunk).

Also don't require mapi/shared-glapi to be built for GLES.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-22 11:08:06 -07:00
Matt Turner 8c9b78aad1 build: Only allow shared-glapi with DRI
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-22 11:08:06 -07:00
Matt Turner 32e8ce6d24 build: Set sensible DRI/X11/OSMesa defaults
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-22 11:08:06 -07:00
Matt Turner 53248e5f95 build: Print whether shared-glapi is enabled
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-22 11:08:06 -07:00
Matt Turner be5fe7b320 build: Remove deprecated --with-driver= flag
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-22 11:08:06 -07:00
Matt Turner d12b07eb1a build: Remove EXTRA_LIB_PATH
You can add extra library paths to LDFLAGS directly.
2012-08-16 15:04:54 -07:00
Matt Turner e273ed37ea build: Require X11 pkg-config files 2012-08-16 15:04:53 -07:00
Marek Olšák 2f14202f52 configure.ac: bump libdrm_radeon requirement to 2.6.38 2012-08-15 19:20:57 +02:00
Tom Stellard e98ace934e configure: Check xcb version when X11 pkgconfig exists
Commit 6882381a2e added a dependency on a
newer version of xcb, but the version check wasn't added in all the
necessary places.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-12 15:42:43 -07:00
Chad Versace 996ff1c9bf Revert "mesa: Remove C++11 narrowing warnings"
This reverts commit 9f5a5d541d.

Fixes the following build error on GCC 4.2.3:
  cc1plus: error: unrecognized command line option "-Wno-narrowing"
The GCC Manual incorrectly stated that commit 9f5a5d54 woulde be safe for
old versions of GCC.

Reported-by: Andy Furniss <andyqos@ukfsn.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-10 14:05:14 -07:00
Chad Versace 9f5a5d541d mesa: Remove C++11 narrowing warnings
Add -Wno-narrowing to CXXFLAGS for gcc.

It is safe to add this flag even for versions of gcc that don't recognize
it.  From the GCC Manual [1]: "[GCC] allows the use of new -Wno- options
with old compilers".

This removes warnings of the form
    warning: narrowing conversion of X from 'int' to 'float' inside { } is
    ill-formed in C++11 [-Wnarrowing]
in ff_fragment_shader.cpp and gen6_blorp.cpp of the form.  When building
i965, I observed no other difference in the build output.

[1] http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-10 09:59:41 -07:00
Ian Romanick 9f7b3d1713 Make shared-glapi the default
You can't practically have desktop OpenGL and OpenGL ES on the same system
without this.  The benefits of not having it (e.g., a more compact dispatch
table) are irrelevant.

v2: Don't mark shared-glapi as experimental.  Review suggestion by Chad.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-08 10:06:26 -07:00
Ian Romanick 45d3d0ad21 mesa/tests: Add tests for the generated shared-glapi dispatch table
These are largely based on the src/mapi/glapi/tests.  However,
shared-glapi provides less external visibility into the dispatch table,
so there is less to test.  Also, shared-glapi does not implement
_glapi_get_proc_name, so that test was removed.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-08-08 10:06:26 -07:00
Christian König 41625afa2f radeonsi: initial VDPAU target
Windowed speed is of course way to slow, but fullscreen
works like a charm now.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-08-02 15:15:23 +02:00
Matt Turner 84ead7b4e8 configure.ac: Remove extra ;;
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53053
2012-08-01 10:12:50 -07:00
Matt Turner 33ae29c93b configure.ac: Don't duplicate CFLAGS
These assignments caused CFLAGS specified on the configure line to
appear twice in the final CFLAGS. Removing them makes the behavior
reasonable -- USER_CFLAGS are appended at the end of CFLAGS, allowing
the builder to override flags added by configure.ac like
-fno-strict-aliasing.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-08-01 10:12:50 -07:00
Matt Turner 14819eb588 configure.ac: Remove contractions to stop breaking syntax highlighting
Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-08-01 10:12:50 -07:00
Matt Turner 0e38a3ca52 configure.ac: remove remnants of ppc asm support
Missed by d387899388.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-08-01 10:12:22 -07:00
Adam Jackson 33ef67ab20 linux: Default to dri not xlib on all arches
Even on s390{,x} where there's no video card, you still want this so GLX
protocol works.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-08-01 12:37:25 -04:00
Jon TURNEY 27013e5164 Move installing osmesa.pc to drivers/osmesa
Move installing osmesa.pc to drivers/osmesa, where it belongs better

This also restores the installation of gl.pc if we are building osmesa at the
same time as libGL, which was broken in commit 39785488 when the .pc
installation was converted to automake

v2:
Remove HAVE_OSMESA_DRIVER automake conditional, it's now pointless as we
will only be building in the drivers/osmesa directory if the condition it
checked was true.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-07-31 12:48:33 +01:00
Eric Anholt 11ff18fcf5 automake: Remove OPT_FLAGS.
If you want to change your compiler arguments, just set CFLAGS/CXXFLAGS.
Having Mesa have this separate variable is a great way to have your arguments
not thoroughly propagated to all compiler invocations.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-07-26 17:30:06 -07:00
Eric Anholt 87a1c4f233 automake: Remove ARCH_FLAGS.
In all current uses, it was appended to CFLAGS, which already had -m32.  If
you want to do some other flag supplied to compiler invocations, there's
CFLAGS/CXXFLAGS.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-07-26 17:30:06 -07:00
Jon TURNEY f9089f4022 Remove redundant osmesa shared library install from Makefile.old
Since osmesa now has been converted to Makefile.am, an appropriate install: rule
is generated to install the shared libary, so we no longer need to do that in
src/mesa/Makefile.old

This leaves nothing in src/mesa/Makefile.old but the tags: rule, so move that to
Makefile.am and remove Makefile.old

Also, nothing now uses OSMESA_LIB_GLOB anymore, so remove it

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-07-25 12:41:07 +01:00
Brad King 27382c0f7b automake: Honor GL_LIB for mangled/custom lib names
Commit 2d4b77c7 (automake: Convert src/mesa/drivers/x11/Makefile to
automake, 2012-06-12) dropped the old Makefile, which used GL_LIB, and
replaced it with a Makefile.am hard-coding the name "GL".  This broke
handling of --enable-mangling and --with-gl-lib-name options which
depend on GL_LIB to specify the GL library name.

Use "@GL_LIB@" in src/mesa/drivers/x11/Makefile.am to configure the
library name.  Also use this approach to simplify src/glx/Makefile.am
and drop the HAVE_MANGLED_GL conditional.  While at it, fix the
compatibility link we create in "lib" for the software-only driver to
use version GL_MAJOR instead of hard-coding "1".

Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2012-07-23 22:34:13 -07:00
Tom Stellard 044de40cb0 pipe_loader: Try to connect with the X server before probing pciids v2
When X is running it is neccesary for pipe_loader to authenticate with
DRM, in order to be able to use the device.

This makes it possible to run OpenCL programs while X is running.

v2:
  - Fix C++ style comments
  - Drop Xlib-xcb dependency
  - Close the X connection when done
  - Split auth code into separate function

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2012-07-23 13:25:36 +00:00
Tom Stellard 17f6c9195f configure.ac: Add --with-llvm-prefix option
This option allows you to specify the llvm install prefix.  It is
useful for switching between different versions of LLVM.
2012-07-23 13:25:36 +00:00
José Fonseca bd9bf7a424 autoconf: Only kink mcjit component when available.
Should fix build failures with older LLVM version, but only tested on
LLVM 3.1.
2012-07-21 11:43:35 +01:00
Michel Dänzer 761131ce45 configure.ac: Further LLVM fixups.
* Also add mcjit in the non-OpenCL case.
* Replace hardcoded llvm-config with $LLVM_CONFIG everywhere.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellad <thomas.stellard@amd.com>
2012-07-17 19:12:01 +02:00
Tom Stellard ed41a559dc configure.ac: Add libLLVMMCJIT to the LLVM_LDFLAGS
This is neccessary for linking the llvmpipe tests.  It appears this
dependency was introduced by the "wider native register" changes.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-07-17 12:08:24 -04:00
Jon TURNEY 39d82a1b20 Fix linking gallium drivers and with dricore after defadf2b1
Commit defadf2b1 erroneously tries to make gallium drivers link with libdricore
as a static library, not a shared library

Also, change uses of DRI_LIB_DEPS in gallium driver Makefiles to
GALLIUM_DRI_LIB_DEPS, so the libraries added are used in the linking the gallium
driver

Also, fix the path to the libdricore.so symlink, it's made in LIB_DIR, not in
the libdricore directory

Also repair quoting of dricore settings of DRI_LIB_DEPS and GALLIUM_DRI_LIB_DEPS
variables so VERSION is interpolated in configure but TOP and LIB_DIR are
interpolated later (where they are known, but VERSION isn't)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
2012-07-13 17:20:39 +01:00
Kristian Høgsberg 426a23af14 wayland: Stop trying to use make rules from aclocal, just copy and paste
Defeated by autotool, copy and paste to the rescue.

https://bugs.freedesktop.org/show_bug.cgi?id=51997
https://bugs.freedesktop.org/show_bug.cgi?id=51531

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2012-07-13 11:20:17 -04:00
Jon TURNEY b2a37e242e automake: convert libglapi
* "configure substitutions are not allowed in _SOURCES variables" in automake,
so remove the AC_SUBST'ed GLAPI_ASM_SOURCES and instead use some AM_CONDITIONALS
to choose which asm sources are used

* Change GLAPI_LIB to point to the .la file in other Makefile.am files, and make a link
to the .a file for the convenience of other Makefiles which have not yet been converted
to automake

v2:
- Use AM_CPPFLAGS for cleaner build output
- EXTRA_SOURCES is not needed
- Remove libglapi.a compatibility link on clean

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Matt Turner <mattst88@gmail.com>
2012-07-13 12:44:07 +01:00
Jon TURNEY 1e48dfeee6 Rename X86-64_API -> X86_64_API
automake doesn't allow hyphens in variable names

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Matt Turner <mattst88@gmail.com>
2012-07-13 12:44:05 +01:00
Jon TURNEY defadf2b15 Link dri drivers with mesa or dricore libtool library
Now mesa/drivers/dri is converted to automake, we want to update DRI_LIB_DEPS
so that we link with the libmesa or libdricore libtool library, as appropriate.

However, this is complicated by the fact that gallium/targets is not (yet)
converted, so we can't share the DRI_LIB_DEPS autoconf variable with that anymore.

Add an additional autoconf variable GALLIUM_DRI_LIB_DEPS, which is now used in
gallium/targets/Makefile.dri, to link with the libdircore or libmesa native library.

v2: libdricore$VERSION.a needs to be libdricore$(VERSION).a

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Matt Turner <mattst88@gmail.com>
2012-07-13 12:44:03 +01:00
Jon TURNEY cf362d00b9 Remove unused MESA_MODULES autoconf variable
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Matt Turner <mattst88@gmail.com>
2012-07-13 12:44:01 +01:00
Jon TURNEY 68e04cc601 automake: convert libglsl
v2: Use AM_V_GEN to silence generated code rules. Add BUILT_SOURCES to CLEANFILES
v3:
- Fix an accidental // in a path
- Use automake make rules for lex/yacc rather than writing our own
- Update .gitignore appropriately
- Build a libglcpp convenience library rather than awkwardly including
the files in libglsl and delegating the generation
- Remove libglsl.a compatibility link on clean
v4:
- Automake's rules for lex/yacc make .cc if source is .ll or .yy, and apparently we
must use those extensions "because of scons", so update everywhere glsl_parser.cpp
-> glsl_parser.cc and glsl_lexer.cpp -> glsl_lexer.cc. This fixes 'make tarballs'
and building with dricore enabled.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Matt Turner <mattst88@gmail.com>
2012-07-13 12:43:41 +01:00
Laurent Carlier 284325d97b automake: convert libOSmesa
This also currently fix the installation of libOSmesa.

v2: Remove old Makefile, libOSmesa is now versioned, fix typos
v3: Keep config substitution alphabetized
v4: Update .gitignore
v5: Libraries will be in the builddir, not the srcdir.

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Matt Turner <mattst88@gmail.com>
2012-07-13 12:43:39 +01:00
Eric Anholt 6882381a2e mesa: Require current libxcb.
Without that, people with buggy apps that looked at just the server
string for GLX_ARB_create_context would call this function that just
threw an error when you tried to make a context.  Google shows plenty
of complaints about this.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-12 12:29:12 -07:00
Kenneth Graunke 860d5bdf98 i965: Add hardware context support.
With fixes and updates from Ben Widawsky and comments from Paul Berry.

v2: Use drm_intel_gem_context_destroy to destroy hardware context;
    remove useless initialization of hw_ctx, both suggested by Eric.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Acked-by: Paul Berry <stereotype441@gmail.com>
2012-07-10 15:09:58 -07:00
Tom Stellard ea76f03310 clover: Add --with-clang-libdir option and verify CLANG_RESOURCE_DIR
$CLANG_RESOURCE_DIR is the directory that contains all resources
needed by clang to compile programs.  When clover uses clang to
compile kernels it needs to specify a resource dir, so that clang
can find its internal headers (e.g. stddef.h).

clang defines $CLANG_RESOURCE_DIR as $CLANG_LIBDIR/clang/$CLANG_VERSION

This patch adds the --with-clang-libdir option in order to accommodate
clang intalls to non-standard locations, and it also adds a check
to the configure script to verify that $CLANG_RESOURCE_DIR/include
contains the necessary header files.
2012-06-22 16:59:24 -04:00
Eric Anholt 37c3cbe053 dricore: Turn it into a normal library.
Our intention is still that it's not abi stable, so make the package
version number get included in the library name.  Now you can parallel
install dricore-using drivers from multiple mesa versions.  We can put
it into lib now that we're following library versioning rules
(assuming that ABIs don't change within a single Mesa point release).

LD_LIBRARY_PATH still doesn't work with a non-/, non-/usr prefix
because libtool uses rpath instead of runpath for nonstandard
prefixes.
2012-06-21 10:10:46 -07:00
Eric Anholt 2d51ac84fd mesa: Move GL header installation to automake.
This cuts some cruft related to osmesa where we were being careful to
not install headers twice.
2012-06-21 10:10:46 -07:00
Eric Anholt 417c1a6421 automake: Move the master Mesa makefile to Makefile.old.
This will let me incrementally move stuff to automake without
converting libmesa.a all at once.
2012-06-21 10:10:46 -07:00
Eric Anholt bd18a236de automake: Convert osmesa.pc to be generated by configure. 2012-06-21 10:10:43 -07:00
Eric Anholt fa4cf4dc0c mesa: Convert gl.pc to be generated by configure.
This saves a step of mashing variables around in our Makefile.
2012-06-21 10:10:08 -07:00
Eric Anholt 2d4b77c7c6 automake: Convert src/mesa/drivers/x11/Makefile to automake.
The weird versioning of the libGL where the package version was sort
of expressed as a big integer is dropped.  libtool didn't like the 0
prefix, and it didn't really make sense anyway -- if you interpret it
as an integer version number, old Mesa 071200 was bigger than current
Mesa 08100.  Instead, just bump the minor version and drop the
patchlevel.
2012-06-21 10:09:17 -07:00
Eric Anholt 2fb0f770a4 automake: Convert src/gallium/Makefile to automake. 2012-06-21 10:08:26 -07:00
Eric Anholt 3a70f7526a automake: Convert src/mapi/glapi/gen/Makefile to automake. 2012-06-21 10:08:24 -07:00
Eric Anholt d59149d3f4 automake: Convert src/mesa/drivers/Makefile to automake. 2012-06-21 10:07:38 -07:00
Eric Anholt 9ff2709ca5 automake: Directly generate configs/current instead of symlinking from it. 2012-06-21 10:07:38 -07:00
Eric Anholt 95836b46e7 automake: Convert gen_matypes building to automake. 2012-06-21 10:07:36 -07:00
Eric Anholt e426949cf1 make: Fold ASM_CFLAGS into DEFINES.
Every place that uses ASM_FLAGS already uses DEFINES.  Not including
it in DEFINES is just a way to screw up potential users, as I've done
several times while working on the build system.
2012-06-21 09:58:12 -07:00
Eric Anholt 07b28af5b5 automake: Convert src/egl/Makefile to automake. 2012-06-21 09:58:12 -07:00
Eric Anholt a4ff3342d2 automake: Don't warn on gmake portability issues.
Even pre-automake, we rely on gmake features for pattern
substitutions, and replacing those with reams more make code is not
interesting.  This will let us turn the old Makefiles using pattern
substitutions into automake without spewing warnings.

Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2012-06-21 09:57:52 -07:00
Ian Romanick a29ad2b421 mesa/tests: Add tests for the generated dispatch table
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 13:17:53 -07:00
Ian Romanick 8fecdcc587 mesa/tests: Add tests for _mesa_lookup_enum_by_{name,nr} functions
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 13:14:22 -07:00
Ian Romanick 2e8c866f10 glx: Move tests from tests/glx to src/glx/tests
This matches the organization of other unit tests in Mesa.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:24 -07:00
Kenneth Graunke 4a5d020ee3 automake: Add AM_PROG_AR before LT_INIT to silence a lot of warnings.
The warnings appear to occur with newer automake (probably 1.12).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-06-11 13:27:36 -07:00
Brad King f3cdcb839f configure.ac: Add --with-(gl|glu|osmesa)-lib-name options
These allow one to mangle the library names, without also mangling the
symbol names, to make them distinct from other GL libraries on the
system.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-11 09:28:00 -07:00
Eric Anholt 279efce8bb automake: Merge the dricore libglsl build into libdricore.
Now we have just one library of "all of Mesa core" instead of both
libdricore and libglsl that drivers link against.

I did this change in a sort of nonrecursive make fashion: the
generated files are still produced in the non-automake build, like the
rest of dricore, but the GLSL files are stuffed into libdricore
without building a convenience library in src/glsl (even though we
could now).  This would make a bit more sense if glsl was just another
dir under src/mesa, because right now I had to contort the prefix
variable name to look another ../ level up.
2012-06-11 09:28:00 -07:00
Eric Anholt 7edbf4b323 automake: Convert src/Makefile to automake.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-11 09:28:00 -07:00
Eric Anholt 07abd913b6 automake: Move top-level makefile to automake.
This is part of a series to fix our build issues in the automake case
by hooking up the automatic Makefile regeneration support.  The
extract_git_sha1 is moved into src/mesa/Makefile so that we get
correct dependency generation.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-11 09:28:00 -07:00
Eric Anholt 4038dda6cd mesa: Move the version information right into configure.ac.
Nothing else called version.mk.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-11 09:28:00 -07:00
Kristian Høgsberg 2c4f6ceeb4 configure.ac: Fail if egl x11 platform dependencies are not available
Currently, if you pass --with-egl-platforms=x11 but xcb-dri2 isn't available
we just silently fail and disables building the EGL DRI2 driver.

This commit cleans up the EGL platfrom checking and fails if a selected
platform can't find its required dependencies.

Reviewed-by: Eric Anholt <eric@anholt.net>
2012-06-05 14:34:33 -04:00
Tapani Pälli a9cfd95c24 automake: use -m32 in CCASFLAGS when using --enable-32-bit
this fixes libdricore directory build with --enable-32-bit on a x86_64 system

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-06-01 16:25:39 -07:00
Adam Rak 6a829a1b72 r600g: compute support for evergreen
Tom Stellard:
  - Updated for gallium interface changes
  - Fixed a few bugs:
    + Set the loop counter
    + Calculate the correct number of pipes
  - Added hooks into the LLVM compiler
2012-06-01 11:28:10 -04:00
Tom Stellard 7a6b5d42d8 clover: Link to the necessary LLVM and Clang libs 2012-06-01 11:28:09 -04:00
Tom Stellard d416780f39 configure.ac: Add variables LLVM_CPPFLAGS and LLVM_LIBDIR 2012-06-01 11:28:09 -04:00
Tom Stellard c79e7668b2 configure.ac: Add option for libclc path 2012-06-01 11:28:09 -04:00
Tom Stellard d85e512374 configure.ac: Add HAVE_OPENCL AM_CONDITIONAL v2
v2:
  - Drop HAVE_OPENCL variable for non-automake builds
  - s/HAVE_OPENCL/HAVE_GALLIUM_COMPUTE

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2012-06-01 11:26:57 -04:00
Kenneth Graunke 2224fb6047 automake: Check for 'indent' and fall back to 'cat' if not found.
The glapi generator code uses indent to produce more readable code.
However, we don't want to make GNU indent a hard build dependency; check
for it in configure.ac and fall back to 'cat' if it's not available.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50484
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
2012-05-30 13:39:30 -07:00
Eric Anholt f9d1562f35 automake: Convert dricore building to automake.
This is performed in a subdirectory to avoid needing to convert all of
src/mesa/Makefile in one go.

I can now cherry-pick a commit containing glapi XML changes, do "(cd
src/mapi/glapi/gen && make) && make", and get a working driver.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-05-29 12:39:48 -07:00
Eric Anholt 7d7fe1b037 automake: Rename variables in sources.mak to be automake compatible.
*_SOURCES is reserved for files lists for particular automake targets.
 Also, "-" in the variable names is not allowed.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-05-29 12:39:42 -07:00
Eric Anholt 0ce0f7c0c8 mesa: Remove the generated glapi from source control, and just build it.
Mesa already always depends on python to build.  The checked in
changes are not reviewed (because any trivial change rewrites the
world).  We also have been pushing commits between xml change and
regen where at-build-time xml-generated code disagrees with committed
xml-generated code.  And worst of all, sometimes we ("I") check in
*stale* xml-generated code.

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
2012-05-29 11:51:57 -07:00
Paul Berry ea8e854b2c i965: Completely annotate the batch bo when aub dumping.
Previously, when the environment variable INTEL_DEBUG=aub was set,
mesa would simply instruct DRM to start dumping data to an .aub file,
but we would not provide DRM with any information about the format of
the data in various buffers.  As a result, a lot of the data in the
generate .aub file would be unannotated, making further data analysis
difficult.

This patch causes the entire contents of each batch buffer to be
annotated using the data in brw->state_batch_list (which was
previously used only to annotate the output of INTEL_DEBUG=bat).  This
includes data that was allocated by brw_state_batch, such as binding
tables, surface and sampler states, depth/stencil state, and so on.

The new annotation mechanism requires DRM version 2.4.34.

Reviewed-by: Eric Anholt <eric@anholt.net>
2012-05-22 15:19:00 -07:00
ojab 3d2bf91cc1 Filter out -Wcovered-switch-default from LLVM_CFLAGS
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2012-05-21 08:37:06 +01:00
Homer Hsing 4050756804 configure.ac: Fix typos in the r600-llvm-compiler option
Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
2012-05-15 19:02:27 -04:00
Michel Dänzer 24bc382010 radeonsi: Fixups for recent build infrastructure changes.
In particular for the pipe loader changes.
2012-05-12 12:12:21 +02:00
Tom Stellard 79d77b38b8 clover: Assorted build fixes.
Contains the following patches squashed in:

commit 9fff1dc0875f7c9591550fa3ebbe1ba7a18483fa
Author: Tom Stellard <thomas.stellard@amd.com>
Date:   Tue Mar 20 23:20:03 2012 +0100

    configure.ac: Build gallium loader when OpenCL is enabled

commit 542111cb02957418c6a285cb6ef2924e49adc66e
Author: Tom Stellard <thomas.stellard@amd.com>
Date:   Tue Mar 20 23:30:29 2012 +0100

    configure.ac: Add sw/null to GALLIUM_WINSYS_DIRS for gallium loader

commit 876f8de46062dde76b6075be3b6628f969b16648
Author: Tom Stellard <thomas.stellard@amd.com>
Date:   Thu Feb 9 11:26:05 2012 -0500

    configure.ac: Require gcc > 4.6.0 for clover

commit 99049d50fa3d9a23297ae658189c19c89dca1766
Author: Tom Stellard <thomas.stellard@amd.com>
Date:   Tue Mar 20 23:32:06 2012 +0100

    configure.ac: Require Gallium drm loader when gallium loader is enabled

    No longer silently exclude this when building OpenCL drivers
    for nouveau and r600.
2012-05-11 12:39:44 +02:00
Francisco Jerez c6db1b3396 clover: Import OpenCL state tracker. 2012-05-11 12:39:44 +02:00
Francisco Jerez b52a0f2281 gallium/gbm: Switch to auxiliary/pipe-loader.
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2012-05-11 12:39:44 +02:00
Francisco Jerez 66f7fd99fa gallium/tests/trivial: Switch to the pipe loader.
It simplifies things slightly, and besides, it makes possible to
execute the trivial tests on a hardware device instead of being
limited to software rendering.

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2012-05-11 12:39:44 +02:00
Francisco Jerez e136453062 gallium: Add pipe loader for device enumeration and driver multiplexing.
The goal is to have a uniform interface to create winsys and
pipe_screen instances for any driver, exposing the device enumeration
capabilities that might be supported by the operating system (for now
there's a "drm" back-end using udev and a "sw" back-end that always
returns the same built-in devices).

The typical use case of this library will be:
>
> struct pipe_loader_device devs[n];
> struct pipe_screen *screen;
>
> pipe_loader_probe(&devs, n);
>[pick some device from the array...]
>
> screen = pipe_loader_create_screen(dev, library_search_path);
>[do something with screen...]
>
> screen->destroy(screen);
> pipe_loader_release(&devs, N);
>

A part of the code was taken from targets/gbm/pipe_loader.c, which
will be removed and replaced with calls into this library by a future
commit.
2012-05-11 12:39:43 +02:00
Dylan Noblesmith e4c97f1e60 autoconf: pass -Wall to automake
And fix these warning that appear at autoreconf time:
"`:='-style assignments are not portable"

v2: Fix the recently-converted-to-automake r600.
2012-04-29 11:17:47 +00:00
Tom Stellard ced73ea5df r600g: Add hooks for the LLVM shader compiler
The LLVM backend can now be enabled for r600g by using the
--enable-r600-llvm-compiler configure flag.  If you configure with this
flag, you can still use the default compiler by setting the envrionment
variable R600_USE_LLVM=0

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-04-23 09:34:04 -04:00
Tom Stellard adb8eca1d8 configure.ac: Move HAVE_LLVM definition into configure.ac
Otherwise HAVE_LLVM won't be included in the $(DEFINES) variable for
Automake generated Makefiles.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-04-23 08:53:47 -04:00
Eric Anholt cc7e0de009 glsl: Convert the tests directory to automake.
This runs optimization-test and produces the usual automake test
output, which may be interesting to automated build systems.

This doesn't convert the tests to be individually exposed to the
automake runner, because automake doesn't like wildcards (due to being
nonportable in make, not that we care).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-04-19 16:33:31 -07:00
Dave Airlie b814506e87 configure.ac: add IA64 support.
ia64 on Linux can use DRI as well.

Reported-by: russiane39 on #radeon
Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=48788
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-17 19:59:26 +01:00
Tom Stellard 6077b347ae r600g: Use automake to generate Makefile 2012-04-17 09:54:02 -04:00
Dylan Noblesmith a3d56734df autoconf: add AM_PROG_CC_C_O
Prevents this error with Automake 1.9:

src/gallium/drivers/Makefile.am: C objects in subdir but
`AM_PROG_CC_C_O' not in `configure.ac'
autoreconf: automake failed with exit status: 1

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-04-16 15:45:32 +00:00
Ben Skeggs a2fc42b899 nv30: import new driver for GeForce FX/6/7 chipsets, and Quadro variants
The primary motivation for this rewrite was to have a maintainable driver
going forward, as nvfx was quite horrible in a lot of ways.

The driver is heavily based on the design of the nv50/nvc0 3d drivers we
already have, and uses the same common buffer/fence code.  It also passes
a HEAP more piglit tests than nvfx did, supports a couple more features,
and a few more to come still probably.

The CPU footprint of this driver is far far less than nvfx, and translates
into far greater framerates in a lot of applications (unless you're using
a CPU that's way way newer than the GPUs of these generations....)

Basically, we once again have a maintained driver for these chipsets \o/

Feel free to report bugs now!
2012-04-14 02:56:34 +10:00
Christoph Bumiller 6d1cdec3ba nouveau: switch to libdrm_nouveau-2.0 2012-04-14 02:56:33 +10:00
Ben Skeggs 66c7dc5688 nvfx: completely remove this driver (GeForce FX/6/7)
This driver hasn't been maintained properly for a very long time, and for
many very good reasons.  It's horrible.

A new driver supporting these chipsets will appear with the commits that
port vieux/nv50/nvc0 to libdrm_nouveau-2.0.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-14 02:56:30 +10:00
Ben Skeggs 2e47d01c9e nouveau/vieux: switch to libdrm_nouveau-2.0 2012-04-14 02:56:12 +10:00
Tom Stellard a75c6163e6 radeonsi: initial WIP SI code
This commit adds initial support for acceleration
on SI chips.  egltri is starting to work.

The SI/R600 llvm backend is currently included in mesa
but that may change in the future.

The plan is to write a single gallium driver and
use gallium to support X acceleration.

This commit contains patches from:
Tom Stellard <thomas.stellard@amd.com>
Michel Dänzer <michel.daenzer@amd.com>
Alex Deucher <alexander.deucher@amd.com>
Vadim Girlin <vadimgirlin@gmail.com>

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

The following commits were squashed in:

======================================================================

radeonsi: Remove unused winsys pointer

This was removed from r600g in commit:

commit 96d882939d
Author: Marek Olšák <maraeo@gmail.com>
Date:   Fri Feb 17 01:49:49 2012 +0100

    gallium: remove unused winsys pointers in pipe_screen and pipe_context

    A winsys is already a private object of a driver.

======================================================================

radeonsi: Copy color clamping CAPs from r600

Not sure if the values of these CAPS are correct for radeonsi, but the
same changed were made to r600g in commit:

commit bc1c836938
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Jan 23 03:11:17 2012 +0100

    st/mesa: do vertex and fragment color clamping in shaders

    For ARB_color_buffer_float. Most hardware can't do it and st/mesa is
    the perfect place for a fallback.
    The exceptions are:
    - r500 (vertex clamp only)
    - nv50 (both)
    - nvc0 (both)
    - softpipe (both)

    We also have to take into account that r300 can do CLAMPED vertex colors only,
    while r600 can do UNCLAMPED vertex colors only. The difference can be expressed
    with the two new CAPs.

======================================================================

radeonsi: Remove PIPE_CAP_OUTPUT_READ

This CAP was dropped in commit:

commit 04e3240087
Author: Marek Olšák <maraeo@gmail.com>
Date:   Thu Feb 23 23:44:36 2012 +0100

    gallium: remove PIPE_SHADER_CAP_OUTPUT_READ

    r600g is the only driver which has made use of it. The reason the CAP was
    added was to fix some piglit tests when the GLSL pass lower_output_reads
    didn't exist.

    However, not removing output reads breaks the fallback for glClampColorARB,
    which assumes outputs are not readable. The fix would be non-trivial
    and my personal preference is to remove the CAP, considering that reading
    outputs is uncommon and that we can now use lower_output_reads to fix
    the issue that the CAP was supposed to workaround in the first place.

======================================================================

radeonsi: Add missing parameters to rws->buffer_get_tiling() call

This was changed in commit:

commit c0c979eebc
Author: Jerome Glisse <jglisse@redhat.com>
Date:   Mon Jan 30 17:22:13 2012 -0500

    r600g: add support for common surface allocator for tiling v13

    Tiled surface have all kind of alignment constraint that needs to
    be met. Instead of having all this code duplicated btw ddx and
    mesa use common code in libdrm_radeon this also ensure that both
    ddx and mesa compute those alignment in the same way.

    v2 fix evergreen
    v3 fix compressed texture and workaround cube texture issue by
       disabling 2D array mode for cubemap (need to check if r7xx and
       newer are also affected by the issue)
    v4 fix texture array
    v5 fix evergreen and newer, split surface values computation from
       mipmap tree generation so that we can get them directly from the
       ddx
    v6 final fix to evergreen tile split value
    v7 fix mipmap offset to avoid to use random value, use color view
       depth view to address different layer as hardware is doing some
       magic rotation depending on the layer
    v8 fix COLOR_VIEW on r6xx for linear array mode, use COLOR_VIEW on
       evergreen, align bytes per pixel to a multiple of a dword
    v9 fix handling of stencil on evergreen, half fix for compressed
       texture
    v10 fix evergreen compressed texture proper support for stencil
        tile split. Fix stencil issue when array mode was clear by
        the kernel, always program stencil bo. On evergreen depth
        buffer bo need to be big enough to hold depth buffer + stencil
        buffer as even with stencil disabled things get written there.
    v11 rebase on top of mesa, fix pitch issue with 1d surface on evergreen,
        old ddx overestimate those. Fix linear case when pitch*height < 64.
        Fix r300g.
    v12 Fix linear case when pitch*height < 64 for old path, adapt to
        libdrm API change
    v13 add libdrm check

    Signed-off-by: Jerome Glisse <jglisse@redhat.com>

======================================================================

radeonsi: Remove PIPE_TRANSFER_MAP_PERMANENTLY

This was removed in commit:

commit 62f44f670b
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Mar 5 13:45:00 2012 +0100

    Revert "gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY"

    This reverts commit 0950086376.

    It was decided to refactor the transfer API instead of adding workarounds
    to address the performance issues.

======================================================================

radeonsi: Handle PIPE_VIDEO_CAP_PREFERED_FORMAT.

Reintroduced in commit 9d9afcb5ba.

======================================================================

radeonsi: nuke the fallback for vertex and fragment color clamping

Ported from r600g commit c2b800cf38.

======================================================================

radeonsi: don't expose transform_feedback2 without kernel support

Ported from r600g commit 15146fd1bc.

======================================================================

radeonsi: Handle PIPE_CAP_GLSL_FEATURE_LEVEL.

Ported from r600g part of commit 171be75522.

======================================================================

radeonsi: set minimum point size to 1.0 for non-sprite non-aa points.

Ported from r600g commit f183cc9ce3.

======================================================================

radeonsi: rework and consolidate stencilref state setting.

Ported from r600g commit a2361946e7.

======================================================================

radeonsi: cleanup setting DB_SHADER_CONTROL.

Ported from r600g commit 3d061caaed.

======================================================================

radeonsi: Get rid of register masks.

Ported from r600g commits
3d061caaed13b646ff40754f8ebe73f3d4983c5b..9344ab382a1765c1a7c2560e771485edf4954fe2.

======================================================================

radeonsi: get rid of r600_context_reg.

Ported from r600g commits
9344ab382a1765c1a7c2560e771485edf4954fe2..bed20f02a771f43e1c5092254705701c228cfa7f.

======================================================================

radeonsi: Fix regression from 'Get rid of register masks'.

======================================================================

radeonsi: optimize r600_resource_va.

Ported from r600g commit 669d8766ff.

======================================================================

radeonsi: remove u8,u16,u32,u64 types.

Ported from r600g commit 78293b99b2.

======================================================================

radeonsi: merge r600_context with r600_pipe_context.

Ported from r600g commit e4340c1908.

======================================================================

radeonsi: Miscellaneous context cleanups.

Ported from r600g commits
e4340c1908a6a3b09e1a15d5195f6da7d00494d0..621e0db71c5ddcb379171064a4f720c9cf01e888.

======================================================================

radeonsi: add a new simple API for state emission.

Ported from r600g commits
621e0db71c5ddcb379171064a4f720c9cf01e888..f661405637bba32c2cfbeecf6e2e56e414e9521e.

======================================================================

radeonsi: Also remove sbu_flags member of struct r600_reg.

Requires using sid.h instead of r600d.h for the new CP_COHER_CNTL definitions,
so some code needs to be disabled for now.

======================================================================

radeonsi: Miscellaneous simplifications.

Ported from r600g commits 38bf276348 and
b0337b679a.

======================================================================

radeonsi: Handle PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION.

Ported from commit 8b4f7b0672.

======================================================================

radeonsi: Use a fake reloc to sleep for fences.

Ported from r600g commit 8cd03b933c.

======================================================================

radeonsi: adapt to get_query_result interface change.

Ported from r600g commit 4445e170be.
2012-04-13 10:32:06 -04:00
Eric Anholt 94726d263e glx: Hook up the unit tests again using the internal gtest.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-04-12 17:18:00 -07:00
Eric Anholt 19a4c0646b gtest: Build as a convenience library.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-04-12 17:17:43 -07:00
Alexandre Demers 3ea3695b04 st/xvmc: fix library installation dir
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=47878

v2: some reordering and while at it also fix the
    comment in Makefile.xvmc

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-04-04 10:57:50 +02:00
Tom Stellard 7d87c71a70 configure: Add --with-llvm-shared-libs
This option allows targets to link against the LLVM shared library
instead of the static libs.  With LLVM 2.9, his saves ~11 MB for each of
the r300 target libraries.
2012-03-30 09:13:04 -04:00
Christian König fc0a5e21d7 vl: move winsys helper out of winsys directory
They aren't winsys of their own,
just help dealing with them.

v2: add some more comments in vl_winsys.h

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-28 15:47:41 +02:00
Eric Anholt 218f3a5663 intel: Bump libdrm requirement to 2.4.32.
We'll need this for AUB dumping and unsynchronized maps.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-21 12:45:05 -07:00
Kristian Høgsberg ca760181b4 shared-glapi: Convert to automake
This fixes a build problem where EGL links to libgbm.la, which encodes
a relative path to it's libglapi.so dependency.  The relative path
breaks when the linker tries to resolve it from src/egl/main instead
of src/gbm.  Typically we silently fall back to the system
libglapi.so, which is wrong and breaks when there isn't one.

Morale of the story: don't mix mklib and libtool.
2012-03-19 11:13:06 -04:00
Tom Stellard dc382e5c35 noop: Use non-recursive automake 2012-03-14 10:25:59 -04:00
Tom Stellard 3f3f10f78c identity: Use non-recursive automake 2012-03-14 10:25:59 -04:00
Tom Stellard 26ab747284 galahad: Use non-recursive automake 2012-03-14 10:25:59 -04:00
Tom Stellard fe3f98ed70 gallium/drivers: Use automake to generate makefile 2012-03-14 10:25:59 -04:00
Christian König 66480c0f56 vl: use SwapBuffers instead of CopyBuffers
This should speed things up a bit, but also shows
some bugs with the kernel implementation.

v2: require xcb-dri2 version 1.8

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-01 15:06:46 +01:00
Christian König 80b40a4841 vl: rewrite vl DRI backend using XCB
v2: also set array_size of texture

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-01 14:37:44 +01:00
Eric Anholt e5f895485e egl/drivers: Convert to automake.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-29 11:52:41 -08:00
Eric Anholt 88612029f6 egl/main: Convert to automake.
The drivers/ walk-through-subdirs makefile is converted as well so I
didn't need to keep EGL_DRIVERS_DIRS along with the per-driver
HAVE_EGL_DRIVER_WHATEVER.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-29 11:52:40 -08:00
Eric Anholt 28d92eff73 egl: Clean up some flow of EGL platform handling.
The default case code was set up in a separate way, while this makes
it more normal.  I wanted to add code to the explicit x11 platform and
default x11 platform cases in the next commit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-29 11:52:40 -08:00
Eric Anholt 8ffb098234 glx: Convert to automake.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-29 11:52:40 -08:00
Tom Stellard e6fa2d89e1 r300g: Use automake to generate Makefile v3
v2:
  - s/$(top_builddir)/$(top_srcdir)/
  - Always generate Makefile.in

v3:
  - Fixes from Matt Turner
  - Use Mesa CFLAGS
2012-02-26 15:13:47 -05:00
Christian König dcf8ee7d6a st/xvmc: move xvmc state tracker out of xorg subdir
The xvmc state tracker is completely seperate and
doesn't shares code or anything else with the
xorg state tracker.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-25 12:14:26 +01:00
Chia-I Wu 50683d2aa6 mesa: enable remap table when --enable-shared-glapi
As libGL will use libglapi for function lookups, we need to enable the remap
table.

Tested-by: Brian Paul <brianp@vmware.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45660
2012-02-09 10:39:50 -05:00
Jerome Glisse c0c979eebc r600g: add support for common surface allocator for tiling v13
Tiled surface have all kind of alignment constraint that needs to
be met. Instead of having all this code duplicated btw ddx and
mesa use common code in libdrm_radeon this also ensure that both
ddx and mesa compute those alignment in the same way.

v2 fix evergreen
v3 fix compressed texture and workaround cube texture issue by
   disabling 2D array mode for cubemap (need to check if r7xx and
   newer are also affected by the issue)
v4 fix texture array
v5 fix evergreen and newer, split surface values computation from
   mipmap tree generation so that we can get them directly from the
   ddx
v6 final fix to evergreen tile split value
v7 fix mipmap offset to avoid to use random value, use color view
   depth view to address different layer as hardware is doing some
   magic rotation depending on the layer
v8 fix COLOR_VIEW on r6xx for linear array mode, use COLOR_VIEW on
   evergreen, align bytes per pixel to a multiple of a dword
v9 fix handling of stencil on evergreen, half fix for compressed
   texture
v10 fix evergreen compressed texture proper support for stencil
    tile split. Fix stencil issue when array mode was clear by
    the kernel, always program stencil bo. On evergreen depth
    buffer bo need to be big enough to hold depth buffer + stencil
    buffer as even with stencil disabled things get written there.
v11 rebase on top of mesa, fix pitch issue with 1d surface on evergreen,
    old ddx overestimate those. Fix linear case when pitch*height < 64.
    Fix r300g.
v12 Fix linear case when pitch*height < 64 for old path, adapt to
    libdrm API change
v13 add libdrm check

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-06 18:36:37 -05:00
Jon TURNEY ffc8494db5 dri: Don't build libdricommon.la if we don't need it
Refine 80aa78142d "dri: make sure to build libdricommon.la"
so we don't build libdricommon if we aren't building a dri driver which needs it (i.e.
if we are just building swrast)

In particular, this restores the ability to build the swrast dri driver without having to
have a xf86drm.h

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-02-06 11:10:51 +00:00
Eric Anholt b3c84a80cd mesa: Fix xcb-dri2 link flags leaking into LIBS.
Fixes the build of builtin_compiler on my 32-bit build where xcb-dri2
is in a custom prefix but the custom prefix flags weren't available.
It shouldn't have been in LIBS anyway.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-04 22:04:35 +01:00
Colin Walters 0d736b2076 build: Note that we don't support srcdir != builddir
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-01 15:02:29 +00:00
Matt Turner 7ef94c6a0b Revert "automake: src/mesa/drivers/osmesa"
This reverts commit 275ac7e5c1.
2012-01-31 21:34:42 -05:00
Matt Turner a99164956f Revert "automake: src/glsl and src/glsl/glcpp"
This reverts commit 9947656168.
2012-01-31 21:33:59 -05:00
Matt Turner 8c436b4ea6 Revert "Make sure libGL.so links with libglsl"
This reverts commit f53e7e981e.
2012-01-31 21:33:07 -05:00
Matt Turner f53e7e981e Make sure libGL.so links with libglsl
Can't link against *.la files if we're not using libtool to link.

Fixes undefined symbol: _ZN23ir_hierarchical_visitor5visitEP11ir_variable
2012-01-31 12:04:19 -05:00
Matt Turner 9947656168 automake: src/glsl and src/glsl/glcpp
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2012-01-30 21:09:38 -05:00
Matt Turner dfb6142548 autoconf: use AC_PROG_YACC/LEX
Needed for automake. Using AC_PROG_PATH(bison/flex) causes automake to
fail to build .y and .l files.

It is up to the builder to use bison/flex instead of yacc/lex.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2012-01-30 21:09:32 -05:00
Matt Turner 275ac7e5c1 automake: src/mesa/drivers/osmesa 2012-01-30 21:09:18 -05:00
Eric Anholt b9aab8b3b3 autoconf: Enable missing-prototypes errors when available.
After the removal of the dri driver link test, this should help avoid
the original problem that it was designed to catch: The warning about
a missing prototype due to typoing a function name scrolling by in the
Mesa build spew, and you not noticing until you try to run an
application and it falls back to swrast.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-30 11:32:54 -08:00
ojab 25ee5a27f3 Use only native engine & bitwriter LLVM libraries for linking.
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2012-01-30 18:51:59 +00:00
Jeremy Huddleston b728eefb06 configure.ac: Don't use $CLANG since it will collide with the static analyzer.
We just prefix the $CLANG environment variable in configure.ac with acv_mesa_

Found by: tinderbox
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-27 09:04:13 -08:00
Matt Turner 0c17823167 configure.ac: remove shared/static options
now that libtool provides them.
2012-01-26 19:36:52 -05:00
Matt Turner 80aa78142d dri: make sure to build libdricommon.la 2012-01-26 19:32:16 -05:00
Benjamin Franzke 412042523e configure: Use WAYLAND_SCANNER_RULES only if available
This has the drawback that when creating configure for
distribution, wayland needs to be available for the packager.

Also the the macros has the wayland prefix hardcoded, so
we cant copy it in mesa right now.
2012-01-26 11:49:47 +01:00
Benjamin Franzke 8b902056d5 automake: src/egl/wayland
So we can use the wayland scanner makro, which is way
better than our previous runtime-pkgconfig hack.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-01-26 10:07:11 +01:00
Christian König c2e2b58a58 st/xvmc: remove xorg-server dependency
Fixing a circular build dependency.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-01-25 10:34:26 +01:00
Matt Turner 027ce0c493 Revert "Always build shared glapi"
This reverts commit adefee50d9.

Shared glapi was never tested with --enable-xlib-glx and turns out
to cause a lot of problems.

Conflicts:

	configure.ac
2012-01-24 11:34:42 -05:00
Matt Turner 06ad64ad29 automake: src/gbm
libgbm.so.1.0.0 (instead of libgbm.so.1.0) is installed now
along with libgbm.so.1 (no change).
2012-01-23 15:18:12 -05:00
Eric Anholt 36473395f1 autoconf: Fix build of dri symbols test to not manually link expat.
AC_CHECK_LIB has this nasty behavior, like the cflags tests, of
automatically putting the tested value into the global LIBS on
success.  This caused -lexpat to end up in LIBS, but without the
--with-expat dir, so my 32-bit build on a 64 system using expat from a
custom prefix could only find the system expat and fail to link on the
one current consumer of the LIBS variable: the dri driver test link.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-23 11:34:05 -08:00
Jon TURNEY 0fce6d3a77 Don't build shared dricore when unneeded
Refine "always build shared dricore" so we don't build it if we don't need
it because we aren't actually building any dri drivers because of --disable-driglx-direct

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-01-23 18:17:48 +00:00
Matt Turner fd827a8d3e configure.ac: use AC_PROG_MKDIR_P
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45057
2012-01-21 22:43:54 -05:00
Matt Turner d387899388 Remove src/mesa/ppc
It didn't actually do anything except modify the GL_RENDERER string.
2012-01-21 22:43:54 -05:00
Matt Turner 129213e7a2 automake: src/mesa/drivers/dri 2012-01-20 15:54:08 -05:00
Matt Turner 349845f7b2 automake: src/mesa/drivers/dri/swrast 2012-01-20 15:54:08 -05:00
Matt Turner 3f96434f86 automake: src/mesa/drivers/dri/nouveau 2012-01-20 15:54:08 -05:00
Matt Turner b38d7a0a24 automake: src/mesa/drivers/dri/r200 2012-01-20 15:54:08 -05:00
Matt Turner e0ee818e2f automake: src/mesa/drivers/dri/radeon 2012-01-20 15:54:08 -05:00
Matt Turner 3c87dfce40 automake: src/mesa/drivers/dri/i915 2012-01-20 15:54:08 -05:00
Matt Turner 2b3a8cbc89 Always build shared dricore
Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2012-01-20 14:56:42 -05:00
Matt Turner adefee50d9 Always build shared glapi
libglapi.so, libGL.so, libGLESv2.so, libGLESv1_CM.so must all
come from the same version of Mesa or bad things may happen.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2012-01-20 14:56:42 -05:00
Matt Turner 2fdbbeca43 Remove -ffast-math from default CFLAGS
Fixes glsl-const-folding-01. inversesqrt(1.0) != 1.0 was evaluating as
true.

Signed-off-by: Matt Turner <mattst88@gmail.com>
2012-01-20 14:56:14 -05:00
Eric Anholt 7fa5c919b0 mesa: Enable silent automake rules when available.
Finally, a quiet build for the i965 driver, at least!  (Note, you can
still get verbose builds at build-time by saying "make V=1")

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-17 10:35:24 -08:00
Eric Anholt e326480e4e i965: Convert the build to using automake.
This does introduce a warning by the automake build system, that the
missing-symbols test build is non-portable.  That's true -- Mac OS X
can't take something built as a loadable module and just link it as a
library.  Of course, we aren't building this on OS X at all, so it
would be nice to be able to suppress it, but I haven't found a way.

Still, the build is going to be much quieter than we have ever had
before, so I think this is a fair tradeoff until we find a way to shut
that warning up.

v2: Put a link in /lib to avoid transition pains for people.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
Reviewed-by: Matt Turner <mattst88@gmail.com> (v1)
2012-01-17 10:35:24 -08:00
Thomas Hellstrom 87118d84ff configure: Add the svga gallium driver to the default gallium drivers
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2012-01-12 13:31:34 +01:00
Matt Turner 3a343ef346 configure.ac: use AC_PROG_SED
It looks like AC_PROG_SED was added in 2.59b, and wasn't in the
original 2.59 in the original 2.59.  Presumably that's why, though
it could've been an oversight.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2012-01-11 15:49:56 -05:00
Matt Turner 198892c044 configure.ac: don't set HAVE_GTEST twice
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2012-01-11 15:49:56 -05:00
Kenneth Graunke de88e00c94 configure.ac: Remove unused GLUT substitutions.
GLUT was removed from the main tree a while ago; nothing uses these
substitutions.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-01-06 18:16:10 -08:00
Eric Anholt c4089d444a i965/gen7: Use the updated interface for SO write pointer resetting.
The new kernel patch I submitted makes the interface opt-in, so all
batchbuffers aren't preceded by the 4 MI_LOAD_REGISTER_IMMs.  This
requires the updated i915_drm.h present in libdrm 2.4.30.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-06 09:16:32 -08:00
ojab 2fe6c254f7 Strip LLVM svn rev from `llvm-config --version` output.
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
2012-01-05 22:44:16 -08:00
Kenneth Graunke 9d21b5dd26 Revert "configure.ac: remove deprecated --with-driver="
This reverts commit 5a478976ae.

It broke the build.  DRI drivers were no longer being installed by
`make install` (and probably not being built at all).  It appears to be
due to a few small, subtle mistakes, and the fix isn't clear enough to
simply commit without going through review.  In the meantime, revert it.
2012-01-04 23:49:18 -08:00
Matt Turner 5172383de0 configure.ac: bump AC_PREREQ to 2.60
All other xorg modules require at least 2.60 (released in 2006), so we
may as well increase it to match.  It's also doubtful anyone tests the
build with 2.59 (from 2003), so it may not even work anyway.
2012-01-04 19:23:39 -08:00
Matt Turner 5a478976ae configure.ac: remove deprecated --with-driver=
See 9e7a4147.
2012-01-04 19:23:22 -08:00
Ian Romanick 4becf676e0 glx: More hacking around versions of XCB that lack GLX_ARB_create_context support
Detect whether a new enough version of XCB is installed at configure
time.  If it is not, don't enable the extension and don't build the
unit tests.

v2: Move the AM_CONDIATION outside the case-statement so that it is
invoked even for non-GLX builds.  This prevents build failures with
osmesa, for example.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Robert Hooker <robert.hooker@canonical.com>
2012-01-04 12:43:10 -08:00
Matt Turner 2f1ab63fab configure.ac: fix typo from 3ef3ba4d2 2012-01-03 21:58:37 -05:00
Ian Romanick b518dfb513 mesa: XCB is no longer optional for GLX or DRI
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-03 10:24:01 +00:00
Ian Romanick 3ef3ba4d2e tests/glx: Add unit tests for GLX_ARB_create_context GLX protocol
This adds a new tests directory at the top-level and some extra build
infrastructure.  The tests use the Google C++ Testing Framework, and
they will only be built if configure can detect its availability.  The
tests are automatically wired-in to run with 'make check'.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Chad Versace <chad.versace@linux.intel.com>
2012-01-02 12:41:45 -08:00
Johannes Obermayr aa284042a3 Fix build with LLVM >= r145623.
This is a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=43861.

Actually the issue which makes -pedantic failing should be solved.

Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-12-26 16:12:10 -07:00
Kai Wasserbäch 0a22fb6a5d gallium/failover: Remove the deprecated module.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2011-11-30 17:26:40 +00:00
Kai Wasserbäch 2c27f204f1 i965g: Delete this driver.
Never completed, and no plans to do so.

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2011-11-29 15:44:09 +00:00
Daniel Vetter 8f15c31338 gallium/i965g: hide that utterly broken driver better
And warn loudly in case people want to use it. Too many tester report
gpu hangs on irc and we rootcause this ...

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2011-11-28 23:54:47 +01:00
Thomas Hellstrom 32b1641a59 st/xa, xa/vmwgfx: Generate exported symbol list from the st/xa symbols.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-25 16:38:36 +01:00
Chia-I Wu 95ef069e1c configure.ac: gbm_gallium requires DRI_LIB_DEPS to link
gbm_gallium does not depend on DRI, but its build rules depend on DRI_LIB_DEPS
being set.  Output an error when the user enables gbm_gallium but disables
DRI.  This is just a workaround.
2011-11-05 15:15:21 +08:00
Chia-I Wu 0c771e260b shared-glapi: fix a linking error for SELinux
Link with -lselinux when SELinux is enabled.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41571
2011-11-05 14:42:05 +08:00
Eric Anholt 3faf56ffbd intel: Add an interface for saving/restoring the batchbuffer state.
This will be used to avoid the prepare() step in the i965 driver's
state setup.  Instead, we can just speculatively emit the primitive
into the batchbuffer, then check if the batch is too big, rollback and
flush, and replay the primitive.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:15:56 -07:00
Eric Anholt 830e546f94 radeon: Insist on libdrm being present to build.
There's no sense in building a broken driver.  Previously, there was
the potential of building a DRI1-only driver that would work for DRI1
and fail on DRI2 because the newer libdrm code wasn't present.  Now
the radeon build system should be matching intel and nouveau.
2011-10-28 11:32:00 -07:00
Eric Anholt 48c9925367 configure.ac: Fix equality checks in gallium st setup. 2011-10-28 11:31:11 -07:00
Eric Anholt 2f4c7ebea6 mesa: Remove build infrastructure for r300c and r600c.
These drivers have been superseded by the gallium equivalents.
2011-10-28 11:19:56 -07:00
Maarten Lankhorst df8f864bf6 gallium/targets: Add vdpau target for nouveau
Should fall back to shader based decoding (g3dvl) for now.

This is probably broken on systems that support xvmc, because
nouveau_video_buffer_create has no way to know for what api
the buffer is created, so I think this call might need a
separate argument as workaround.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2011-10-21 23:39:01 +02:00
Marcin Slusarz 757390491c gallium/targets: use c++ compiler for linking
As pointed out by Michel Dänzer, gcc -lstdc++ doesn't work on all systems,
because it may require other libraries which are only pulled in implicitly
by g++. And libstdc++ is available only with GNU compiler.

Use c++ compiler for linking and remove redundant LDFLAGS += -lstdc++
all over the tree.
2011-10-17 22:57:27 +02:00
Tom Fogal c0573fb29d Add an autoconf option for mangling Mesa.
In addition to setting up the flags correctly, this renames the
generated libraries to ensure they get 'Mangled' in the name.
This is very useful for distros and the like, where mangled Mesa
and non-mangled GL libraries typically need to be installed
side-by-side.

Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2011-10-17 10:14:26 -06:00
José Fonseca 1448bdf1c0 configure: Use -fno-builtin-memcmp.
Issue spotted by Adam Jackson <ajax at redhat.com>.

http://lists.freedesktop.org/archives/mesa-dev/2011-June/009077.html
2011-10-16 16:11:46 +01:00
Marek Olšák bf0baa7717 r600g: move all files from winsys/r600 into drivers/r600
Be sure to reconfigure after this commit.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-09-30 23:19:52 +02:00
Thomas Hellstrom d742a64909 xorg/vmwgfx: Kill this target. It's not used anymore.
This fixes a build error introduced with commit
"winsys/svga: Update to vmwgfx kernel module 2.1"
if both the svga driver and the xorg state tracker was enabled
at the same time.

If needed we can re-add a minimal target for basic functionality.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-09-30 09:30:59 +02:00
Marek Olšák 3c79962378 configure.ac: unduplicate gallium directories
It may happen when two drivers share one winsys.
2011-09-29 01:09:35 +02:00
Chia-I Wu a5f8d37be1 st/egl: add support for null platform
The backend calls null_sw_create() to create sw_winsys.  And that is
pretty much it...
2011-09-20 17:44:20 +08:00
Matt Turner f534c13413 Remove unused APP_LIB_DEPS variable
Unused since removal of demos from the repository?

Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-19 07:39:19 -06:00
Ian Romanick e4344161bd dri: Remove all DRI1 drivers
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Marek Olšák <maraeo@gmail.com>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Build-Tested-by: Jakob Bornecrantz <jakob@vmware.com>
Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-08-26 23:31:22 -07:00
Michel Dänzer 433c740c1a r600g: Hook up xorg state tracker.
Mostly copied from r300g.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-26 18:21:38 +02:00
Marek Olšák ce12f82692 r600g: first step into winsys/radeon
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Kenneth Graunke 63720114b4 glw: Remove GLw source.
libGLw is an old OpenGL widget library with optional Motif support.
It almost never changes and very few people actually still care about
it, so we've decided to ship it separately.

The new home for libGLw is: git://git.freedesktop.org/mesa/glw/

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-15 13:37:09 -07:00
Benjamin Franzke 85fe948494 egl: Native Display autodetection
EGL doesnt define howto manage different native platforms.
So mesa has a builtime configurable default platform,
whith non-standard envvar (EGL_PLATFORM) overwrites.
This caused unneeded bugreports, when EGL_PLATFORM was forgotten.

Detection is grouped into basic types of NativeDisplays (which itself
needs to be detected).  The final decision is based on characteristcs
of these basic types:

  File Desciptor based platforms (fbdev):
    - fstat(2) to check for being a fd that belongs to a character device
    - check kernel subsystem (todo)

  Pointer to structuctures (x11, wayland, drm/gbm):
    - mincore(2) to check whether its valid pointer to some memory.
    - magic elements (e.g. pointers to exported symbols):
      o wayland display stores interface type pointer (first elm.)
      o gbm stores pointer to its constructor (first elm.)
      o x11 as a fallback (FIXME?)

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2011-08-15 09:42:16 +02:00
Marek Olšák 0aed27ee37 configure.ac: add DLOPEN_LIBS to xlib build
Otherwise xlib-based llvmpipe fails to link.

NOTE: This is a candidate for the 7.11 branch.
2011-07-28 00:25:28 +02:00