Re: [Mesa-dev] [PATCH v2 28/37] panfrost: Start tracking inter-batch dependencies

2019-09-17 Thread Alyssa Rosenzweig
> > I'm wondering if batch->dependencies should be expressed as a set, > > rather than a dynarray, such that testing whether a batch has a > > given dependency is ideally O(1), not O(N). > > > > In practice I don't know if the asymptotic complexity matters, esp. for > > small numbers of batches, a

Re: [Mesa-dev] [PATCH v2 28/37] panfrost: Start tracking inter-batch dependencies

2019-09-16 Thread Boris Brezillon
On Mon, 16 Sep 2019 16:15:14 -0400 Alyssa Rosenzweig wrote: > > + * A BO is either being written or read at any time, that's what the type > > field > > + * encodes. > > Might this be inferred from (writer != NULL) and (readers->length > 0)? No, I need to keep the old writer around when the

Re: [Mesa-dev] [PATCH v2 28/37] panfrost: Start tracking inter-batch dependencies

2019-09-16 Thread Alyssa Rosenzweig
> + * A BO is either being written or read at any time, that's what the type > field > + * encodes. Might this be inferred from (writer != NULL) and (readers->length > 0)? > +util_dynarray_foreach(&batch->dependencies, > + struct panfrost_batch_fence *, dep)

[Mesa-dev] [PATCH v2 28/37] panfrost: Start tracking inter-batch dependencies

2019-09-16 Thread Boris Brezillon
The idea is to track which BO are being accessed and the type of access to determine when a dependency exists. Thanks to that we can build a dependency graph that will allow us to flush batches in the correct order. Signed-off-by: Boris Brezillon --- src/gallium/drivers/panfrost/pan_context.h |