[PATCH] dri2: work around broken DRI2CreateDrawable callers

Daniel Drake drake at endlessm.com
Mon Feb 23 05:43:54 PST 2015


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?

Thanks
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: endless-dri2-work-around-broken-DRI2CreateDrawable-callers.patch
Type: text/x-patch
Size: 3099 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150223/7e7bba11/attachment.bin>


More information about the xorg-devel mailing list