OSDN Git Service

freedreno: "fix" problems with excessive flushes
authorRob Clark <robclark@freedesktop.org>
Fri, 12 Sep 2014 20:52:38 +0000 (16:52 -0400)
committerRob Clark <robclark@freedesktop.org>
Fri, 12 Sep 2014 22:35:39 +0000 (18:35 -0400)
commit9b6281a7da02759b0e7570d611e27fe541ffebd6
tree8ba9f6e8aad8ec16da5837a8c7d227132a7bbb22
parentd13d2fd16132f351ec7c8184f165faeac3b31bb4
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 <robclark@freedesktop.org>
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_draw.c
src/gallium/drivers/freedreno/freedreno_gmem.c
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/freedreno/freedreno_util.h