mesa/soft/llvmpipe: add fake MSAA support

This adds a gallium cap that allows us to fake GL3.0 by
not exposing MSAA on sw rendering.
It also forces the extra extensions needed for GL3.2.

Signed-off-by: Dave Airlie <airlied@redhat.com>
winsys/svga: Replace the query mm buffer pool with a slab pool v3

This is to avoid running out of query buffer space due to winsys
limitations. Instead of a fixed size per screen pool of query buffers,
use a slab allocator that allocates a new slab if we run out of space
in the first one.

v2: Correct email addresses.
v3: s/8192/VMW_QUERY_POOL_SIZE/. Improve documentation and log message.

Reported-and-tested-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
i965/vec4: do not trim dead channels on gen6 for math

Do not set a writemask on Gen6 for math instructions, those are
executed using align1 mode that does not support a destination mask.

v2: cleanups, better comment (Matt)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76883

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
glx: remove unused __glXClientInfo()

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
glx: add extra null check in getFBConfigs

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: Prevent negative indexing on noise2, noise3 and noise4

% operator could return negative value which would cause
indexing before perm table. Change %256 to &0xff

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
mesa: Add missing null check in _mesa_parse_arb_program()

Add missing null check in program_parse.tab.c through
program_parse.y

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
mesa: remove redundant running of check_symbol_table()

Nested for loops running through tables against which they
finally do an assert were ran also with optimized builds.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
glapi: Remove support for "short string" mode

C89 has a fairly short minimum-maximum string length.  To support
compilers limited by the C89 limits, this script had a mode where it
would generate a character array instead of a giant string.  These were
functionally the same, but the code generated for the character array is
HUGE and difficult to read.

As far as I can tell, nothing in Mesa uses '-m short' any more.  The
generated files used to be tracked in revision control, but I think we
stopped using '-m short' when we stopped tracking the generated files.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Brian Paul <brianp@vmware.com>
Tested-by: Lu Hua <huax.lu@intel.com>
Cc: Vinson Lee <vlee@freedesktop.org>
glapi: Fix build break in 'make check' on non-shared-glapi builds

Commit fb78fa58 made the GL_ARB_debug_output functions aliases of the
GL_KHR_debug output functions.  As a result, the function names in
struct _glapi_table also changed.  The table in check_table.cpp used the
ARB names.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Tested-by: Brian Paul <brianp@vmware.com>
Tested-by: Lu Hua <huax.lu@intel.com>
Cc: Vinson Lee <vlee@freedesktop.org>
glapi: Enable ES compatibility mode

Ages ago Chia-I added an ES compatibility flag to several of the various
generator scripts.  The intention was to bridge differences between ES
and desktop in Mesa builds without ES.  It doesn't appear that it has
ever been used.  Recent changes to static_dispatch status of several ES1
functions caused problems in desktop-only, non-shared-glapi builds.
Enabling the ES compatibility mode appears to fix these build problems.

This is kind of a duct tape solution to this problem.  As I mentioned in
the cover letter for the series that triggered the build problem, I
would like to make some major changes to the generator architecture and
the XML.  The whole point of the proposed architecture changes is to
better handle the differences between desktop GL and ES.  I think duct
tape is okay for now.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76869
Tested-by: Brian Paul <brianp@vmware.com>
Tested-by: Lu Hua <huax.lu@intel.com>
Cc: Vinson Lee <vlee@freedesktop.org>
Cc: Chia-I Wu <olv@lunarg.com>
Revert "Revert "glapi/es1: Don't mark core functions as static_dispatch=false""

This reverts commit 526e49290cd2d83fb931708a786c27647972a00c.

The original build problem should be fixed by the previous commit.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Brian Paul <brianp@vmware.com>
Tested-by: Lu Hua <huax.lu@intel.com>
glapi: Add static dispatch for glPointSizePointerOES

The OpenGL ES 1.1 conformance tests expect this function to be
statically available form libGLESv1_CM.so.  The comment "required for
es1.1" in the XML file should have been a clue.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76926
Reviewed-by: Matt Turner <mattst88@gmail.com>
Tested-by: Lu Hua <huax.lu@intel.com>
cso: fix sampler view count in cso_set_sampler_views()

We want to call pipe->set_sampler_views() with count being the
maximum of the old number of sampler views and the new number.
This makes sure we null-out any old sampler views.

We already do the same thing for sampler states in single_sampler_done().
Fixes some assertions seen in the VMware driver with XA tracker.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Tested-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
glx: Do not advertise buffer_age on dri2

Previously GLX_EXT_buffer_age has always been advertised as supported because
both client_glx_support and client_glx_only where set. So it did not matter
that direct_support is only set when running dri3 and we ended up always
advertising it.

Fix that by not setting client_glx_only for buffer_age in known_glx_extensions.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>