[Mesa-dev] [PATCH] st/egl: Flush resources before presentation

Marek Olšák maraeo at gmail.com
Mon Jan 13 06:26:47 PST 2014


Pushed.

Marek

On Tue, Jan 7, 2014 at 11:20 PM, Martin Andersson <g02maran at gmail.com> wrote:
> Hi Marek,
>
> Since it seems no one else have any comments on this, maybe you could
> commit it for me?
>
> //Martin
>
> On Thu, Dec 26, 2013 at 1:15 PM, Marek Olšák <maraeo at gmail.com> wrote:
>> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
>>
>> Marek
>>
>> On Thu, Dec 26, 2013 at 10:33 AM, Martin Andersson <g02maran at gmail.com> wrote:
>>> Fixes wayland regression on r600g due to fast clear introduced by commit
>>> edbbfac6.
>>> ---
>>>  src/gallium/state_trackers/egl/common/native_helper.c   | 15 +++++++++++++++
>>>  src/gallium/state_trackers/egl/common/native_helper.h   |  5 +++++
>>>  src/gallium/state_trackers/egl/wayland/native_wayland.c |  4 ++++
>>>  3 files changed, 24 insertions(+)
>>>
>>> diff --git a/src/gallium/state_trackers/egl/common/native_helper.c b/src/gallium/state_trackers/egl/common/native_helper.c
>>> index 4a77a50..856cbb6 100644
>>> --- a/src/gallium/state_trackers/egl/common/native_helper.c
>>> +++ b/src/gallium/state_trackers/egl/common/native_helper.c
>>> @@ -341,6 +341,21 @@ resource_surface_throttle(struct resource_surface *rsurf)
>>>  }
>>>
>>>  boolean
>>> +resource_surface_flush_resource(struct resource_surface *rsurf,
>>> +                                struct native_display *ndpy,
>>> +                                enum native_attachment which)
>>> +{
>>> +   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
>>> +
>>> +   if (!pipe)
>>> +      return FALSE;
>>> +
>>> +   pipe->flush_resource(pipe, rsurf->resources[which]);
>>> +
>>> +   return TRUE;
>>> +}
>>> +
>>> +boolean
>>>  resource_surface_flush(struct resource_surface *rsurf,
>>>                        struct native_display *ndpy)
>>>  {
>>> diff --git a/src/gallium/state_trackers/egl/common/native_helper.h b/src/gallium/state_trackers/egl/common/native_helper.h
>>> index 4c369a7..0b53b28 100644
>>> --- a/src/gallium/state_trackers/egl/common/native_helper.h
>>> +++ b/src/gallium/state_trackers/egl/common/native_helper.h
>>> @@ -91,6 +91,11 @@ resource_surface_copy_swap(struct resource_surface *rsurf,
>>>  boolean
>>>  resource_surface_throttle(struct resource_surface *rsurf);
>>>
>>> +boolean
>>> +resource_surface_flush_resource(struct resource_surface *rsurf,
>>> +                                struct native_display *ndpy,
>>> +                                enum native_attachment which);
>>> +
>>>  /**
>>>   * Flush pending rendering using the copy context. This function saves a
>>>   * marker for upcoming throttles.
>>> diff --git a/src/gallium/state_trackers/egl/wayland/native_wayland.c b/src/gallium/state_trackers/egl/wayland/native_wayland.c
>>> index cfdf4f8..0ab4be6 100644
>>> --- a/src/gallium/state_trackers/egl/wayland/native_wayland.c
>>> +++ b/src/gallium/state_trackers/egl/wayland/native_wayland.c
>>> @@ -259,6 +259,10 @@ wayland_surface_swap_buffers(struct native_surface *nsurf)
>>>     if (ret == -1)
>>>        return EGL_FALSE;
>>>
>>> +   (void) resource_surface_flush_resource(surface->rsurf, &display->base,
>>> +                                          NATIVE_ATTACHMENT_BACK_LEFT);
>>> +   (void) resource_surface_flush(surface->rsurf, &display->base);
>>> +
>>>     surface->frame_callback = wl_surface_frame(surface->win->surface);
>>>     wl_callback_add_listener(surface->frame_callback, &frame_listener, surface);
>>>     wl_proxy_set_queue((struct wl_proxy *) surface->frame_callback,
>>> --
>>> 1.8.5.1
>>>
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list