Re: [Mesa-dev] [PATCH 1/6] egl: make eglSwapInterval a no-op for !window surfaces

2018-09-05 Thread Eric Engestrom
On Tuesday, 2018-09-04 22:24:20 +0100, Emil Velikov wrote:
> On 3 September 2018 at 19:14, Eric Engestrom  wrote:
> > On Monday, 2018-09-03 13:05:22 +0100, Emil Velikov wrote:
> >> From: Emil Velikov 
> >>
> >> As the spec says, the function is a no-op when the surface is not a
> >> window one.
> >>
> >> That spec implies that EGL_TRUE should be returned in that case, yet
> >> the ARM driver seems to return EGL_FALSE + EGL_BAD_SURFACE.
> >>
> >> The Nvidia driver returns EGL_TRUE. We follow that behaviour until a
> >> decision is made.
> >>
> >> https://gitlab.khronos.org/egl/API/merge_requests/17
> >>
> >> Cc: samiuddi 
> >> Cc: Eric Engestrom 
> >> Cc: Erik Faye-Lund 
> >> Cc: Tomasz Figa 
> >> Cc: 
> >> Signed-off-by: Emil Velikov 
> >> ---
> >> Since this is a high-level API decision I've moved it to eglapi.c
> >> This will allow us to avoid duplicating the check across each platform
> >> codebase ... or more crashes because we forgot to update one.
> >
> > Very good point! Series is:
> > Reviewed-by: Eric Engestrom 
> >
> > Could you add the references to the bugs and tests fixed from the other
> > patch, and add Cc: stable to this patch and the eglSwapBuffers() one
> > (the rest of the series is just cleanup of stuff that these two patches
> > makes unnecessary, so let's just not touch that on stable branches)?
> >
> Based on the earlier patches CtsDisplayTestCases will fail (instead of
> crash) since it expects EGL_FALSE.
> Cannot see any references or bugs - am I having a blind moment?

I mistakenly deleted the other thread, so I went from memory, but
I guess I was wrong :)
Never mind me then (twice in one day :P)
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/6] egl: make eglSwapInterval a no-op for !window surfaces

2018-09-04 Thread Emil Velikov
On 3 September 2018 at 19:14, Eric Engestrom  wrote:
> On Monday, 2018-09-03 13:05:22 +0100, Emil Velikov wrote:
>> From: Emil Velikov 
>>
>> As the spec says, the function is a no-op when the surface is not a
>> window one.
>>
>> That spec implies that EGL_TRUE should be returned in that case, yet
>> the ARM driver seems to return EGL_FALSE + EGL_BAD_SURFACE.
>>
>> The Nvidia driver returns EGL_TRUE. We follow that behaviour until a
>> decision is made.
>>
>> https://gitlab.khronos.org/egl/API/merge_requests/17
>>
>> Cc: samiuddi 
>> Cc: Eric Engestrom 
>> Cc: Erik Faye-Lund 
>> Cc: Tomasz Figa 
>> Cc: 
>> Signed-off-by: Emil Velikov 
>> ---
>> Since this is a high-level API decision I've moved it to eglapi.c
>> This will allow us to avoid duplicating the check across each platform
>> codebase ... or more crashes because we forgot to update one.
>
> Very good point! Series is:
> Reviewed-by: Eric Engestrom 
>
> Could you add the references to the bugs and tests fixed from the other
> patch, and add Cc: stable to this patch and the eglSwapBuffers() one
> (the rest of the series is just cleanup of stuff that these two patches
> makes unnecessary, so let's just not touch that on stable branches)?
>
Based on the earlier patches CtsDisplayTestCases will fail (instead of
crash) since it expects EGL_FALSE.
Cannot see any references or bugs - am I having a blind moment?

Thanks
Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/6] egl: make eglSwapInterval a no-op for !window surfaces

2018-09-03 Thread Eric Engestrom
On Monday, 2018-09-03 13:05:22 +0100, Emil Velikov wrote:
> From: Emil Velikov 
> 
> As the spec says, the function is a no-op when the surface is not a
> window one.
> 
> That spec implies that EGL_TRUE should be returned in that case, yet
> the ARM driver seems to return EGL_FALSE + EGL_BAD_SURFACE.
> 
> The Nvidia driver returns EGL_TRUE. We follow that behaviour until a
> decision is made.
> 
> https://gitlab.khronos.org/egl/API/merge_requests/17
> 
> Cc: samiuddi 
> Cc: Eric Engestrom 
> Cc: Erik Faye-Lund 
> Cc: Tomasz Figa 
> Cc: 
> Signed-off-by: Emil Velikov 
> ---
> Since this is a high-level API decision I've moved it to eglapi.c
> This will allow us to avoid duplicating the check across each platform
> codebase ... or more crashes because we forgot to update one.

Very good point! Series is:
Reviewed-by: Eric Engestrom 

Could you add the references to the bugs and tests fixed from the other
patch, and add Cc: stable to this patch and the eglSwapBuffers() one
(the rest of the series is just cleanup of stuff that these two patches
makes unnecessary, so let's just not touch that on stable branches)?

Cheers :)

> ---
>  src/egl/main/eglapi.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
> index c8c6a50f6ad..0af31a3f774 100644
> --- a/src/egl/main/eglapi.c
> +++ b/src/egl/main/eglapi.c
> @@ -1222,6 +1222,9 @@ eglSwapInterval(EGLDisplay dpy, EGLint interval)
> if (_eglGetSurfaceHandle(surf) == EGL_NO_SURFACE)
>RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
>  
> +   if (surf->Type != EGL_WINDOW_BIT)
> +  RETURN_EGL_EVAL(disp, EGL_TRUE);
> +
> interval = CLAMP(interval,
>  surf->Config->MinSwapInterval,
>  surf->Config->MaxSwapInterval);
> -- 
> 2.18.0
> 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/6] egl: make eglSwapInterval a no-op for !window surfaces

2018-09-03 Thread Emil Velikov
From: Emil Velikov 

As the spec says, the function is a no-op when the surface is not a
window one.

That spec implies that EGL_TRUE should be returned in that case, yet
the ARM driver seems to return EGL_FALSE + EGL_BAD_SURFACE.

The Nvidia driver returns EGL_TRUE. We follow that behaviour until a
decision is made.

https://gitlab.khronos.org/egl/API/merge_requests/17

Cc: samiuddi 
Cc: Eric Engestrom 
Cc: Erik Faye-Lund 
Cc: Tomasz Figa 
Cc: 
Signed-off-by: Emil Velikov 
---
Since this is a high-level API decision I've moved it to eglapi.c
This will allow us to avoid duplicating the check across each platform
codebase ... or more crashes because we forgot to update one.
---
 src/egl/main/eglapi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index c8c6a50f6ad..0af31a3f774 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -1222,6 +1222,9 @@ eglSwapInterval(EGLDisplay dpy, EGLint interval)
if (_eglGetSurfaceHandle(surf) == EGL_NO_SURFACE)
   RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
 
+   if (surf->Type != EGL_WINDOW_BIT)
+  RETURN_EGL_EVAL(disp, EGL_TRUE);
+
interval = CLAMP(interval,
 surf->Config->MinSwapInterval,
 surf->Config->MaxSwapInterval);
-- 
2.18.0

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