mesa: Properly set the fog scale (gl_Fog.scale) to +INF when fog start and end are equal.

This was originally introduced by commit
ba47aabc9868b410cdfe3bc8b6d25a44a598cba2, but unfortunately the commit message
doesn't go into much detail about why +INF would be a problem here.

A similar issue exists for STATE_FOG_PARAMS_OPTIMIZED, but allowing infinity
there would potentially introduce NaNs where they shouldn't exist, depending
on the values of fog end and the fog coord. Since STATE_FOG_PARAMS_OPTIMIZED
is only used for fixed function (including ARB_fragment_program with fog
option), and the calculation there probably isn't very stable to begin with
when fog start and end are close together, it seems best to just leave it
alone.

This fixes piglit glsl-fs-fogscale, and a couple of Wine D3D tests. No piglit
regressions on Cayman.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
docs: Clean up autoconf.html.

Remove long dead options and clarify some things.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69148
Reviewed-by: Brian Paul <brianp@vmware.com>
i965/vec4: Simplify the computation of coord_mask and zero_mask.

We can easily compute these without loops, resulting in simpler and
shorter code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Suggested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
i965/vec4: Only zero out unused message components when there are any.

Otherwise, coordinates with four components would result in a MOV
with a destination writemask that has no channels enabled:

mov(8) g115<1>.F 0D { align16 WE_normal NoDDChk 1Q };

At best, this is stupid: we emit code that shouldn't do anything.
Worse, it apparently causes GPU hangs (observable with Chris's
textureGather test on CubeArrays.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Cc: mesa-stable@lists.freedesktop.org
i965: Add an assertion that writemask != NULL for non-ARFs.

We've observed GPU hangs on Ivybridge from the following instruction:

mov(8) g115<1>.F 0D { align16 WE_normal NoDDChk 1Q };

There should be no reason to ever set the writemask on a destination
register to zero, except for perhaps the ARF NULL register.

This patch adds an assertion to enforce this for non-ARF registers.
Excluding ARFs is conservative yet should still catch the majority
of mistakes.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
st/dri: do not create a new context for msaa copy

Commit b77316ad7594f
    st/dri: always copy new DRI front and back buffers to corresponding MSAA buffers

introduced creating a pipe_context for every call to validate, which is not required
because the callers have a context anyway.

Only exception is egl_g3d_create_pbuffer_from_client_buffer, can someone test if it
still works with NULL passed as context for validate? From examining the code I
believe it does, but I didn't thoroughly test it.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: 9.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Move nv30, nv50 and nvc0 to nouveau.

It is planned to ship openSUSE 13.1 with -shared libs.
nouveau.la, nv30.la, nv50.la and nvc0.la are currently LIBADDs in all nouveau
related targets.
This change makes it possible to easily build one shared libnouveau.so which is
then LIBADDed.
Also dlopen will be faster for one library instead of three and build time on
-jX will be reduced.

Whitespace fixes were requested by 'git am'.

Signed-off-by: Johannes Obermayr <johannesobermayr@gmx.de>
ilo: Fix out-of-tree build.
Suppress clang's warnings about unused CFLAGS and CXXFLAGS.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
configure.ac: Save user {C,CXX}FLAGS and append them at end.

This way the user has the privilege of last decision and so the option to build an optimized debug build again.
radeon: Build and use libradeon the right way.

Better build system integration for:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=91a160b
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b2855b

The EGL runtime issue should be fixed now.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64810
gallium/targets: Make use of prebuilt libdricommon.la.
Drop support for --enable-static / --disable-shared.
gallium/auxiliary: Build libgallium shared.
Drop last parts of compatibility for the old Mesa build system.
mapi: Build libglapi always shared.
mesa: Build libmesa shared.
Install all internal shared libs to $(libdir)/mesa-$VERSION.
Also do it for egl_gallium.so, pipe_*.so and gbm_gallium_drm.
Makefile.am: s:-no-undefined:-Wl,--no-undefined to make it work.