freedreno/ir3: add IDIV/UDIV support

Logic shamelessly copied from nv50 lowering pass.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/ir3: add UMOD support, based on UDIV

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

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

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

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/ir3: make TXQ return integers, not floats

We're still doing something wrong for array textures.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/ir3: shadow comes before array

Experimentally, this makes *ArrayShadow tex-miplevel-selection tests
pass.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/ir3: avoid fan-in sources referring to same instruction

Since the RA has to be done s.t. each one gets its own (adjacent)
register, it would complicate matters if instructions were allowed to be
repeated. This enables copy-propagation use in situations where
previously that might have happened.

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

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno/ir3: add TXD support and expose ARB_shader_texture_lod

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

Still failing a bunch of the fairly picky texelFetch tests, but the
1D(Array) ones are full passes.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
freedreno: dual-source render targets are not supported

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
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.

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

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