Hi Zhongmin Wu, On 14 July 2017 at 07:55, Zhongmin Wu <zhongmin...@intel.com> wrote: > Before we queued the buffer with a invalid fence (-1), it will > make some benchmarks failed to test such as flatland. > > Now we get the out fence during the flushing buffer and then pass > it to SurfaceFlinger in eglSwapbuffer function. > > v2: a) Also implement the fence in cancelBuffer. > b) The last sync fence is stored in drawable object > rather than brw context. > c) format clear. > > Change-Id: Ic0773c19788d612a98d1402f5b5619dab64c1bc2 > Tracked-On: https://jira01.devtools.intel.com/browse/OAM-43936 > Reported-On: https://bugs.freedesktop.org/show_bug.cgi?id=101655 > Signed-off-by: Zhongmin Wu <zhongmin...@intel.com> > Reported-by: Li, Guangli <guangli...@intel.com> > Tested-by: Marathe, Yogesh <yogesh.mara...@intel.com> > --- > include/GL/internal/dri_interface.h | 9 +++++++++ > src/egl/drivers/dri2/platform_android.c | 20 +++++++++++++------- > src/mesa/drivers/dri/common/dri_util.c | 3 +++ > src/mesa/drivers/dri/common/dri_util.h | 2 ++ > src/mesa/drivers/dri/i915/intel_screen.c | 1 + > src/mesa/drivers/dri/i965/intel_batchbuffer.c | 18 +++++++++++++++++- > src/mesa/drivers/dri/i965/intel_screen.c | 6 ++++++ > src/mesa/drivers/dri/nouveau/nouveau_screen.c | 1 + > src/mesa/drivers/dri/radeon/radeon_screen.c | 1 + > 9 files changed, 53 insertions(+), 8 deletions(-) > > diff --git a/include/GL/internal/dri_interface.h > b/include/GL/internal/dri_interface.h > index fc2d4bb..7c6b08b 100644 > --- a/include/GL/internal/dri_interface.h > +++ b/include/GL/internal/dri_interface.h > @@ -287,6 +287,15 @@ struct __DRI2flushExtensionRec { > void (*flush)(__DRIdrawable *drawable); > > /** > + * This function enables retrieving fence during enqueue / cancel buffer > operations > + * > + * \param drawable the drawable to invalidate > + * > + * \since 3 > + */ > + int (*get_retrieve_fd)(__DRIdrawable *drawable); > + If you get to v3 using the same approach, do not forget to incorporate my earlier suggestions. Reiterating from before, emphasising on the missing parts.
- when extending the interface, _the version number must be bumped_ - user should _check the version_ and the function pointer prior to use, falling back to the old scheme - get_retrive_fd [barring the typo - retrieve], should have at least _the fd ownership documented_ Thanks Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev