[PATCH] dri2: work around broken DRI2CreateDrawable callers

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 24 00:43:34 PST 2015


On Mon, Feb 23, 2015 at 07:43:54AM -0600, Daniel Drake wrote:
> Hi Chris,
> 
> On Sat, Feb 21, 2015 at 11:55 AM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > I recently came across something very similar because it affects mesa
> > also. The problem is that we do want to track a reference per Client, so
> > simply creating a single reference seems fraught with danger. For mesa,
> > I thought using a named reference, i.e. passing the dri2_id from the
> > Client to use for the reference, and then destroying that reference
> > along with mesa's glXDrawable, actually fixes a few bugs in
> > mesa/src/glx/dri2_glx.c
> >
> > Did you find an alternative solution for mali? If not, I think I can
> > generalise this into only allocating a single reference per DRI2 Client
> > per Drawable.
> 
> Thanks for looking into this! I'm attaching an updated version of the
> workaround; I found a problem with the first one, but I can't recall
> exactly what happened. Also, the latest version of Mali (almost) fixes
> this issue.
> 
> Anyway, fixing this properly does sound like a good idea. You
> mentioned GLX though - would that also solve the issue in the case
> where EGL is used instead of GLX?

The fix is server side, which is fortunate as EGL has a separate winsys
iplementation to GLX. Comparing the fixes, I think we want to go forward
with Pauli's reference counting. Do you mind reviewing the two patches,
and testing them against Mali?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the xorg-devel mailing list