diff options
author | Rob Clark <[email protected]> | 2016-07-14 10:32:02 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-07-30 09:23:42 -0400 |
commit | c44163876a2858aea219a08bd2e048b76953cff9 (patch) | |
tree | 02e83e5140db04c4aa25c290deb808dae94f420a /src/gallium/drivers/freedreno/freedreno_context.h | |
parent | 7f8fd02dc7cad1ddcfb610db10ffbb41e3e34e7d (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_context.h')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_context.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index 45876259fd8..7e25e57d43b 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -161,16 +161,27 @@ struct fd_context { */ struct fd_batch *batch; + /* Are we in process of shadowing a resource? Used to detect recursion + * in transfer_map, and skip unneeded synchronization. + */ + bool in_shadow : 1; + + /* Ie. in blit situation where we no longer care about previous framebuffer + * contents. Main point is to eliminate blits from fd_try_shadow_resource(). + * For example, in case of texture upload + gen-mipmaps. + */ + bool in_blit : 1; + /* Keep track if WAIT_FOR_IDLE is needed for registers we need * to update via RMW: */ - bool needs_wfi; + bool needs_wfi : 1; /* Do we need to re-emit RB_FRAME_BUFFER_DIMENSION? At least on a3xx * it is not a banked context register, so it needs a WFI to update. * Keep track if it has actually changed, to avoid unneeded WFI. * */ - bool needs_rb_fbd; + bool needs_rb_fbd : 1; struct pipe_scissor_state scissor; @@ -244,17 +255,6 @@ struct fd_context { bool cond_cond; /* inverted rendering condition */ uint cond_mode; - /* Are we in process of shadowing a resource? Used to detect recursion - * in transfer_map, and skip unneeded synchronization. - */ - bool in_shadow; - - /* Ie. in blit situation where we no longer care about previous framebuffer - * contents. Main point is to eliminate blits from fd_try_shadow_resource(). - * For example, in case of texture upload + gen-mipmaps. - */ - bool discard; - struct pipe_debug_callback debug; /* GMEM/tile handling fxns: */ |