freedreno/a3xx: fix alpha-blending on RGBX formats

Expert debugging assistance provided by Chris Forbes.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
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>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
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>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
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>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
freedreno/a3xx: add support for SRGB render targets

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
freedreno/a3xx: add bgr565 texturing and rendering

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
freedreno/a3xx: handle index_bias (i.e. base_vertex)

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
freedreno/a2xx: silence warning about missing DEPTH32X

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
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: pass number of instances to draw

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>
HACK helper to futz with formats
WIP freedreno/a3xx: avoid out-of-bounds accesses when max_index too big

max_index comes from the user (or is entirely absent), so we have to
compute a tighter bound on it. Use the bo size (+ stride) to determine
the maximum number of vertices.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
WIP z32f(_s8)
WIP freedreno/ir3: pass vertex offset as a const to be added to vertexid