freedreno: rework fence tracking
authorRob Clark <robdclark@gmail.com>
Sun, 19 Nov 2017 15:36:19 +0000 (10:36 -0500)
committerRob Clark <robdclark@gmail.com>
Sun, 3 Dec 2017 19:17:40 +0000 (14:17 -0500)
commit15ebf387fc43632be0e68365cf92ac8fb1b64a9c
treec38457eb447df994c138d01a155122406accda3c
parentdeb57fb237c3be9629a39ef1978dfac4563d6bda
freedreno: rework fence tracking

ctx->last_fence isn't such a terribly clever idea, if batches can be
flushed out of order.  Instead, each batch now holds a fence, which is
created before the batch is flushed (useful for next patch), that later
gets populated after the batch is actually flushed.

Signed-off-by: Rob Clark <robdclark@gmail.com>
12 files changed:
src/gallium/drivers/freedreno/freedreno_batch.c
src/gallium/drivers/freedreno/freedreno_batch.h
src/gallium/drivers/freedreno/freedreno_batch_cache.c
src/gallium/drivers/freedreno/freedreno_context.c
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_fence.c
src/gallium/drivers/freedreno/freedreno_fence.h
src/gallium/drivers/freedreno/freedreno_gmem.c
src/gallium/drivers/freedreno/freedreno_query_acc.c
src/gallium/drivers/freedreno/freedreno_query_hw.c
src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/freedreno/freedreno_state.c