diff options
author | Rob Clark <[email protected]> | 2016-06-29 13:51:26 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-07-30 09:23:42 -0400 |
commit | 7105774babc4d23623c3547cd19122a55c1090db (patch) | |
tree | 31d72e3f9f7d8b3dcf9c34225ae9c468443720f3 /src/gallium/drivers/freedreno/freedreno_context.h | |
parent | dcde4cd114e906f5c4372dbb6758026c9222cd2a (diff) |
freedreno: shadow textures if possible to avoid stall/flush
To make batch re-ordering useful, we need to be able to create shadow
resources to avoid a flush/stall in transfer_map(). For example,
uploading new texture contents or updating a UBO mid-batch. In these
cases, we want to clone the buffer, and update the new buffer, leaving
the old buffer (whose reference is held by cmdstream) as a shadow.
This is done by blitting the remaining other levels (and whatever part
of current level that is not discarded) from the old/shadow buffer to
the new one.
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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index f25ec34758f..c0004fabeaa 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -299,6 +299,11 @@ 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; + struct pipe_debug_callback debug; /* GMEM/tile handling fxns: */ |