scons: Build ws_xlib on Mac OS X.

Fixes this SCons build error on Mac OS X if X11 is found.

NameError: name 'ws_xlib' is not defined:
  File "SConstruct", line 144:
    duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
  File "scons-2.2.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "src/SConscript", line 34:
    SConscript('gallium/SConscript')
  File "scons-2.2.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "src/gallium/SConscript", line 135:
    'targets/libgl-xlib/SConscript',
  File "scons-2.2.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "src/gallium/targets/graw-xlib/SConscript", line 9:
    ws_xlib,

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
radeonsi: Fix z/stencil texture creation.

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

[ Cherry-picked from r600g commit b4f0ab0b22625ac1bb3cf16342039557c086ebae ]
radeonsi: Fix sampler views for depth textures.

Consistently reference the flushed depth texture in the sampler view, not the
original one.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: Flesh out support for depth/stencil exports from the pixel shader.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: Depth/stencil fixes.

Adapted from r600g commit 018e3f75d69490598d61059ece56d379867f3995.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: correct texture memory size for Z32F_S8X24

[ Cherry-picked from r600g commit ea72351a919c594e7f40e901dca42aebb866f8a6 ]
radeonsi: Use explicit stencil mipmap level offsets.

Extracted from r600g commit 428e37c2da420f7dc14a2ea265f2387270f9bee1.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: remove redundant parameter in r600_init_surface

[ Cherry-picked from r600g commit f5ac60152b10b04d38e77db6b904dd50d1a54d6c ]
radeonsi: Re-enable Z16 depth buffers.

8 more piglits.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
radeonsi: Reinstate assertions against invalid colour/depth formats.

radeonsi now supports Z16 and doesn't fail these assertions anymore.

This partially reverts commit 7bba4879bb79719e22a18b52759b1d1d839c783c, but
leaves the error messages in place to allow diagnosing such problems even with
non-debugging builds.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
gallivm: fix multiple lods with different min/mag filter and wide vectors

broken since 529fe420ba6836479619ba42e53665724755fc1c,
I forgot some code, only added the comment...
Fixes bug 57644.
mesa: fix BlitFramebuffer between linear and sRGB formats

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
glcpp: Reject #version and #line not followed by whitespace

Fixes part of es3conform's preprocess16_frag test.
Reviewed-by: Carl Worth <cworth@cworth.org>
glcpp: Support #elif(expression) with no intervening space.

And add test cases to ensure that this works
	- 110 verifies that glcpp rejects #elif<digits> which glcpp
	  previously accepted.
	- 111 verifies that glcpp accepts #if followed immediately by
	  (, +, -, !, or ~.
	- 112 does the same as 111 but for #elif.

See 17f9beb6 for #if change.
Reviewed-by: Carl Worth <cworth@cworth.org>
gallivm: Add support for unorm16 in lp_build_mul.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
gallivm: Add a function to generate lp_type for a format.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
gallivm: Changed lp_build_pad_vector to correctly handle scalar argument.

Removed the lp_type argument as it was unnecessary.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
gallivm: Added support for float to half-float conversion in lp_build_conv.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
util: Updated util_format_is_array to be more accurate.

Will allow formats with padding, e.g. RGBX.
Will now allow swizzled formats as long as the alpha is channel 3.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
gallivm: Updated lp_build_const_mask_aos to input number of channels.

Also updated lp_build_const_mask_aos_swizzled to reflect this.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>