[Mesa-dev] [PATCH] i965: Resolve framebuffers before signaling the fence

Chris Wilson chris at chris-wilson.co.uk
Tue Jun 20 19:50:07 UTC 2017


Quoting Chad Versace (2017-06-20 18:08:14)
> On Mon 19 Jun 2017, Chris Wilson wrote:
> > Quoting Chad Versace (2017-06-19 19:42:16)
> > > On Mon 12 Jun 2017, Chris Wilson wrote:
> > > >     brw_emit_mi_flush(brw);
> > > >  
> > > >     switch (fence->type) {
> > > > @@ -335,6 +363,8 @@ brw_gl_fence_sync(struct gl_context *ctx, struct gl_sync_object *_sync,
> > > >     struct brw_context *brw = brw_context(ctx);
> > > >     struct brw_gl_sync *sync = (struct brw_gl_sync *) _sync;
> > > >  
> > > > +   assert(condition == EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR);
> > > > +
> > > 
> > > This function is the entrypoint for glFenceSync;
> > > brw_dri_client_wait_sync() is the entry point for eglClientWaitSync. So
> > > the assertion should be on GL_SYNC_GPU_COMMANDS_COMPLETE. For the
> > > record, GL_SYNC_GPU_COMMANDS_COMPLETE != EGL_SYNC_PRIOR_COMMANDS_COMPLETE.
> > 
> > Are you happy with the implicit question asked by the assert, that we
> > don't need to handle any other condition and so do the resolve
> > unconditionally? I didn't see anything else in KHR_fence_sync and
> > EGL_ANDROID_native_fence still refer to that as being the only condition,
> > so the assert was to catch future additions.
> 
> I'm happy with the intent of the assertion. And I still *assert* that it
> should GL_SYNC_GPU_COMMANDS_COMPLETE.

I don't disagree with fixing up the enum, I was just checking I didn't
actually need to pass along the condition and not emit the resolve for
some cases :)
-Chris
> 


More information about the mesa-dev mailing list