[Mesa-dev] [PATCH v2 25/37] panfrost: Add a batch fence

Boris Brezillon boris.brezillon at collabora.com
Mon Sep 16 21:04:37 UTC 2019


On Mon, 16 Sep 2019 15:38:10 -0400
Alyssa Rosenzweig <alyssa at rosenzweig.io> wrote:

> > +        /* Start in a signaled state so that even non-submitted batches
> > +         * (those that have no draw/clear) can be waited upon.
> > +         */  
> 
> When would this happen? Presumably if a batch does nothing whatsoever,
> it doesn't make sense to wait on it.

Was just simpler to have all batch fences containing a syncobjs on
which we can call WAIT_SYNCOBJ even no real fence is attached to it.

The other option being to set fence->signaled to true when a batch with
no draw/clear is submitted, and then skip those entries when we build
the array passed to the waitsyncobj() func.

> >  #include "pan_resource.h"
> >  
> > +        /* Batch that created this fence object. Will become NULL at batch
> > +         * submission time. This field is mainly here to know whether the
> > +         * batch has been flushed or not.
> > +         */
> > +        struct panfrost_batch *batch;  
> 
> Could this be replaced by just a `bool flushed`, or do we actually use
> the value in a later patch?

I actually use the value to flush deps when they're not already flushed.



More information about the mesa-dev mailing list