nvc0/ir: unset s/r indirect sources before moving everything

With the current logic, it's very likely that s/r indirect sources are
right after the "regular" ones. Unset them before moving the texture
arguments over rather than after, as one of those arguments would
likely have assumed one of the s/r positions.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0/ir: account for indirect textures on fermi for txd

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0/ir: fix encoding of offset register into interpolation instruction

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
i965: forward-declare struct brw_context in brw_reg.h

Commit 54e91e7420 introduced a function declaration that uses
brw_context. While brw_context tends to get included in most files, it
is not when compiling intel_asm_annotation.c resulting in the following
warning:

In file included from brw_shader.h:25:0,
                 from brw_cfg.h:32,
                 from intel_asm_annotation.c:24:
brw_reg.h:122:39: warning: 'struct brw_context' declared inside
parameter list [enabled by default]
brw_reg.h:122:39: warning: its scope is only this definition or
declaration, which is probably not what you want [enabled by default]

Add a forward-declaration for struct brw_context to avoid the issue.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
r600g: remove unused base_vector_chan variable

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
gallium: add INTERP_* opcodes to support interpolateAt*

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
nvc0/ir: add support for interpolating with non-default settings

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
glsl/glcpp: move macro declaration before code to fix MSVC build

Reviewed-by: Carl Worth <cworth@cworth.org>
softpipe: fix sp_get_dims() for PIPE_BUFFER

Before, we were checking the level against view->u.tex.last_level but
level is not valid for buffers.  Plus, the aliasing of the view->u.tex
view->u.buf members (a union) caused the level checking arithmetic to
be totally wrong.  The net effect is we always returned early for
PIPE_BUFFER size queries.

This fixes the piglit "textureSize 140 fs samplerBuffer" test.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
gallium/docs: minor clarification for TXQ instruction

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>