scons: Update for xmlpool/options.h generation.
st/mesa: set ctx->Const.UniformBufferOffsetAlignment

Reviewed-by: Marek Olšák <maraeo@gmail.com>
configure.ac: Fixing common dri dependency when using dri state tracker

Fixes a regression caused by b587a7595e7aae0809a8e7392e89c39df0c955b1

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59261
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
i965: Add an INTEL_DEBUG=no16 option.

Often when debugging, I don't want to see SIMD16 shaders.  It makes
INTEL_DEBUG=vs/fs output much easier to read, especially when a program
dumps many shaders.  Plus, I also want to verify that SIMD8 works before
even considering SIMD16.

v2: Fix the likeliness check (caught by Chris and Eric).

Reviewed-by: Eric Anholt <eric@anholt.net>
i965/fs: Don't mix integer/float immediates in i2b handling.

The simulator gets very angry about our i2b code:

cmp.ne(16)      g3<1>D          g2<0,1,0>D      0F

We can't mix integer DWord and float types.  The only reason to use 0F
here was to share code with f2b.  Split it and use 0D instead.

While we don't believe anything bad will actually happen because of
this, it's nice to fix the warnings and easy enough to do.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Fix build error with clang.

Technically, variable sized arrays are a required feature of C99,
redacted to be optional in C11, and not actually part of C++ whatsoever.

Gcc allows using them in C++ unless you specify -pedantic, and Clang
appears to allow them for simple/POD types.

exec_list is arguably POD, since it doesn't have virtual methods, but I
can see why Clang would be like "meh, it's a C++ struct, say no", seeing as
it's meant to support C99.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58970
Reviewed-by: Matt Turner <mattst88@gmail.com>
i965: Move program_id to intel_screen instead of brw_context.

According to bug #54524, I regressed oglconform's multicontext test
when I reenabled the fragment shader precompile.

However, these test cases only passed by miraculous coincedence.  We
assign each fragment program a unique ID (brw_fragment_program::id which
becomes brw_wm_prog_key::program_string_id) which we obtain by storing a
per-context counter.

The test case uses GLX context sharing to access the same fragment
program from two different contexts.  This means that we share a program
cache.  Before the precompile, if both contexts happened to use the same
shaders in the same order, we'd obtain the same program_string_ids (by
virtue of doing the same computation twice).  However, the more likely
scenario is that they completely disagree on program_string_id.

This meant that we'd have two completely different fragment shaders in
the cache with the same ID, tricking us to think they were the same
(aside from NOS), so we'd render using the wrong program.

This patch implements a simple fix suggested by Eric: it moves the
global counter out of brw_context and into intel_screen, which is shared
across all contexts.  A mutex protects it from concurrent access.

This is also the first direct usage of pthreads in the i965 driver.

Fixes 10 subcases of oglconform's multicontext test.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54524
Reviewed-by: Eric Anholt <eric@anholt.net>
Remove hacks for static Makefiles

v2: Andreas Boll <andreas.boll.dev@gmail.com>
    - don't remove compatibility with scripts for the old build system

v3: Andreas Boll <andreas.boll.dev@gmail.com>
    - remove more obsolete hacks

v4: Andreas Boll <andreas.boll.dev@gmail.com>
    - add a previously removed TOP variable to fix vgapi build
glapi/gen: remove an obsolete comment from Makefile.am

Glapi gets generated at build time.

See commit:
0ce0f7c0c8fa9902678af7f3ecad2541be5808d2
mesa: Remove the generated glapi from source control, and just build it.
targets/dri-r600: Force c++ linker in all cases

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59282
target/dri-swrast: fix for nonstandard LLVM prefix

Include LLVM_LDFLAGS when building with LLVM.  Fixes the following build
errors:
  CXXLD  swrast_dri.la
  /usr/bin/ld: cannot find -lLLVMR600CodeGen
  /usr/bin/ld: cannot find -lLLVMR600Desc
  /usr/bin/ld: cannot find -lLLVMR600Info
  /usr/bin/ld: cannot find -lLLVMR600AsmPrinter

Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
r200: Fix probable thinko in r200EmitArrays

Effectively this path would always assert.  Move the break statement to
the (probable) intended place.

Note: This is a candidate for the stable branches.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
tests: AM_CPPFLAGS must include $(top_srcdir) instead of $(top_builddir).

Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
gtest: Build it only for 'make check'.

Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
xmlpool: Fix out-of-tree builds.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
r300g: kill the X.Org state tracker target

This won't ever be made default and we don't need it anyway.

We should also consider doing this for other drivers.
r300g: random hyperz cleanups
r300g: allow HiZ with a 16-bit zbuffer
r300g: if both Z and stencil are present, they must be fast-cleared together
r300g: allow separate depth and stencil clear

The handling of the CAP is broken in st/mesa anyway. Let's just kill it.

This commit pretty much enables fast Z clear for FBOs with Z24S8.
The driver falls back to clearing with a quad if the fast clear cannot be
used. It can still do fast color clear, for example.