freedreno: track batch/blit types
authorRob Clark <robdclark@gmail.com>
Thu, 14 Jul 2016 14:32:02 +0000 (10:32 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 30 Jul 2016 13:23:42 +0000 (09:23 -0400)
commitc44163876a2858aea219a08bd2e048b76953cff9
tree02e83e5140db04c4aa25c290deb808dae94f420a
parent7f8fd02dc7cad1ddcfb610db10ffbb41e3e34e7d
freedreno: track batch/blit types

Add a bit of extra book-keeping about blits and back-blits (from
resource shadowing).  If the app uploads all mipmap levels, as opposed
to uploading the first level and then glGenerateMipmap(), we can discard
the back-blit (as opposed to being naive and shadowing the resource for
each mipmap level).  Also, after a normal blit, we might as well flush
the batch immediately, since there is not likely to be further rendering
to the surface.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_batch.h
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_draw.c
src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/freedreno/freedreno_state.c