radeon/llvm: Remove references to DebugFlag and isCurrentDebugType()

These weren't being used at all and they were causing build failures
when LLVM was built with NDEBUG defined and mesa was not.

https://bugs.freedesktop.org/show_bug.cgi?id=49110
r600g: Fix out of tree builds that use the LLVM backend

https://bugs.freedesktop.org/show_bug.cgi?id=49567
radeon/llvm: use bitcasts for integers

We're using float as default type, so basically for every instruction that
wants other types for dst/src operands we need to perform the bitcast
to/from default float. Currently bitcast produces no-op MOV instruction,
will be eliminated later.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: use integer comparison for IF

Replacing "float equal to 1.0f" with "int not equal to 0".
This should help for further optimization of boolean computations.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: fix ABS_i32 instruction lowering

Swap source operands.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: add support for v4i32

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: fix live-in handling for inputs

Set the input registers as live-in for entry basic block.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: add support for VertexID, InstanceID

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: add support for TXQ/TXF/DDX/DDY instructions

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: add support for AHSR/LSHR/LSHL instructions

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: add missing cases for BREAK/CONTINUE

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: add support for some ALU instructions

Add support for IABS, NOT, AND, XOR, OR, UADD, UDIV, IDIV, MOD, UMOD, INEG,
I2F, U2F, F2U, F2I, USEQ, USGE, USLT, USNE, ISGE, ISLT, ROUND, MIN, MAX,
IMIN, IMAX, UMIN, UMAX

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: add support for CUBE ALU instruction

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
radeon/llvm: add suport for cube textures

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
intel: Add extern "C" declarations to headers

These declarations are necessary to allow C++ code to call C code
without causing unresolved symbols (which would make the driver fail
to load).
intel: Work around differences between C and C++ scoping rules.

In C++, if a struct is defined inside another struct, or its name is
first seen inside a struct or function, the struct is nested inside
the namespace of the struct or function it appears in.  In C, all
structs are visible from toplevel.

This patch explicitly moves the decalartions of intel_batchbuffer to
toplevel, so that it does not get nested inside a namespace when
header files are included from C++.
i965/hiz: Make void pointer type casts explicit

Previous to this patch, gen6_hiz.c contained two implicit type casts
from void * to a a non-void pointer type.  This is allowed in C but
not in C++.  This patch makes the type casts explicit, so that
gen6_hiz.c can be converted into a C++ file.
i965/hiz: Convert gen{6,7}_hiz.c to C++

This patch converts the files gen6_hiz.c and gen7_hiz.c to C++, in
preparation for expanding the HiZ code to support arbitrary blits.

The new files are called gen6_blorp.cpp and gen7_blorp.cpp to reflect
the expanded role that this code will serve--"blorp" stands for "BLit
Or Resolve Pass".
i965/hiz: Convert gen{6,7}_hiz.h to gen{6,7}_blorp.h

This patch renames the gen6_hiz.h and gen7_hiz.h files to correspond
to the renames of the corresponding .cpp files (see previous commit).
i965: Parameterize HiZ code to prepare for adding blitting.

This patch groups together the parameters used by the HiZ functions
into a new data structure, brw_hiz_resolve_params, rather than passing
each parameter individually between the HiZ functions.  This data
structure is a subclass of brw_blorp_params, which represents the
parameters of a general-purpose blit or resolve operation.  A future
patch will add another subclass for blits.

In addition, this patch generalizes the (width, height) parameters to
a full rect (x0, y0, x1, y1), since blitting operations will need to
be able to operate on arbitrary rectangles.  Also, it renames several
of the HiZ functions to reflect the expanded role they will serve.