st/xvmc: Fix compiler warnings

Mostly signed/unsigned comparison

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Christian König <christian.koenig@amd.com>
linker: Wrap access of producer_var with a NULL check

producer_var could be NULL if consumer_var is not NULL and
consumer_is_fs is false.  This will occur when the producer is NULL and
the consumer is the geometry shader for a program that contains only a
geometry shader.  This will occur starting with the next patch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: pavol@klacansky.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82585
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
linker: Assign varying locations geometry shader inputs for SSO

Previously only geometry shader outputs would be assigned locations if
the geometry shader was the only stage in the linked program.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: pavol@klacansky.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82585
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
freedreno/a4xx: frag-depth fixes

Also seems to fix kill/discard.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
i965/fs: Don't offset uniform registers in half().

Half gives you the second half of a SIMD16 register, but if the register
is a uniform it would incorrectly give you the next register.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
i965: Add var->location != -1 assertions.

We shouldn't receive variables with invalid locations set - adding these
assertions should help catch problems before they cause crashes later.

Inspired by similar code in st_glsl_to_tgsi.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
freedreno/a3xx: fix alpha-blending on RGBX formats

Expert debugging assistance provided by Chris Forbes.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/a3xx: fix border color swizzle to match texture format desc

This is a hack since it uses the texture information together with the
sampler, but I don't see a better way to do it. In OpenGL, there is a
1:1 correspondence.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/a3xx: re-enable rgb10_a2 render targets

There were previously regressions regarding border colors, which the
updated swizzle logic resolves.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/a3xx: add RGTC format support

These pass the compressedteximage tests, but not the rgtc-texture-0[12]
ones.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/a3xx: add s3tc texture format support

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/a3xx: output RGBA16_FLOAT from fs for certain outputs

Fixes R11G11B10F rendering, and is required for SRGB format support.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/a3xx: add support for SRGB render targets

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/a3xx: add bgr565 texturing and rendering

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno: pass number of instances to draw

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gallium: support instanced rendering in u_primconvert

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/a3xx: add support for vertexid and instanceid sysvals

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/a3xx: add ARB_instanced_arrays support

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
WIP freedreno/ir3: add POPC/BREV/MSB/LSB opcode support

These are part of GLES3.1 and ARB_gpu_shader5. The bitfield
extract/insert operations are still to be done.

XXX this apparently doesn't work... maybe the opcodes aren't really
there?

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
WIP freedreno/ir3: add TG4 support

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