Re: [Mesa-dev] [PATCH] st/egl: Flush resources before presentation (android - bug 77966)

2014-05-05 Thread Paulo Sergio
Ok. Name is Paulo Sergio Travaglia. Shall I resend the patch?

Thanks
Em 04/05/2014 18:40, "Chia-I Wu"  escreveu:

> On Sun, May 4, 2014 at 7:02 PM, Marek Olšák  wrote:
> > Reviewed-by: Marek Olšák 
> Looks good to me too, except please use your real name.
> > Marek
> >
> > On Fri, May 2, 2014 at 5:00 PM, pstglia  wrote:
> >> ---
> >>  src/gallium/state_trackers/egl/android/native_android.cpp | 7 +++
> >>  1 file changed, 7 insertions(+)
> >>
> >> diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp
> b/src/gallium/state_trackers/egl/android/native_android.cpp
> >> index e73d031..8620ed8 100644
> >> --- a/src/gallium/state_trackers/egl/android/native_android.cpp
> >> +++ b/src/gallium/state_trackers/egl/android/native_android.cpp
> >> @@ -396,6 +396,13 @@ android_surface_swap_buffers(struct native_surface
> *nsurf)
> >> struct android_surface *asurf = android_surface(nsurf);
> >> struct android_display *adpy = asurf->adpy;
> >>
> >> +   struct native_display *ndpy = &adpy->base;
> >> +   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
> >> +
> >> +   /* flush buffer */
> >> +   pipe->flush_resource(pipe, asurf->buf_res);
> >> +   pipe->flush(pipe, NULL, 0);
> >> +
> >> android_surface_enqueue_buffer(&asurf->base);
> >>
> >> asurf->stamp++;
> >> --
> >> 1.7.12.1
> >>
> >> ___
> >> mesa-dev mailing list
> >> mesa-dev@lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
>
> --
> o...@lunarg.com
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] st/egl: Flush resources before presentation (android - bug 77966)

2014-05-04 Thread Chia-I Wu
On Mon, May 5, 2014 at 6:12 AM, Paulo Sergio  wrote:
> Ok. Name is Paulo Sergio Travaglia. Shall I resend the patch?
I've committed it.  Thanks.
> Thanks
>
> Em 04/05/2014 18:40, "Chia-I Wu"  escreveu:
>
>> On Sun, May 4, 2014 at 7:02 PM, Marek Olšák  wrote:
>> > Reviewed-by: Marek Olšák 
>> Looks good to me too, except please use your real name.
>> > Marek
>> >
>> > On Fri, May 2, 2014 at 5:00 PM, pstglia  wrote:
>> >> ---
>> >>  src/gallium/state_trackers/egl/android/native_android.cpp | 7 +++
>> >>  1 file changed, 7 insertions(+)
>> >>
>> >> diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp
>> >> b/src/gallium/state_trackers/egl/android/native_android.cpp
>> >> index e73d031..8620ed8 100644
>> >> --- a/src/gallium/state_trackers/egl/android/native_android.cpp
>> >> +++ b/src/gallium/state_trackers/egl/android/native_android.cpp
>> >> @@ -396,6 +396,13 @@ android_surface_swap_buffers(struct native_surface
>> >> *nsurf)
>> >> struct android_surface *asurf = android_surface(nsurf);
>> >> struct android_display *adpy = asurf->adpy;
>> >>
>> >> +   struct native_display *ndpy = &adpy->base;
>> >> +   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
>> >> +
>> >> +   /* flush buffer */
>> >> +   pipe->flush_resource(pipe, asurf->buf_res);
>> >> +   pipe->flush(pipe, NULL, 0);
>> >> +
>> >> android_surface_enqueue_buffer(&asurf->base);
>> >>
>> >> asurf->stamp++;
>> >> --
>> >> 1.7.12.1
>> >>
>> >> ___
>> >> mesa-dev mailing list
>> >> mesa-dev@lists.freedesktop.org
>> >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>> > ___
>> > mesa-dev mailing list
>> > mesa-dev@lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>>
>>
>> --
>> o...@lunarg.com



-- 
o...@lunarg.com
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] st/egl: Flush resources before presentation (android - bug 77966)

2014-05-04 Thread Chia-I Wu
On Sun, May 4, 2014 at 7:02 PM, Marek Olšák  wrote:
> Reviewed-by: Marek Olšák 
Looks good to me too, except please use your real name.
> Marek
>
> On Fri, May 2, 2014 at 5:00 PM, pstglia  wrote:
>> ---
>>  src/gallium/state_trackers/egl/android/native_android.cpp | 7 +++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp 
>> b/src/gallium/state_trackers/egl/android/native_android.cpp
>> index e73d031..8620ed8 100644
>> --- a/src/gallium/state_trackers/egl/android/native_android.cpp
>> +++ b/src/gallium/state_trackers/egl/android/native_android.cpp
>> @@ -396,6 +396,13 @@ android_surface_swap_buffers(struct native_surface 
>> *nsurf)
>> struct android_surface *asurf = android_surface(nsurf);
>> struct android_display *adpy = asurf->adpy;
>>
>> +   struct native_display *ndpy = &adpy->base;
>> +   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
>> +
>> +   /* flush buffer */
>> +   pipe->flush_resource(pipe, asurf->buf_res);
>> +   pipe->flush(pipe, NULL, 0);
>> +
>> android_surface_enqueue_buffer(&asurf->base);
>>
>> asurf->stamp++;
>> --
>> 1.7.12.1
>>
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



-- 
o...@lunarg.com
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] st/egl: Flush resources before presentation (android - bug 77966)

2014-05-04 Thread Marek Olšák
Reviewed-by: Marek Olšák 

Marek

On Fri, May 2, 2014 at 5:00 PM, pstglia  wrote:
> ---
>  src/gallium/state_trackers/egl/android/native_android.cpp | 7 +++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp 
> b/src/gallium/state_trackers/egl/android/native_android.cpp
> index e73d031..8620ed8 100644
> --- a/src/gallium/state_trackers/egl/android/native_android.cpp
> +++ b/src/gallium/state_trackers/egl/android/native_android.cpp
> @@ -396,6 +396,13 @@ android_surface_swap_buffers(struct native_surface 
> *nsurf)
> struct android_surface *asurf = android_surface(nsurf);
> struct android_display *adpy = asurf->adpy;
>
> +   struct native_display *ndpy = &adpy->base;
> +   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
> +
> +   /* flush buffer */
> +   pipe->flush_resource(pipe, asurf->buf_res);
> +   pipe->flush(pipe, NULL, 0);
> +
> android_surface_enqueue_buffer(&asurf->base);
>
> asurf->stamp++;
> --
> 1.7.12.1
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] st/egl: Flush resources before presentation (android - bug 77966)

2014-05-02 Thread pstglia
---
 src/gallium/state_trackers/egl/android/native_android.cpp | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp 
b/src/gallium/state_trackers/egl/android/native_android.cpp
index e73d031..8620ed8 100644
--- a/src/gallium/state_trackers/egl/android/native_android.cpp
+++ b/src/gallium/state_trackers/egl/android/native_android.cpp
@@ -396,6 +396,13 @@ android_surface_swap_buffers(struct native_surface *nsurf)
struct android_surface *asurf = android_surface(nsurf);
struct android_display *adpy = asurf->adpy;
 
+   struct native_display *ndpy = &adpy->base;
+   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
+
+   /* flush buffer */
+   pipe->flush_resource(pipe, asurf->buf_res);
+   pipe->flush(pipe, NULL, 0);
+
android_surface_enqueue_buffer(&asurf->base);
 
asurf->stamp++;
-- 
1.7.12.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2014-01-13 Thread Marek Olšák
Pushed.

Marek

On Tue, Jan 7, 2014 at 11:20 PM, Martin Andersson  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  wrote:
>> Reviewed-by: Marek Olšák 
>>
>> Marek
>>
>> On Thu, Dec 26, 2013 at 10:33 AM, Martin Andersson  
>> 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@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2014-01-07 Thread Martin Andersson
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  wrote:
> Reviewed-by: Marek Olšák 
>
> Marek
>
> On Thu, Dec 26, 2013 at 10:33 AM, Martin Andersson  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@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2013-12-26 Thread Marek Olšák
Reviewed-by: Marek Olšák 

Marek

On Thu, Dec 26, 2013 at 10:33 AM, Martin Andersson  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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2013-12-26 Thread Martin Andersson
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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2013-10-01 Thread Marek Olšák
Thanks, I'll commit this.

BTW, I don't like that st/egl re-implements what st/dri does. It's
code duplication and this dri2 backend should be killed with fire and
st/dri should be used instead (with all the necessary modifications to
support non-GL state trackers).

Marek

On Tue, Oct 1, 2013 at 8:02 PM, Grigori Goronzy  wrote:
> Fixes regression on r600g due to fast clear introduced by commit
> edbbfac6.
> ---
>  src/gallium/state_trackers/egl/x11/native_dri2.c | 11 +++
>  1 file changed, 11 insertions(+)
>
> diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c 
> b/src/gallium/state_trackers/egl/x11/native_dri2.c
> index 3aa7c17..3c58979 100644
> --- a/src/gallium/state_trackers/egl/x11/native_dri2.c
> +++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
> @@ -290,6 +290,12 @@ dri2_surface_flush_frontbuffer(struct native_surface 
> *nsurf)
>  {
> struct dri2_surface *dri2surf = dri2_surface(nsurf);
> struct dri2_display *dri2dpy = dri2surf->dri2dpy;
> +   struct native_display *ndpy = &dri2dpy->base;
> +   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
> +
> +   /* flush buffer */
> +   pipe->flush_resource(pipe, 
> dri2surf->textures[NATIVE_ATTACHMENT_FRONT_LEFT]);
> +   pipe->flush(pipe, NULL, 0);
>
> /* copy to real front buffer */
> if (dri2surf->have_fake)
> @@ -313,9 +319,14 @@ dri2_surface_swap_buffers(struct native_surface *nsurf, 
> int num_rects,
>  {
> struct dri2_surface *dri2surf = dri2_surface(nsurf);
> struct dri2_display *dri2dpy = dri2surf->dri2dpy;
> +   struct native_display *ndpy = &dri2dpy->base;
> +   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
>
> /* copy to front buffer */
> if (dri2surf->have_back) {
> +  pipe->flush_resource(pipe, 
> dri2surf->textures[NATIVE_ATTACHMENT_BACK_LEFT]);
> +  pipe->flush(pipe, NULL, 0);
> +
>if (num_rects > 0)
>   x11_drawable_copy_buffers_region(dri2dpy->xscr, dri2surf->drawable,
> num_rects, rects,
> --
> 1.8.1.2
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2013-10-01 Thread Grigori Goronzy
Fixes regression on r600g due to fast clear introduced by commit
edbbfac6.
---
 src/gallium/state_trackers/egl/x11/native_dri2.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c 
b/src/gallium/state_trackers/egl/x11/native_dri2.c
index 3aa7c17..3c58979 100644
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -290,6 +290,12 @@ dri2_surface_flush_frontbuffer(struct native_surface 
*nsurf)
 {
struct dri2_surface *dri2surf = dri2_surface(nsurf);
struct dri2_display *dri2dpy = dri2surf->dri2dpy;
+   struct native_display *ndpy = &dri2dpy->base;
+   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
+
+   /* flush buffer */
+   pipe->flush_resource(pipe, 
dri2surf->textures[NATIVE_ATTACHMENT_FRONT_LEFT]);
+   pipe->flush(pipe, NULL, 0);
 
/* copy to real front buffer */
if (dri2surf->have_fake)
@@ -313,9 +319,14 @@ dri2_surface_swap_buffers(struct native_surface *nsurf, 
int num_rects,
 {
struct dri2_surface *dri2surf = dri2_surface(nsurf);
struct dri2_display *dri2dpy = dri2surf->dri2dpy;
+   struct native_display *ndpy = &dri2dpy->base;
+   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
 
/* copy to front buffer */
if (dri2surf->have_back) {
+  pipe->flush_resource(pipe, 
dri2surf->textures[NATIVE_ATTACHMENT_BACK_LEFT]);
+  pipe->flush(pipe, NULL, 0);
+
   if (num_rects > 0)
  x11_drawable_copy_buffers_region(dri2dpy->xscr, dri2surf->drawable,
num_rects, rects,
-- 
1.8.1.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev