On Wed, Oct 4, 2017 at 1:50 AM, Gwan-gyeong Mun <elong...@gmail.com> wrote: > It adds support of dri2_loader to egl dri2 tizen backend. > - referenced a basic buffer flow and management implementation from android. > > And it implements a query buffer age extesion for tizen and turn on > swap_buffers_with_damage extension. > - it add color buffer related member variables to dri_egl_surface for a > management of color buffers. > > v2: Fixes from Emil's review: > a) Remove a temporary variable and return directly on get_format_bpp() > b) Remove unneeded compiler pragma > c) Follow coding style > d) Rename get_pitch() to get_stride() for using of consistent naming > e) Remove mis-referencing from android implementation on treatment of > buffer > age. > reference: > https://lists.freedesktop.org/archives/mesa-dev/2017-June/158409.html > f) Use dri2_egl_surface_free_outdated_buffers_and_update_size() helper > g) Use dri2_egl_surface_record_buffers_and_update_back_buffer() helper > h) Use add dri2_egl_surface_update_buffer_age() helper > i) Use env_var_as_boolean for hw_accel variable on dri2_initialize_tizen() > j) Remove getting of the device name and opening of the device node on > dri2_initialize_tizen() > And add duplicating of tbm_bufmgr_fd. As tbm_bufmgr_fd is managed by > tbm_bufmgr, > if mesa use this fd then we should duplicate it. > k) Add comments why we can not drop the dri2 codepath on > dri2_initialize_tizen() > As some kernels ported for tizen don't support render node feature yet, > currently we cannot drop the dri2 codepath. > > Signed-off-by: Mun Gwan-gyeong <elong...@gmail.com> > --- > src/egl/drivers/dri2/egl_dri2.h | 9 ++ > src/egl/drivers/dri2/platform_tizen.c | 257 > ++++++++++++++++++++++++++++++++-- > 2 files changed, 252 insertions(+), 14 deletions(-) > > diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h > index 6f9d936ca5..7d047bf5dd 100644 > --- a/src/egl/drivers/dri2/egl_dri2.h > +++ b/src/egl/drivers/dri2/egl_dri2.h > @@ -340,6 +340,15 @@ struct dri2_egl_surface > tpl_surface_t *tpl_surface; > tbm_surface_h tbm_surface; > tbm_format tbm_format; > + > + /* Used to record all the tbm_surface created by tpl_surface and their > ages. > + * Usually Tizen uses at most triple buffers in tpl_surface > (tbm_surface_queue) > + * so hardcode the number of color_buffers to 3. > + */ > + struct { > + tbm_surface_h buffer; > + int age; > + } color_buffers[3], *back;
dri2_egl_surface is quite the mess of ifdefery. So now we have 3 instances of color_buffer and *back. This struct really needs some refactoring to separate out the common and platform specific bits. I'm not saying it has to be done as part of this series though. Rob _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev