diff options
author | Rob Clark <[email protected]> | 2013-09-06 13:20:46 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2013-09-14 13:31:58 -0400 |
commit | 6e9c386d16b3b38be6d1496758ef983b64744844 (patch) | |
tree | dd9df0e10d4548821ff27d2904d1994434212073 /src/gallium/drivers/freedreno/freedreno_context.h | |
parent | ca505303a72970f40792f16d79eedab35b27b6ed (diff) |
freedreno: avoid stalling at ringbuffer wraparound
Because of how the tiling works, we can't really flush at arbitrary
points very easily. So wraparound is handled by resetting to top of
ringbuffer. Previously this would stall until current rendering is
complete. Instead cycle through multiple ringbuffers to avoid a stall.
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 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index 3d18260445f..808e3a72f02 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -134,6 +134,18 @@ struct fd_context { } gmem_reason; unsigned num_draws; + /* we can't really sanely deal with wraparound point in ringbuffer + * and because of the way tiling works we can't really flush at + * arbitrary points (without a big performance hit). When we get + * too close to the end of the current ringbuffer, cycle to the next + * one (and wait for pending rendering from next rb to complete). + * We want the # of ringbuffers to be high enough that we don't + * normally have to wait before resetting to the start of the next + * rb. + */ + struct fd_ringbuffer *rings[4]; + unsigned rings_idx; + struct fd_ringbuffer *ring; struct fd_ringmarker *draw_start, *draw_end; |