Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-16 Thread Pekka Paalanen
On Mon, 16 Nov 2015 10:19:39 + Daniel Stone wrote: > Hi, > > On 14 November 2015 at 07:55, Jason Ekstrand wrote: > > On Nov 13, 2015 10:43 AM, "Derek Foreman" wrote: > >> Interesting problem just occurred to me... I don't think just not > >> mixing damage/buffer_damage within a commit is

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-16 Thread Daniel Stone
Hi, On 14 November 2015 at 07:55, Jason Ekstrand wrote: > On Nov 13, 2015 10:43 AM, "Derek Foreman" wrote: >> Interesting problem just occurred to me... I don't think just not >> mixing damage/buffer_damage within a commit is good enough. >> >> What if a client commits faster than the screen re

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-13 Thread Jason Ekstrand
On Nov 13, 2015 10:43 AM, "Derek Foreman" wrote: > > On 13/11/15 02:03 AM, Pekka Paalanen wrote: > > On Thu, 12 Nov 2015 13:48:10 -0600 > > Derek Foreman wrote: > > > >> On 12/11/15 01:27 PM, Jason Ekstrand wrote: > >>> Thanks for picking this up! Also, thanks for posting this on the bug, > >>>

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-13 Thread Derek Foreman
On 13/11/15 02:03 AM, Pekka Paalanen wrote: > On Thu, 12 Nov 2015 13:48:10 -0600 > Derek Foreman wrote: > >> On 12/11/15 01:27 PM, Jason Ekstrand wrote: >>> Thanks for picking this up! Also, thanks for posting this on the bug, >>> I would have missed it otherwise! >> >> Thanks to Pekka for prodd

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-13 Thread Derek Foreman
On 13/11/15 02:03 AM, Pekka Paalanen wrote: > On Thu, 12 Nov 2015 13:48:10 -0600 > Derek Foreman wrote: > >> On 12/11/15 01:27 PM, Jason Ekstrand wrote: >>> Thanks for picking this up! Also, thanks for posting this on the bug, >>> I would have missed it otherwise! >> >> Thanks to Pekka for prodd

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-13 Thread Pekka Paalanen
On Thu, 12 Nov 2015 13:48:10 -0600 Derek Foreman wrote: > On 12/11/15 01:27 PM, Jason Ekstrand wrote: > > Thanks for picking this up! Also, thanks for posting this on the bug, > > I would have missed it otherwise! > > Thanks to Pekka for prodding me to do so. :) > > > On Thu, Nov 12, 2015 at 1

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-12 Thread Derek Foreman
On 12/11/15 01:27 PM, Jason Ekstrand wrote: > Thanks for picking this up! Also, thanks for posting this on the bug, > I would have missed it otherwise! Thanks to Pekka for prodding me to do so. :) > On Thu, Nov 12, 2015 at 11:16 AM, Derek Foreman > wrote: >> On 09/11/15 09:06 AM, Pekka Paalane

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-12 Thread Jason Ekstrand
Thanks for picking this up! Also, thanks for posting this on the bug, I would have missed it otherwise! On Thu, Nov 12, 2015 at 11:16 AM, Derek Foreman wrote: > On 09/11/15 09:06 AM, Pekka Paalanen wrote: >> On Fri, 6 Nov 2015 12:55:19 -0600 >> Derek Foreman wrote: >> >>> wl_surface.damage use

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-12 Thread Derek Foreman
There seems to be some heated debate about whether we should deprecate the old request or not, and how aggressively we should push people towards the new one. I've stayed out of that conversation, and think if we want to consider that we can still do so after we land the new buffer_damage (now to

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-12 Thread Derek Foreman
On 09/11/15 09:06 AM, Pekka Paalanen wrote: > On Fri, 6 Nov 2015 12:55:19 -0600 > Derek Foreman wrote: > >> wl_surface.damage uses surface local co-ordinates. >> >> Buffer scale and buffer transforms came along, and EGL surfaces >> have no understanding of them. >> >> Theoretically, clients pass

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-10 Thread Bill Spitzak
On Mon, Nov 9, 2015 at 11:47 PM, Pekka Paalanen wrote: > On Mon, 9 Nov 2015 10:28:13 -0800 > Bill Spitzak wrote: > > > I believe wl_surface.damage should be defined as "the same as > > w_surface.buffer_damage if the only transforms are due to an integer > buffer > > scale and the 8 possible buff

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-09 Thread Pekka Paalanen
On Mon, 9 Nov 2015 10:28:13 -0800 Bill Spitzak wrote: > I believe wl_surface.damage should be defined as "the same as > w_surface.buffer_damage if the only transforms are due to an integer buffer > scale and the 8 possible buffer transforms". This means it is undefined if > the wl_scalar proposal

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-09 Thread Bill Spitzak
I believe wl_surface.damage should be defined as "the same as w_surface.buffer_damage if the only transforms are due to an integer buffer scale and the 8 possible buffer transforms". This means it is undefined if the wl_scalar proposal is used, and avoids the need to define it for any future transf

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-09 Thread Pekka Paalanen
On Fri, 6 Nov 2015 12:55:19 -0600 Derek Foreman wrote: > wl_surface.damage uses surface local co-ordinates. > > Buffer scale and buffer transforms came along, and EGL surfaces > have no understanding of them. > > Theoretically, clients pass damage rectangles - in Y-inverted surface > co-ordina

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-09 Thread Pekka Paalanen
On Sat, 7 Nov 2015 09:49:21 -0800 "Jasper St. Pierre" wrote: > So we fix the bug by adding wl_surface.buffer_damage, since it's > impossible for Mesa to know about buffer transformations... and then > what? Be happy. > The only way we can properly interpret the wl_surface.damage event is > it b

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-07 Thread Daniel Stone
Hi, On 7 November 2015 at 17:49, Jasper St. Pierre wrote: > OK. So the bug *wasn't* fixed two years ago like you were saying, and > under transformations, mesa is still wrong. It was fixed two years ago for clients using plain eglSwapBuffers, which I posit is functionally equivalent to all of th

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-07 Thread Jasper St. Pierre
OK. So the bug *wasn't* fixed two years ago like you were saying, and under transformations, mesa is still wrong. So we fix the bug by adding wl_surface.buffer_damage, since it's impossible for Mesa to know about buffer transformations... and then what? The only way we can properly interpret the

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-07 Thread Daniel Stone
Hi, On 7 November 2015 at 16:59, Jasper St. Pierre wrote: > I don't see where. I see eglSwapBuffersWithDamage still looking like > it shoves the rects across the wire in buffer space, without any > modification. > > http://cgit.freedesktop.org/mesa/mesa/tree/src/egl/drivers/dri2/platform_wayland.

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-07 Thread Jasper St. Pierre
I don't see where. I see eglSwapBuffersWithDamage still looking like it shoves the rects across the wire in buffer space, without any modification. http://cgit.freedesktop.org/mesa/mesa/tree/src/egl/drivers/dri2/platform_wayland.c#n705 I checked the Mali driver implementation I have, and it does

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-07 Thread Daniel Stone
On 6 November 2015 at 19:08, Jasper St. Pierre wrote: > To help clear things up, I think we should deprecate the > wl_surface.damage request and document that the coordinates are > effectively undefined -- for legacy reasons, if you see > wl_surface.damage, it should be considered a damage for the

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-06 Thread Bill Spitzak
The description for wl_surface.damage should be shortened to a minimal indication that this is for back-compatibility only and that refer to the buffer_damage request. Something like "identical to buffer_damage if the buffer and surface coordinates are equal, otherwise the behaviour is undefined".

Re: [RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-06 Thread Jasper St. Pierre
To help clear things up, I think we should deprecate the wl_surface.damage request and document that the coordinates are effectively undefined -- for legacy reasons, if you see wl_surface.damage, it should be considered a damage for the entire surface. On Fri, Nov 6, 2015 at 10:55 AM, Derek Forema

[RFC wayland] protocol: Add wl_surface.buffer_damage

2015-11-06 Thread Derek Foreman
wl_surface.damage uses surface local co-ordinates. Buffer scale and buffer transforms came along, and EGL surfaces have no understanding of them. Theoretically, clients pass damage rectangles - in Y-inverted surface co-ordinates) to EGLSwapBuffersWithDamage, and the EGL implementation passed them