Haiku: Add in public GL kit headers

* These make up the base of what C++ GL Haiku applications
  use for 3D rendering.
* Not placed in includes/GL to prevent Haiku headers from
  getting installed on non-Haiku systems.

Acked-by: Brian Paul <brianp@vmware.com>
st/xa: Add new map flags

Replicate some of the gallium pipe transfer functionality.
Also bump minor to signal availability of this feature.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
radeonsi: flush HTILE when appropriate

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: make DB_RENDER_OVERRIDE an invariant register

All this cruft was ported from r600g and isn't needed on SI and later
according to hw docs. If we implemented HiS, we would set it to 0.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: improve HiZ precision for less and lequal depth functions

r600g needs this too.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
st/dri: fix compiler warning for driCopySubBufferExtension
swrast: silence driContextSetFlags() parameter type warning
glsl: Don't return bad values from _mesa_shader_type_to_index.

This will avoid compiler warnings in the patch that follows.  There
should be no user-visible effect because the change only affects the
behaviour when an invalid enum is passed to
_mesa_shader_type_to_index(), and that can only happen if there is a
bug elsewhere in Mesa.

Reviewed-by: Brian Paul <brianp@vmware.com>
main: Move MESA_SHADER_TYPES outside of gl_shader_type enum.

This will avoid spurious compiler warnings in the patch that follows.

Reviewed-by: Brian Paul <brianp@vmware.com>
glsl: Replace _mesa_glsl_parser_targets enum with gl_shader_type.

These enums were redundant.

Reviewed-by: Brian Paul <brianp@vmware.com>
radeonsi: add the htile buffer to the CS ioctl buffer list

This may fix the GPU crashes.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
radeonsi: set CB_DISABLE if the color mask is 0

Also needed for the DB in-place decompression according to hw docs.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
st/dri: Check for kernel support before enabling fd sharing v2

The dri2 state tracker is checking for driver support before enabling
dri2ImageExtension version 7. This commit adds a check that also the
kernel driver supports fd sharing through prime.

Note that this adds a libdrm dependency on dri2.c.

v2: Removed unnecessary clamping of bool expression

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
configure.ac: remove -fcolor-diagnostics from LLVM flags

When LLVM is build with Clang, "llvm-config --cxxflags" contains the
-fcolor-diagnostics flag. It is not recognized by gcc and the build
fails. Fix by removing the flag.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Brian Paul <brianp@vmware.com>
clover: Add parameter checks to clCreateBuffer.

v2: Use fewer if statements and functional tricks instead of single-use method,
    suggested by Francisco Jerez.
    Squash two small patches into one.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
clover: Append buffers that use CL_MEM_USE_HOST_PTR.

Specs say it's legal for implementations to use internal copies, and
the write synchronization seems to work.  Fixes clCreateBuffer
(together with previous patches) and buffer-flags piglits.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Francisco Jerez <currojerez@riseup.net>
mesa: Add infrastructure for GL_ARB_clear_buffer_object

 - add xml file for extension
 - add reference in gl_API.xml
 - add pointer to device driver function table (dd.h)
 - update dispatch_sanity.cpp

Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: Make validate_texbuffer_format function available externally

 - change storage class from static to extern
 - rename validate_texbuffer_format to _mesa_validate_texbuffer_format

Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: Modify format validation to check for extension not context version

Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: get_texbuffer_format(): differentiate between core and compat context

alpha, lumincance and intensity formats are illegal in a core context.
Add a check to return MESA_FORMAT_NONE if one of those is requested within
a core context.

Reviewed-by: Brian Paul <brianp@vmware.com>