summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_batch.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-07-14 10:32:02 -0400
committerRob Clark <[email protected]>2016-07-30 09:23:42 -0400
commitc44163876a2858aea219a08bd2e048b76953cff9 (patch)
tree02e83e5140db04c4aa25c290deb808dae94f420a /src/gallium/drivers/freedreno/freedreno_batch.h
parent7f8fd02dc7cad1ddcfb610db10ffbb41e3e34e7d (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_batch.h')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.h b/src/gallium/drivers/freedreno/freedreno_batch.h
index 228a1b72bf6..6be196534ab 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.h
+++ b/src/gallium/drivers/freedreno/freedreno_batch.h
@@ -93,7 +93,9 @@ struct fd_batch {
FD_BUFFER_ALL = FD_BUFFER_COLOR | FD_BUFFER_DEPTH | FD_BUFFER_STENCIL,
} cleared, partial_cleared, restore, resolve;
- bool needs_flush;
+ bool needs_flush : 1;
+ bool blit : 1;
+ bool back_blit : 1; /* only blit so far is resource shadowing back-blit */
/* To decide whether to render to system memory, keep track of the
* number of draws, and whether any of them require multisample,