driver: prevent reuse of fence if still to be signalled

This avoids fences that are signalled prematurely because
they are still in the queue while being reused.
rnndb: add I2F instruction (gc2000)
driver: refuse PIPE_TRANSFER_MAP_DIRECTLY if not possible

and add some comments
driver: move transfer-related code to etna_transfer

Start splitting etna_driver into more managable parts.
driver: optimize shader linking

Use two-level lookup table instead of binary search to match PS
inputs to VS outputs.
Merge pull request #4 from mike-sc/master

Replays for gc880
driver: add command processor stall where needed
driver: handle non-mipmapping case correctly

When mipmapping filter is set to NONE, the GPU will still select mipmap
levels when a LOD range is defined. To avoid this, set the LOD range
to always select the minimum (best) LOD available.
driver: only show per-frame message if explicitly enabled

Spam reduction.
driver: organize debug messages a bit

Split up debug messages into multiple categories, which can be
enabled/disabled separately.
driver: reduce number of texture flushes

Only flush texture caches after a texture has been modified through a
transfer.
documentation updates
etnaviv: hook/fdr from driver

This commit makes it possible to compare command streams between the
Vivante blob and the Etnaviv driver.

For reverse engineering purposes command streams from the Vivante
blob driver can be intercepted and written to a FDR file. This is used
by the native/egl demos.

The same can now be done for libetnaviv: libetnaviv can be compiled
with ETNAVIV_HOOK=1, and when subsequently a program that uses libetnaviv
is run, the command stream will be written to the file defined by
environment variable ETNAVIV_FDR. If this environment variable is not
set, no command stream dump will be written.
driver: sync RA after texture cache flush
driver: trivial command stream optimizations

Submit shader code, uniforms in one go.
Only mark TS state dirty if clear color changed.
Show result of last command batch. Cosmetic change.
Copy cube_etna.c to cube_etna_gc2000.c
state_3d.xml:
Add unknown bit in PE depth config used by cube example.
VS_RANGE_LOW is index of first vs instruction.
First instruction address = 0x0C000 + VS_RANGE_LOW*16.
VS_RANGE_HIGH is index of last instruction.
PS_RANGE_* works same way.
Generate headers to include new state_3d.xml
Update .gitignore
cube_etna replay on GC880
cube_etna2_gc2000.c that works on GC880.