[Mesa-dev] [PATCH RFC 2/2] dri: Pass a __DRIcontext to ->set_damage_region()

Boris Brezillon boris.brezillon at collabora.com
Fri Aug 30 17:00:28 UTC 2019


On Fri, 30 Aug 2019 18:56:52 +0200
Michel Dänzer <michel at daenzer.net> wrote:

> On 2019-08-30 6:52 p.m., Boris Brezillon wrote:
> > On Fri, 30 Aug 2019 18:43:59 +0200
> > Michel Dänzer <michel at daenzer.net> wrote:
> >   
> >>> diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
> >>> index 4c60d349ddd5..e04bed689219 100644
> >>> --- a/include/GL/internal/dri_interface.h
> >>> +++ b/include/GL/internal/dri_interface.h
> >>> @@ -527,12 +527,13 @@ struct __DRI2bufferDamageExtensionRec {
> >>>      *
> >>>      * Used to implement EGL_KHR_partial_update.
> >>>      *
> >>> +    * \param ctx      context
> >>>      * \param drawable affected drawable
> >>>      * \param nrects   number of rectangles provided
> >>>      * \param rects    the array of rectangles, lower-left origin
> >>>      */
> >>> -   void (*set_damage_region)(__DRIdrawable *drawable, unsigned int nrects,
> >>> -                             int *rects);
> >>> +   void (*set_damage_region)(__DRIcontext *_ctx, __DRIdrawable *drawable,
> >>> +                             unsigned int nrects, int *rects);
> >>>  };    
> >>
> >> This would break the DRI2_BufferDamage extension version 1 ABI. You'd
> >> need to either add a new hook like set_damage_region2 and bump
> >> __DRI2_BUFFER_DAMAGE_VERSION (and make sure that's handled correctly
> >> everywhere), or add a new extension instead.  
> > 
> > I thought this change was only impacting the internal API, but maybe
> > I'm missing something.  
> 
> include/GL/internal/dri_interface.h defines the DRI driver ABI, which
> must be kept backwards compatible.

Okay.

> 
> 
> > In any case, this extension has been merged recently (mesa-19.2.0-rc1),
> > so maybe we can fix it before 19.2 is released to avoid creating  
> > ->set_damage_region2().  
> 
> Ah, yes. I misinterpreted gitk's output, thinking it had already been
> introduced in 19.1. Sorry for the false alarm.

Great! So, next question is, do you think it's acceptable to pass a
DRIcontext here, and if not, do you have any idea how to solve this
problem?


More information about the mesa-dev mailing list