xlib: fix incorrect GL_ANGLE_texture_compression_dxt enable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
xlib: stop use _mesa_enable_extension(), just set the boolean flags

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
st/mesa: set ctx->Const.MaxSamples = 0, not 1

The gallium docs for pipe_screen::is_format_supported() says that
samples==0 or samples==1 both mean that multisampling is not supported.
Return GL_MAX_SAMPLES==0 instead of 1 for consistency with other drivers.

Note: This is a candidate for the 9.0 branch.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
xlib: use _mesa_generate_mipmap() for mipmap generation, not meta

The swrast fragment program interpreter has trouble computing the
right texture LOD because it doesn't have easy access to input
derivatives.  This causes the GLSL-based meta generate mipmap code
to fetch texels from the wrong mipmap level.

One possible fix would be to set the GL_TEXTURE_MIN/MAX_LOD parameters
to limit sampling from the right level.  But let's just use the
_mesa_generate_mipmap() fallback since it's a lot faster than using
the fragment shader interpreter.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=54240

Note: This is a candidate for the 9.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
osmesa: use _mesa_generate_mipmap() for mipmap generation, not meta

See previous commit for more info.

Note: This is a candidate for the 9.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
mesa: don't enable GL_EXT_framebuffer_multisample for software drivers

Note: This is a candidate for the 9.0 branch.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
st/mesa: only enable GL_EXT_framebuffer_multisample if GL_MAX_SAMPLES >= 2

We never really have multisampling with one sample per pixel.
See also http://bugs.freedesktop.org/show_bug.cgi?id=59873

Note: This is a candidate for the 9.0 branch.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
docs: more VMware guest driver info, tips
docs/relnotes-9.1: document new features in radeon drivers
draw: fix draw_llvm_variant_key struct padding to avoid recompiles

The struct padding got broken by c789b981b244333cfc903bcd1e2fefc010500013.
This caused serious performance regression because part of the key was
uninitialized and hence the shader always recompiled (at least on release
builds...).
While here also fix key size calculation when the number of samplers
and the number of sampler views are different.

v2: add comment

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
llvmpipe: Fix deferred depth writes for Z16_UNORM.

This special path hadn't been exercised by my earlier testing, and mask
values weren't being properly truncated to match the values.

This change fixes that.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
llvmpipe: Don't advertise S8_UNORM (with feeble attempt at supporting it).

S8_UNORM was inadvertedly supported together with Z16_UNORM.

I tried to update the code to accomodate stencil-only -- it seemed a simple
thing to do -- but "fbo-stencil clear GL_STENCIL_INDEX8" still fails,
and it's not worth debugging.

Therefore although this change tries to update for S8_UNORM, it also
disables it completely.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
mesa: fix comment typo: s/formaat/format/
glx: Check that swap_buffers_reply is non-NULL before using it

Check that the return value from xcb_dri2_swap_buffers_reply is
non-NULL before accessing the struct members.

Note: This is a candidate for the 9.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: remove ctx->Driver.Error() hook

Not used by any driver anymore.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
build: Add missing comma in AS_IF

Reported-by: Lauri Kasanen<curaga@operamail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47248#c15
mesa: implement GL_ARB_texture_buffer_range

v2: Record texObj.BufferSize as -1 in TexBuffer(non-Range) instead
of the buffer's current size so we know we always have to use the
full size of the buffer object (i.e. even if it changes without the
user calling TexBuffer again) for the texture.

Clarify invalid offset alignment error message.

v3: Use extra GL_CORE-only section in get_hash_params.py for
TEXTURE_BUFFER_OFFSET_ALIGNMENT.

v4: Remove unnecessary check for profile in _mesa_TexBufferRange.
Add check for extension enable in get_tex_level_parameter_buffer.

v5: Fix position in gl_API.xml.
Add comment about meaning of BufferSize == -1.

v6: Add back checks for core profile and add a note about it.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
gallium: add PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: add support for GL_ARB_texture_buffer_range

v2: Update to handle BufferSize being -1 and return a NULL sampler
view if the specified range would cause out of bounds access.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
nv50,nvc0: fix/enable texture buffer objects