diff options
author | Rob Clark <[email protected]> | 2014-09-12 16:52:38 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-09-12 18:35:39 -0400 |
commit | 9b6281a7da02759b0e7570d611e27fe541ffebd6 (patch) | |
tree | 8ba9f6e8aad8ec16da5837a8c7d227132a7bbb22 /src/gallium/drivers/freedreno/freedreno_gmem.c | |
parent | d13d2fd16132f351ec7c8184f165faeac3b31bb4 (diff) |
freedreno: "fix" problems with excessive flushes
4f338c9b introduced logic to trigger a flush rather than overflowing
cmdstream buffer. But the threshold was too low, triggering flushes
where they were not needed. This caused problems with games like
xonotic.
Part of the problem is that we need to mark all state dirty between
cmdstream submit ioctls, because we cannot rely on state being
preserved across ioctls. But even with that, there are still some
problems that are still being debugged. For now:
1) correctly mark all state dirty
2) introduce FD_MESA_DEBUG flush flag to force rendering to be flushed
between each draw, to trigger problems (so that I can debug)
3) use a more reasonable threshold so for normal usecases we don't
trigger the problems
This at least corrects the regression, but there is still more debugging
to do.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_gmem.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_gmem.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c index 661458fe0aa..7e43c2e74ce 100644 --- a/src/gallium/drivers/freedreno/freedreno_gmem.c +++ b/src/gallium/drivers/freedreno/freedreno_gmem.c @@ -381,28 +381,5 @@ fd_gmem_render_tiles(struct pipe_context *pctx) ctx->max_scissor.minx = ctx->max_scissor.miny = ~0; ctx->max_scissor.maxx = ctx->max_scissor.maxy = 0; - /* Note that because the per-tile setup and mem2gmem/gmem2mem are emitted - * after the draw/clear calls, but executed before, we need to preemptively - * flag some state as dirty before the first draw/clear call. - * - * TODO maybe we need to mark all state as dirty to not worry about state - * being clobbered by other contexts? - */ - ctx->dirty |= FD_DIRTY_ZSA | - FD_DIRTY_RASTERIZER | - FD_DIRTY_FRAMEBUFFER | - FD_DIRTY_SAMPLE_MASK | - FD_DIRTY_VIEWPORT | - FD_DIRTY_CONSTBUF | - FD_DIRTY_PROG | - FD_DIRTY_SCISSOR | - /* probably only needed if we need to mem2gmem on the next - * draw.. but not sure if there is a good way to know? - */ - FD_DIRTY_VERTTEX | - FD_DIRTY_FRAGTEX | - FD_DIRTY_BLEND; - - if (fd_mesa_debug & FD_DBG_DGMEM) - ctx->dirty = 0xffffffff; + ctx->dirty = ~0; } |