[Mesa-dev] [PATCH] gallium/swrast: fix front buffer blitting. (v2)

Dave Airlie airlied at gmail.com
Thu Oct 8 22:55:43 PDT 2015


On 9 October 2015 at 13:30, Boyan Ding <boyan.j.ding at gmail.com> wrote:
> 2015-10-09 8:38 GMT+08:00 Dave Airlie <airlied at gmail.com>:
>> From: Dave Airlie <airlied at redhat.com>
>>
>> So I've known this was broken before, cogl has a workaround
>> for it from what I know, but with the gallium based swrast
>> drivers BlitFramebuffer from back to front or vice-versa
>> was pretty broken.
>>
>> The legacy swrast driver tracks when a front buffer is used
>> and does the get/put images when it is mapped/unmapped,
>> so this patch attempts to add the same functionality to the
>> gallium drivers.
>>
>> It creates a new context interface to denote when a front
>> buffer is being created, and passes a private pointer to it,
>> this pointer is then used to decide on map/unmap if the
>> contents should be updated from the real frontbuffer using
>> get/put image.
>>
>> This is primarily to make gtk's gl code work, the only
>> thing I've tested so far is the glarea test from
>> https://github.com/ebassi/glarea-example.git
>>
>> v2: bump extension version,
>> check extension version before calling get image. (Ian)
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91930
>>
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>
> Hi Dave,
>
> I'm wondering if it is necessary to implement the new interface of
> swrastLoader in egl. If you think so, I may try to work on it in a
> few days. The X11 part of egl is somewhat funny since it uses pure
> xcb. Maybe the code there will need xcb-utils-image.
>
> I came up with the question above after I tested glarea on GNOME
> wayland with sw rendering, where it seems to work all right. It seems
> GLArea in gtk is using EGL on wayland while using glx on X.

EGL doesn't support front buffer rendering from what I know, so I don't
think the interface is required there.

So I don't think there is a requirement for this interface on egl.

Dave.


More information about the mesa-dev mailing list