libfimg: Turn fimgQueueF into a wrapper of fimgQueue

Since getRawFloat() should basically compile to a no-op, as it is just
needed to fool compiler's type checking, it should be reasonable to make
fimgQueueF() a simple wrapper of fimgQueue(), so this patch does it.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
libfimg: Uninline fimgQueue

Long time ago when fimgQueue was still fimgWrite, it was a simple one
line accessor, for which inlining was fully justified. With the time it
has evolved to fimgQueue and become a bit more complex, while the inline
keyword stayed, increasing code size without any reason and in some
cases even reducing performance. This patch finally fixes this.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
libsgl: Uninline functions that do not need to be inline

Forcing functions to be inline, especially those used more than once,
can do more bad than good, so this patch lets the compiler decide what
to do with such functions by removing the inline keyword.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
libfimg: host: Code consolidation

Host interface code consolidation to prepare for reusing geometry
conversion code in OpenFIMG 2.0 Gallium3D driver:
 1) Move code common for direct and indexed draws to helper functions.
 2) Use pseudo-templates for handling of both direct and indexed draws
    with all index types without code duplication.
 3) Unify primitive vertex copy into single, parametrized function.
 4) Allow unaligned accesses to vertex data to simplify vertex packing.
 5) Several minor code clean-ups.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
libfimg: Detect interleaved vertex arrays

This patch extends host interface code to detect interleaved vertex
arrays and copy all interleaved attributes at once instead of packing
and copying each attribute separately and should improve geometry
transfer performance a bit if client application uses applicable
attribute layout.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
libfimg: Optimize packAttribute() for small copies

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
libfimg: Add private optimized copy of memcpy

Apparently at least Debian has an issue with memcpy performing poorly on
ARMv6-based S3C6410 (in comparison to kernel memcpy), so to improve
things this patch imports kernel memcpy into the project. Perf shows
about 30% less time spent in memcpy(), so performance gain is
significant.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
libfimg: host_template: Fix wrong copy stride

In case of sequential copies, when no packing was necessary, wrong copy
size could be calculated in some cases, because attribute width was used
instead of stride.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
libfimg: Batch requests in ring buffer

To minimize the number of context switches and allow more
parallelization, this patch changes the library to batch requests in a
ring buffer.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
libfimg: Batch draw requests

Instead of flushing all requests it is more reasonable to batch multiple
partial draw requests together to minimize context switches and improve
throughput. Currently requests are flushed every 8 draw requests and
after last draw request, but some heuristic based on number of vertices
per request might lead to even better performance.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] libfimg: Migration to new ringbuffer format
build: Use same flags for CXXFLAGS as CFLAGS

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
build: Quiesce float comparison warnings

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
eglFramebuffer: Fix potential use of uninitialzied variables

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>