scons: Define PACKAGE_VERSION/BUGREPORT globally.

Fixes the scons build.
Fix out-of-tree build of 'make check' in src/mapi/glapi/tests/

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Fix glapi/tests/check_table.cpp for standardized OpenGL function names

It looks like this has been broken since commit
1a1db1746db82efc7f0643508886dfc78a15eb71 "Standardize names of OpenGL
functions."

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Properly check GLX_INDIRECT_RENDERING in glapi/tests/check_table

Actually use $DEFINES, so we can see if GLX_INDIRECT_RENDERING is defined

If GLX_INDIRECT_RENDERING is defined,  _GLAPI_SKIP_PROTO_ENTRY_POINTS will
be defined, and libglapi won't contain the 'protocol entry points', so we
should provide stubs in check_table.cpp
r600g/llvm: Move llvm wrapper functions into the radeon directory
radeon/llvm: Implement radeon_llvm_parse_bitcode() using C API

Also make the function static since it is not used anywhere else.
radeon/llvm: Implement radeon_llvm_get_num_kernels() using the C API
radeon/llvm: Implement radeon_llvm_get_kernel_module() using the C API
radeon/llvm: Optimize radeon_llvm_strip_unused_kernels()

Just delete unused kernels rather than marking them as internal and
running the GlobalDCE pass.

Also implement this function in C and inline it into
radeon_llvm_get_kernel_module()
radeon/llvm: Make radeon_llvm_util.cpp a C file

All the functions in this file are now implemented in C.
radeon/llvm: Add missing license headers

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
llvmpipe: Fix geometry shader token leak.

Trivial. Matches softpipe's code.
softpipe: don't assert when creating surfaces with multiple layers

We can't handle them yet, however we can safely just warn (we will
just render to first layer, which is fine since we can't handle
rendertarget system value neither).
Also make behavior more predictable with buffer surfaces
(it would sometimes hit bogus asserts because of the union in the surface,
instead create the surface but assert when trying to set a buffer
in the framebuffer).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
llvmpipe: don't assert when trying to render to surfaces with multiple layers

instead just warn when creating the surface, rendering will simply happen
to first layer.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
tgsi: fix sample_d emit for arrays

Those cases were apparently forgotten.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
mesa: Fix FB blitting in case of zero size src or dst rect

Framebuffer blitting operation should be skipped if any of the
dimensions (width/height) of src/dst rect is zero.

V2: Move the dimension check after error checking in _mesa_BlitFramebuffer.

Fixes: fbblit(negative.nullblit.zeroSize) in Intel oglconform
https://bugs.freedesktop.org/show_bug.cgi?id=59495

Note: Candidate for all the stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
radeon/llvm: fix LLVM dependencies

Since commit 1c4f283151b191c51cbd76d7f304cc1fe7be3019 we obvious depend on this.

Signed-off-by: Christian König <christian.koenig@amd.com>
softpipe: Shrink context size.

- each softpipe_tex_tile_cache 50*64*64*4*4 = 3,276,800 bytes
- each softpipe_context has 3*32 softpipe_tex_tile_cache, i.e, each softpipe
  context is 314,572,800 bytes, i.e, 300MB

That is, in a 32bits process (around 3GB virtual memory max), we can
only fit 10 contexts.

This change is a short-term hack to shrink the context size.  Longer
term we'll need to change how the texture cache works.

Reviewed-by: Brian Paul <brianp@vmware.com>
scons: Define _ALLOW_KEYWORD_MACROS on MSVC builds.

scons/llvm.py defines inline globally to workaround issues with LLVM C
binding headers, so the only way to is to avoid
aggravating xkeycheck.h errors is to set _ALLOW_KEYWORD_MACROS.

This fixes MSVC 2012 build with LLVM.

Reviewed-by: Brian Paul <brianp@vmware.com>
i965: Split shader_time entries into separate cachelines.

This avoids some snooping overhead between EUs processing separate shaders
(so VS versus FS).

Improves performance of a minecraft trace with shader_time by 28.9% +/-
18.3% (n=7), and performance of my old GLSL demo by 93.7% +/- 0.8% (n=4).

v2: Add a define for the stride with a comment explaining its units and
    why.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>