Stefan Schake <stsch...@gmail.com> writes: > Our submit ioctl allows to optionally specify a syncobj that will be > waited on before job execution. Expose this in our job submission > interface. Since every uint32_t could be a valid syncobj handle, pass > the handle as a pointer so we can make it optional. > > Signed-off-by: Stefan Schake <stsch...@gmail.com> > --- > src/gallium/drivers/vc4/vc4_context.h | 2 ++ > src/gallium/drivers/vc4/vc4_job.c | 24 +++++++++++++++++++++++- > 2 files changed, 25 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/vc4/vc4_context.h > b/src/gallium/drivers/vc4/vc4_context.h > index d094957bb5..ac72a14008 100644 > --- a/src/gallium/drivers/vc4/vc4_context.h > +++ b/src/gallium/drivers/vc4/vc4_context.h > @@ -512,6 +512,8 @@ struct vc4_job *vc4_get_job(struct vc4_context *vc4, > struct vc4_job *vc4_get_job_for_fbo(struct vc4_context *vc4); > > void vc4_job_submit(struct vc4_context *vc4, struct vc4_job *job); > +void vc4_job_submit_sync(struct vc4_context *vc4, struct vc4_job *job, > + uint32_t* in_sync); > void vc4_flush_jobs_writing_resource(struct vc4_context *vc4, > struct pipe_resource *prsc); > void vc4_flush_jobs_reading_resource(struct vc4_context *vc4, > diff --git a/src/gallium/drivers/vc4/vc4_job.c > b/src/gallium/drivers/vc4/vc4_job.c > index 2b68ea7b74..1084d39b1f 100644 > --- a/src/gallium/drivers/vc4/vc4_job.c > +++ b/src/gallium/drivers/vc4/vc4_job.c > @@ -368,10 +368,22 @@ vc4_submit_setup_rcl_msaa_surface(struct vc4_job *job, > } > > /** > - * Submits the job to the kernel and then reinitializes it. > + * Wrapper for vc4_job_submit_sync omitting the rarely needed syncobj import > + * parameter. > */ > void > vc4_job_submit(struct vc4_context *vc4, struct vc4_job *job) > +{ > + vc4_job_submit_sync(vc4, job, NULL); > +} > + > +/** > + * Submits the job to the kernel and then reinitializes it, optionally > passing > + * a syncobj that will be waited on before job execution. > + */ > +void > +vc4_job_submit_sync(struct vc4_context *vc4, struct vc4_job *job, > + uint32_t* in_sync)
Could we call this "vc4_job_submit_with_sync()" or something? job_submit_sync() sounds to me like "submit this synchronously, so block on completion." Style nit: * goes next to the variable name rather than the type. However, I think you can just use uint32_ts instead of pointers throughout, with 0 meaning no sync obj.
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev