Merge pull request #1 from laanwj/master

update to master
v4/imx6: use gcvHAL_ATTACH to initialize gpu context

The v4/imx6 kernel driver does context creation for us.
v4/imx6: do not try to modify kernel created context

The kernel driver does setup the context for us and
returns a kernel space pointer (ctx->ctx).
It is a really bad idea to try to modify it.
only modify ctx->ctx in case of GCABI_HAS_CONTEXT

This commit fixes the last commit.
GC2000: add cube_etna2 based replay demo

At the moment cube_etna2_gc2000.c is a copy of cube_etna2.c.
fix compile with DEBUG defined
v4/imx6: store and use a pointer to the kernel context
v4/imx6: use a fake gcsSTATE_DELTA to make the kernel driver happy
driver: fix single-buffering
driver: solve flushing issues on gcwzero

- The rasterizer needs to wait for pixel engine after a clear
- Resolve must be flushed after copying to framebuffer
native: don't build egl directory by default

`egl` is only used for reverse engineering, and is not necessary
for using etnaviv.
Use 'make rev' to build the reverse-engineering only directories.
driver: move RS flush to more logical place
demos: remove dependency on GL headers

GLES/EGL headers were only used for data types. Use native types instead
to make it easier to build etnaviv for targets for which the rootfs
provides no GL headers.
Merge pull request #2 from laanwj/master

update to master
driver: various fixes for mesa integration

- fix crash on multiple non-consecutive vertex elements
- don't touch alpha factors when alpha blending disabled, to prevent
  warning flood
- add silent flag to translate functions, to make probing in
  etna_screen emit no warnings
- add missing pipe caps
- force NPO2 textures to true, as this is required by GLES2
  this will likely cause problems on on GPUs that don't really
  have support for this, we'd need to build a workaround
- temporary flush front buffer hack for mesa fbdev support
Merge pull request #3 from austriancoder/master

More GC2000 stuff
driver: fix vertex elements issue

The END field of VERTEX_ELEMENT_CONFIG was filled in wrongly.  Compute it correctly now.
driver: correct front_ccw for mesa integration

Mesa flips the y viewport scaling based on screen/framebuffer,
to follow the GL spec. This commit makes sure that the correct CW/CCW culling is used.
driver: framebuffer handling

Most of etna_fb is not currently used in the mesa driver, even
though it has functionality not in mesa, such as determining
an exact match RS format and red/blue swap from
linux framebuffer attributes. Expose this function.
memory management improvements

- proper reference counting in driver
- unlock video memory before free