i965: Fix Line Stipple enable bit in 3DSTATE_SF for Haswell.

Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Pavel Popov <pavel.e.popov@intel.com>
(cherry picked from commit d292d40207359cc70c004182484aaa939fd29e59)
configure: fix build error with XA

Fixes:

xa_tracker.c: In function 'xa_tracker_create':
 xa_tracker.c:147:5: error: implicit declaration of function 'pipe_loader_drm_probe_fd' [-Werror=implicit-function-declaration]

in some build configurations, as XA now implicitly depends on
gallium_drm_loader.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
(cherry picked from commit 20d14ef2633215c5d24741de76b5d59aa3dcbc22)

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=511700
Requested-by: Matt Turner <mattst88@gmail.com>
mesa/st: fix color outputs in presence of sample mask output

Commit c5d822dad90 added support for sample mask incorrectly. It became
treated as a color output, and messed up the color output indices.
Revert the hunk that did that, and add explicit support just like for
depth/stencil writes.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit ab7bd7093dfd18778ece4ed9098666c9ebc68d51)

Requested-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0: revert mistaken logic to collapse color outputs to the beginning

In commit af38ef907, I added a "fix" to color outputs not being assigned
correctly when sample mask was being output. This was totally wrong --
the color indices (i.e. "si" values) were the ones that were wrong. Undo
that hunk.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 0d699530ff9fe68a1898f875b889422536bfc8e5)

Requested-by: Ilia Mirkin <imirkin@alum.mit.edu>
glapi: Duplicate GLES1 prototypes in glapi_dispatch.c

These prototypes are necessary because GLES1 library builds will create
dispatch functions for them.  We can't directly include GLES/gl.h
because it would conflict the previously-included GL/gl.h.  Since GLES1
ABI is not expected to every add more functions, the path of least
resistance is to just duplicate the prototypes for the functions that
aren't already in desktop OpenGL.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79294
Acked-by: Matt Turner <mattst88@gmail.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 7b1aeec9cd8c9b790d452eaf769ccbce51627908)
i915: add a missing NULL pointer check

mesaVisual can be NULL with configless context since this commit:

    commit 551d459af421a2eb937e9e16301bb64da4624f89
    Author: Neil Roberts <neil@linux.intel.com>
    Date:   Fri Mar 7 18:05:47 2014 +0000

    Add the EGL_MESA_configless_context extension
...
    Previously the i965 and i915 drivers were explicitly creating a zeroed visual
    whenever 0 is passed for the EGLConfig.

We attempt to dereference the visual in i915 and now we don't create a
zeroed-out one one it crashes, breaking at least weston in an i915. There's
no point in doing so as it would be zero anyway.

v2: Fixed a typo in commit message.  Added some tags.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1100967
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 90b5747856dd116e1a7e0fd4a93781400f276c3e)
Bump version to 10.2-rc5

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
force non llvm build

(cherry picked from commit 4230f2e4cc60e8fe5a9861214ba7fd8654aa0b91)
mesa: use c99 functions on non-linux platforms if supported

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
(cherry picked from commit 50fd079317cc051d20c96c16ade1f0de019a64c8)
ax_prog_flex.m4: make grep test more portable

Use grep -w instead of the empty string escape sequences
which are less portable.  Makes the grep test
function as intended on OpenBSD.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
(cherry picked from commit e2e1d03aa2bf6daa776a8114c532508823c6f048)
Revert "fix vdpau interop when using -Bsymbolic-functions in ldflags"

This reverts commit 8c136b53b79e90b9e8f30f891b8bef112fee375d.

no --dynamic-list in OpenBSD ld

(cherry picked from commit 6acadd38211e2ac94865c89f7a82ff3f9bb6ff55)
try to load the correct libGL.so on OpenBSD

(cherry picked from commit 4283ced4c888a8464b0390f21f5ae158d4e6bba5)
ax_prog_flex.m4: handle gflex

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
(cherry picked from commit f6ab61c819c832ee54f6072778c7eee47c22dbba)
r600g/sb: move r600_pipe.h include outside of extern C to fix LLVM build

(cherry picked from commit a53ca7635f035c96a3f1c963022cf7da2ea047d7)
use -fms-extensions so radeonsi will compile without new gcc

https://bugs.freedesktop.org/show_bug.cgi?id=76789
(cherry picked from commit 6fa3f629558cbad9a872f7c4a9613bce41e13cb8)
configure.ac: strip _GNU_SOURCE from llvm-config output

Mesa already defines _GNU_SOURCE for glibc based systems
and defining _GNU_SOURCE will break the Mesa build
on other systems such as OpenBSD.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
(cherry picked from commit 3736bea75573090085d89743b66a334150403828)
use gsed where non posix 'end of word' escape is used

(cherry picked from commit c588dddaa3702f3b5d0e4c90c71e56d693774798)
OpenBSD ports llvm is now a 3.5 snapshot from 20140228

avoid llvm 3.5 codepaths that use changes made after this date

(cherry picked from commit 1633831b047c62a1f119858b03eb6ef73f2f7f49)