summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno/a6xx
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2018-10-04 08:05:49 -0400
committerRob Clark <robdclark@gmail.com>2018-10-26 18:10:00 -0400
commitddb7fadaf8b1aa3004e72d6b0e28e465f8f45fba (patch)
tree538551a48ca92cd881434242674df62e6df7cc1f /src/gallium/drivers/freedreno/a6xx
parent01194cd5826fb58a4f9464594850ffc3f4ae6073 (diff)
freedreno: avoid no-op flushes by re-using last-fence
Noticed that with webgl (in chromium, at least) we end up generating a lot of no-op submits just to get a fence. Tracking the last fence and returning that if there is no rendering since last flush avoids this. Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'src/gallium/drivers/freedreno/a6xx')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_blitter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
index c962fe79970..30840955b61 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
@@ -28,6 +28,7 @@
#include "util/u_dump.h"
#include "freedreno_blitter.h"
+#include "freedreno_fence.h"
#include "freedreno_resource.h"
#include "fd6_blitter.h"
@@ -486,6 +487,8 @@ fd6_blit(struct pipe_context *pctx, const struct pipe_blit_info *info)
return;
}
+ fd_fence_ref(pctx->screen, &ctx->last_fence, NULL);
+
batch = fd_bc_alloc_batch(&ctx->screen->batch_cache, ctx, true);
fd6_emit_restore(batch, batch->draw);