Re: [waffle] [PATCH 4/6] egl: Add support for robust access contexts.

2016-04-11 Thread Chad Versace
On 04/06/2016 08:59 AM, Bas Nieuwenhuizen wrote:
> Signed-off-by: Bas Nieuwenhuizen 
> ---
>  src/waffle/egl/wegl_config.c  | 16 
>  src/waffle/egl/wegl_context.c |  9 +
>  src/waffle/egl/wegl_display.c |  1 +
>  src/waffle/egl/wegl_display.h |  1 +
>  4 files changed, 27 insertions(+)
> 
> diff --git a/src/waffle/egl/wegl_config.c b/src/waffle/egl/wegl_config.c
> index a79bc53..1c3f416 100644
> --- a/src/waffle/egl/wegl_config.c
> +++ b/src/waffle/egl/wegl_config.c
> @@ -55,6 +55,22 @@ check_context_attrs(struct wegl_display *dpy,
>  return false;
>  }
>  
> +if (attrs->context_robust && !dpy->EXT_create_context_robustness &&
> +attrs->context_api != WAFFLE_CONTEXT_OPENGL) {
> +wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM,
> + "EGL_EXT_create_context_robustness is required in order 
> to "
> + "request a robust access context for OpenGL ES");
> +return false;
> +}
> +
> +if (attrs->context_robust && !dpy->KHR_create_context &&
> +attrs->context_api == WAFFLE_CONTEXT_OPENGL) {
> +wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM,
> + "EGL_KHR_create_context is required in order to "
> + "request a robust access context for OpenGL");
> +return false;
> +}
> +
>  switch (attrs->context_api) {
>  case WAFFLE_CONTEXT_OPENGL:
>  if (!wcore_config_attrs_version_eq(attrs, 10) && 
> !dpy->KHR_create_context) {
> diff --git a/src/waffle/egl/wegl_context.c b/src/waffle/egl/wegl_context.c
> index f4ee6cd..67cbc04 100644
> --- a/src/waffle/egl/wegl_context.c
> +++ b/src/waffle/egl/wegl_context.c
> @@ -95,6 +95,11 @@ create_real_context(struct wegl_config *config,
>  context_flags |= 
> EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR;
>  }
>  
> +if (attrs->context_robust) {
> +assert(dpy->KHR_create_context);
> +context_flags |= EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR;
> +}
> +
>  if (wcore_config_attrs_version_ge(attrs, 32))  {
>  assert(dpy->KHR_create_context);
>  switch (attrs->context_profile) {
> @@ -128,6 +133,10 @@ create_real_context(struct wegl_config *config,
>  assert(attrs->context_minor_version == 0);
>  }
>  
> +if (attrs->context_robust) {
> +attrib_list[i++] = EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT;
> +attrib_list[i++] = EGL_TRUE;
> +}
>  break;
>  
>  default:

Hi Bas,

This patch is correct for EGL <= 1.4. However, EGL 1.5 made
the EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT attribute (but not the flag)
legal for all OpenGL and OpenGL ES context versions.

From the EGL 1.5 (2014.08.27) spec:

3.7.1.5 OpenGL and OpenGL ES Robust Buffer Access

If the EGL_CONTEXT_OPENGL_ROBUST_ACCESS attribute is set to EGL_TRUE,
a context supporting robust buffer access will be created. OpenGL contexts
must support the GL_ARB_robustness extension, or equivalent core API
functional- ity. OpenGL ES contexts must support the GL_EXT_robustness
extension, or equivalent core API functionality.

This attribute is supported only for OpenGL and OpenGL ES contexts. If the
implementation does not support robust buffer access, context creation will
fail.

The default value of EGL_CONTEXT_OPENGL_ROBUST_ACCESS is EGL_ FALSE .

If you have time, please follow-up with a patch that unconditonally permits
WAFFLE_CONTEXT_ROBUST_ACCESS if the EGL version is >= 1.5.

If you don't have time, please let me know and I will find time to do it.
___
waffle mailing list
waffle@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 1/6] wcore: Add support for robust access contexts.

2016-04-11 Thread Chad Versace
Thanks Bas. I pushed the patches to master.
___
waffle mailing list
waffle@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 1/6] wcore: Add support for robust access contexts.

2016-04-11 Thread Chad Versace
On 04/11/2016 01:11 PM, Emil Velikov wrote:
> On 6 April 2016 at 16:59, Bas Nieuwenhuizen  wrote:
>> Signed-off-by: Bas Nieuwenhuizen 
>> ---
>>  include/waffle/waffle.h  |  4 
>>  man/waffle_config.3.xml  | 24 
>>  src/waffle/core/wcore_config_attrs.c |  3 +++
>>  src/waffle/core/wcore_config_attrs.h |  1 +
>>  src/waffle/core/wcore_util.c |  1 +
>>  5 files changed, 33 insertions(+)
>>
>> diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h
>> index df0218e..b207f37 100644
>> --- a/include/waffle/waffle.h
>> +++ b/include/waffle/waffle.h
>> @@ -142,6 +142,10 @@ enum waffle_enum {
>>  WAFFLE_CONTEXT_DEBUG= 0x0216,
>>  #endif
>>
>> +#if WAFFLE_API_VERSION >= 0x106
>> +WAFFLE_CONTEXT_ROBUST_ACCESS= 0x0217,
>> +#endif
>> +
> Silly me should have mentioned that we decided against using feature
> (version) checks for the enums. Unless anyone feels otherwise I'd just
> say go with the patch [as-is] and nuke any such checks in one go. Both
> in the source and man pages.

Thanks for reminding me about that decision. I forgot.

The deciding email is here:

Subject: Re: [waffle] [PATCH 07/10] waffle: add full screen window 
request
From: Emil Velikov
Date: Thu, 23 Apr 2015 03:03:08 -0700


https://www.mail-archive.com/waffle%40lists.freedesktop.org/msg01161.html

___
waffle mailing list
waffle@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 1/6] wcore: Add support for robust access contexts.

2016-04-11 Thread Chad Versace
On 04/11/2016 02:04 PM, Bas Nieuwenhuizen wrote:
> Could this be also committed with those changes or do you want me to
> make a v2 that removes the version check? I don't have commit access.

Bas, you don't need to resubmit the series. It's a small change, so I'll
just do it myself as a follow-up commit.

By the way, the series is
Reviewed-by: Chad Versace 

There are some problems with the EGL patch, but those problems can be
fixed in follow-up work. I'll send my comments to that patch soon.
___
waffle mailing list
waffle@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 1/6] wcore: Add support for robust access contexts.

2016-04-11 Thread Emil Velikov
On 11 April 2016 at 21:11, Emil Velikov  wrote:
> On 6 April 2016 at 16:59, Bas Nieuwenhuizen  wrote:
>> Signed-off-by: Bas Nieuwenhuizen 
>> ---
>>  include/waffle/waffle.h  |  4 
>>  man/waffle_config.3.xml  | 24 
>>  src/waffle/core/wcore_config_attrs.c |  3 +++
>>  src/waffle/core/wcore_config_attrs.h |  1 +
>>  src/waffle/core/wcore_util.c |  1 +
>>  5 files changed, 33 insertions(+)
>>
>> diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h
>> index df0218e..b207f37 100644
>> --- a/include/waffle/waffle.h
>> +++ b/include/waffle/waffle.h
>> @@ -142,6 +142,10 @@ enum waffle_enum {
>>  WAFFLE_CONTEXT_DEBUG= 0x0216,
>>  #endif
>>
>> +#if WAFFLE_API_VERSION >= 0x106
>> +WAFFLE_CONTEXT_ROBUST_ACCESS= 0x0217,
>> +#endif
>> +
> Silly me should have mentioned that we decided against using feature
> (version) checks for the enums. Unless anyone feels otherwise I'd just
> say go with the patch [as-is] and nuke any such checks in one go. Both
> in the source and man pages.
>
To hasty to press "Send"

The series is:
Reviewed-by: Emil Velikov 

Thanks Bas !

-Emil
___
waffle mailing list
waffle@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 1/6] wcore: Add support for robust access contexts.

2016-04-11 Thread Emil Velikov
On 6 April 2016 at 16:59, Bas Nieuwenhuizen  wrote:
> Signed-off-by: Bas Nieuwenhuizen 
> ---
>  include/waffle/waffle.h  |  4 
>  man/waffle_config.3.xml  | 24 
>  src/waffle/core/wcore_config_attrs.c |  3 +++
>  src/waffle/core/wcore_config_attrs.h |  1 +
>  src/waffle/core/wcore_util.c |  1 +
>  5 files changed, 33 insertions(+)
>
> diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h
> index df0218e..b207f37 100644
> --- a/include/waffle/waffle.h
> +++ b/include/waffle/waffle.h
> @@ -142,6 +142,10 @@ enum waffle_enum {
>  WAFFLE_CONTEXT_DEBUG= 0x0216,
>  #endif
>
> +#if WAFFLE_API_VERSION >= 0x106
> +WAFFLE_CONTEXT_ROBUST_ACCESS= 0x0217,
> +#endif
> +
Silly me should have mentioned that we decided against using feature
(version) checks for the enums. Unless anyone feels otherwise I'd just
say go with the patch [as-is] and nuke any such checks in one go. Both
in the source and man pages.

-Emil
___
waffle mailing list
waffle@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 6/6] nacl: Add an error when trying to use a robust access context.

2016-04-11 Thread Chad Versace
On 04/06/2016 09:59 PM, Tapani Pälli wrote:
> This looks correct to me;
> 
> Reviewed-by: Tapani Pälli 
> 
> Note that following patch is required to build waffle nacl support on any 
> recent nacl sdk versions:
> 
> https://lists.freedesktop.org/archives/waffle/2015-October/001266.html

Tapani, is your r-b for only patch 6/6 or the the complete series?
___
waffle mailing list
waffle@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/waffle