darwin: Unlock our mutex before destroying it

http://xquartz.macosforge.org/trac/ticket/575

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit a73a800b3200d21c32fac9f28e2f86919bc0a2ba)
darwin: Eliminate a possible race condition while destroying a surface

Introduced by: c60ffd2840036af1ea6f2b6c6e1e9014bb8e2c34
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit d65bd195ecbd6623b962a3c98725a484ef2791a8)
intel: add PCI IDs for Ivy Bridge GT2 server variant

Those IDs are used by Bromolow.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>

(cherry picked from commit a45247fb1b8c30c5be21c3baf84943920ae17bfb)

Conflicts:
	include/pci_ids/i965_pci_ids.h
r600g: add missing case for uint->flt conversion.

fixes some piglits like vs-decrement-uint.shader_test

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 55bd1c8365baa5f21e79eace2bbce1413e38bfb8)
r600g: fix r600 f2i to be trans only emitted.

This fixes a lot of asserts about the trans unit being used already.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit bfcffd4d721d87bb6287980a09e0296ceed0bba3)
r600g: add r600 version of UINT_TO_FLT conversion.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit faa90abfe0b6f55ab69768eb930b4ab5ef21cb06)
r600g: make u2f trans only

as per the r600 isa doc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 9a401a2fd6c2d9aa07402e33493be3f014c0fe10)
r600g: fix mullo_uint trans slot only on r600/r700

This fixes 8 piglit tests that currently assert.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 850021f225f312d55fb6a24a8cef805f527510af)
i915g: Fix the blending for the A8 destination buffer case.

The i915 GPU can't do A8 dst, so we abuse GREEN8 buffers for that
purpose. However, things get hairy as we start to do blending,
because then GL_DST_*_ALPHA should be replaced with GL_DST_*_COLOR.
This is what we do here.

Fixes piglt fbo-alpha.
(cherry picked from commit 23d4a0569dcb70bdfd748bf7e1f5102289bfad6b)
r600g: fix USLT for r600-eg
(cherry picked from commit 7383e754b70414b35c10c216034a8dc95f6f67b4)

Conflicts:

	src/gallium/drivers/r600/r600_shader.c

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
r600g: fix recip_uint on r600.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit ba59a1a0d817566576e20e66d74f1917d958119e)
r200: fix fog coordinate emit

Noticed by dungeon on phoronix:
http://phoronix.com/forums/showthread.php?65408-Radeon-R100-R200-Mesa-Driver-Sees-Attention&p=247018#post247018

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

Note: this is a candidate for the stable branches.
(cherry picked from commit afdd6f8c34705eae5048da03329750836bcecf44)
radeon: fix fog coordinate emit

Noticed by dungeon on phoronix:
http://phoronix.com/forums/showthread.php?65408-Radeon-R100-R200-Mesa-Driver-Sees-Attention&p=247018#post247018

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

Note: this is a candidate for the stable branches.
(cherry picked from commit e77c495d09105a1b6a13fd62d0d3585b019e1c66)
r600g: fix UINT_TO_FLT on evergreen

It should be processed as trans-only.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit b69728cba53765f6799a66ebcab2058be6d53602)

Conflicts:

	src/gallium/drivers/r600/r600_shader.c

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
r600g: fix some of the interpolation tests.

This enables linear gradients if we need a linear,
it also sets the flat shade flag for color/constant interpolations.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 1fc001ea15f79166a32bc3a3fa2f6405a986e3f1)
r600g: make r600/700 use correct ineg.

Noticed by Vadim Girlin on irc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 5893e686b691013525cb2608c3d605be2d8ea471)
r600g: fix ISLT on r600/700

This fixes ISLT like evergreen.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 0196433ce55b7e005c483bd7c411844eb44e983b)

Conflicts:

	src/gallium/drivers/r600/r600_shader.c

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
st/mesa: pass GL_MAP_INVALIDATE_RANGE_BIT to gallium drivers

when mapping renderbuffers or texture images.

NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 84c7c14697c82fe25586f8186b4f47d80a6f05f9)
svga: add 0.5 in float->int conversion of sample min/max lod

This makes lod clamping more consistent with other drivers.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit 5abcd198b8e644c0d97c6766c6707e20fe22f0fb)
svga: fix min/max lod clamping

The interaction between the mipmap lod min/max limits and the texture
base/max level limits is kind of tricky.  Changing the base level
didn't work as expected before.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit fd890873b20de553078fc96d977fbd858238c7d9)