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


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

2016-04-06 Thread Bas Nieuwenhuizen
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
+
 WAFFLE_RED_SIZE = 0x0201,
 WAFFLE_GREEN_SIZE   = 0x0202,
 WAFFLE_BLUE_SIZE= 0x0203,
diff --git a/man/waffle_config.3.xml b/man/waffle_config.3.xml
index a8cb98d..b8ae67a 100644
--- a/man/waffle_config.3.xml
+++ b/man/waffle_config.3.xml
@@ -412,6 +412,30 @@ struct waffle_config;
   
 
   
+WAFFLE_CONTEXT_ROBUST_ACCESS
+
+  
+Feature test macro: WAFFLE_API_VERSION >= 0x0106.
+(See 
waffle_feature_test_macros7).
+  
+  
+This attribute, if true, instructs
+
waffle_context_create3
+to create a robust access context.
+  
+  
+Robust access contexts can implement additional runtime checks, 
such as bounds checks for various
+operations.
+  
+  
+This attribute is optional and its default value is false(0).
+
+Valid values are true(1), false(0), and 
WAFFLE_DONT_CARE.
+  
+
+  
+
+  
 WAFFLE_RED_SIZE
 WAFFLE_GREEN_SIZE
 WAFFLE_BLUE_SIZE
diff --git a/src/waffle/core/wcore_config_attrs.c 
b/src/waffle/core/wcore_config_attrs.c
index 4a2cb5d..9caa0cc 100644
--- a/src/waffle/core/wcore_config_attrs.c
+++ b/src/waffle/core/wcore_config_attrs.c
@@ -54,6 +54,7 @@ check_keys(const int32_t attrib_list[])
 case WAFFLE_CONTEXT_PROFILE:
 case WAFFLE_CONTEXT_FORWARD_COMPATIBLE:
 case WAFFLE_CONTEXT_DEBUG:
+case WAFFLE_CONTEXT_ROBUST_ACCESS:
 case WAFFLE_RED_SIZE:
 case WAFFLE_GREEN_SIZE:
 case WAFFLE_BLUE_SIZE:
@@ -339,6 +340,7 @@ set_misc_defaults(struct wcore_config_attrs *attrs)
 // [2] EGL 1.4 spec (2011.04.06), Table 3.4
 
 attrs->context_debug= false;
+attrs->context_robust   = false;
 
 attrs->rgba_size= 0;
 attrs->red_size = 0;
@@ -414,6 +416,7 @@ parse_misc(struct wcore_config_attrs *attrs,
 CASE_INT(WAFFLE_SAMPLES, samples)
 
 CASE_BOOL(WAFFLE_CONTEXT_DEBUG, context_debug, false);
+CASE_BOOL(WAFFLE_CONTEXT_ROBUST_ACCESS, context_robust, false);
 CASE_BOOL(WAFFLE_SAMPLE_BUFFERS, sample_buffers, 
DEFAULT_SAMPLE_BUFFERS);
 CASE_BOOL(WAFFLE_DOUBLE_BUFFERED, double_buffered, 
DEFAULT_DOUBLE_BUFFERED);
 CASE_BOOL(WAFFLE_ACCUM_BUFFER, accum_buffer, DEFAULT_ACCUM_BUFFER);
diff --git a/src/waffle/core/wcore_config_attrs.h 
b/src/waffle/core/wcore_config_attrs.h
index cca5e8b..e00e517 100644
--- a/src/waffle/core/wcore_config_attrs.h
+++ b/src/waffle/core/wcore_config_attrs.h
@@ -54,6 +54,7 @@ struct wcore_config_attrs {
 
 bool context_forward_compatible;
 bool context_debug;
+bool context_robust;
 bool double_buffered;
 bool sample_buffers;
 bool accum_buffer;
diff --git a/src/waffle/core/wcore_util.c b/src/waffle/core/wcore_util.c
index c563fae..4c09164 100644
--- a/src/waffle/core/wcore_util.c
+++ b/src/waffle/core/wcore_util.c
@@ -97,6 +97,7 @@ wcore_enum_to_string(int32_t e)
 CASE(WAFFLE_CONTEXT_COMPATIBILITY_PROFILE);
 CASE(WAFFLE_CONTEXT_FORWARD_COMPATIBLE);
 CASE(WAFFLE_CONTEXT_DEBUG);
+CASE(WAFFLE_CONTEXT_ROBUST_ACCESS);
 CASE(WAFFLE_RED_SIZE);
 CASE(WAFFLE_GREEN_SIZE);
 CASE(WAFFLE_BLUE_SIZE);
-- 
2.8.0

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