i965/vs: Only do INTEL_DEBUG=perf when there's a GLSL shader.

This will become necessary once we start supporting ARB programs and
fixed function in this backend.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965/vs: Add support for emitting DPH opcodes.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965/vs: Refactor min/max handling to share code.

v2: Properly use "conditionalmod" pre-Gen6, rather than the incorrectly
copy-and-pasted "BRW_CONDITIONAL_G".

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965/vs: Replace brw_vs_emit.c with dumping code into the vec4_visitor.

Rather than having two separate backends, just create a small layer that
translates the subset of Mesa IR used for ARB_vertex_program and fixed
function programs to the Vec4 IR.  This allows us to use the same
optimization passes, code generator, register allocator as for GLSL.

v2: Incorporate Eric's review comments.
- Fix use of uninitialized src_swiz[] values in the SWIZZLE_ZERO/ONE
  case: just initialize it to 0 (.x) since the value doesn't matter
  (those channels get writemasked out anyway).
- Properly reswizzle source register's swizzles, rather than overwriting
  the swizzle.
- Port the old brw_vs_emit code for computing .x of the EXP2 opcode.
- Update comments, removing mention of NV_vertex_program, etc.
- Delete remaining #warning lines and debug comments.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965/vs: Delete the old vertex shader backend.

It's no longer used for anything.

Reviewed-by: Eric Anholt <eric@anholt.net>
i965/vs: Remove support for the old parameter layout.

Only the old backend used it.

Reviewed-by: Eric Anholt <eric@anholt.net>
i965/vs: Remove brw_vs_compile::constant_map.

It was only used for the old backend.

Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Update comment about clipper constants.

The old VS backend doesn't exist, but I believe these still need to be
delivered to the clipper thread.

Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Remove VS constant buffer read support from brw_eu_emit.c.

brw_vec4_emit.cpp implements this directly; only the old backend used
the brw_eu_emit.c code.

Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Remove unnecessary walk through Mesa IR in ProgramStringNotify().

Variable indexing of non-uniform arrays only exists in GLSL.  Likewise,
OPCODE_CAL/OPCODE_RET only existed to try and support GLSL's function
calls.  We don't use Mesa IR for GLSL, and these features are explicitly
disallowed by ARB_vertex_program/ARB_fragment_program and never
generated by ffvertex_prog.c.

Since they'll never happen, there's no need to check for them, which
saves us from walking through all the Mesa IR instructions.

Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Remove unused variables after removing the old VS backend.

Fixes compiler warnings about unused variables.
libgl-xlib: include glheader.h instead of GL/gl.h to fix build

GL/gl.h doesn't define GLfixed but glapitable.h uses it.
build: Don't cross-compile GLSL builtin compiler

The builtin_compiler binary is used during the build process to generate
code for the builtin GLSL functions. Since this binary needs to be run
on the build host, it must not be cross-compiled.

This patch fixes the build system to compile a second version of the
source files and the builtin_compiler binary itself for the build
system. It does so by defining the CC_FOR_BUILD and CXX_FOR_BUILD
variables, which are searched for by the configure script and point to
the location of native C and C++ compilers.

In order for this to work properly, builtin_function.cpp is removed
from BUILT_SOURCES, otherwise the build system would try to generate it
before having had a chance to descend into the builtin_compiler
subdirectory. With the builtin_compiler and glsl_compiler now being
generated at different stages, the build instructions for glsl_compiler
can be simplified a bit.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
scons: Update for builtin_stubs.cpp

Note this by itself is not enough to fix scons build -- it will fail
until you remove:

   rm -rf build/*/glsl/builtin_compiler

because that node was a filei before, but it will be now a directory.

This also means that bisecting across this change will require wiping
the build directory..
glsl: Fix builtin_compiler build by -I $(top_srcdir)/include.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56664
radeonsi: Implement support for vertex shader samplers.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
android: Update for builtin_stubs.cpp move

This fixes the Android build after the move of builtin_stubs.cpp into
the builtin_compiler subdirectory. This patch is untested.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
configure.ac: Prevent build of radeon llvm backend with llvm < 3.2

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
r600g: make tgsi-to-llvm generates store.pixel* intrinsic for fs

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
mesa api_exec: add comment regarding GetPointerv & CORE profiles

GetPointerv was de-deprecated in 893ddb.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>