Re: [Mesa-dev] [PATCH 1/7] mesa/es3.1: enable DRAW_INDIRECT_BUFFER_BINDING for gles3.1

2015-05-14 Thread Tapani

On 05/13/2015 09:52 PM, Ian Romanick wrote:

On 05/06/2015 03:19 AM, Tapani Pälli wrote:

I've just noticed that this is wrong, sorry :/ We should to make a new
section for some of the enums that are only in GL core and ES31,
DRAW_INDIRECT_BUFFER_BINDING is one of these cases .. so this patch is
broken. Same may apply for some of your patches, there should not be
duplicates but only one entry per enum in the correct API section.

Hm... as far as I can tell, the primary benefit of that would be faster
rejection of GLES 3.1 enums in GLES 3.0 contexts.  Maybe it will also
reduce hash collisions?  It doesn't look like there are any extensions
part of 3.1 that we will exposed in 3.0 or earlier, so adding a new API
section shouldn't cause more churn later.

Maybe Kristian can comment, since the get-hash is his creation.


FWIW here's the v2 with changes mentioned above:

http://lists.freedesktop.org/archives/mesa-dev/2015-May/083593.html


(Otherwise, enabling these getters for ES3.1 is correct thing todo.)


On 05/06/2015 11:53 AM, Marta Lofstedt wrote:

From: Tapani Pälli 

(increases ES31-CTS.draw_indirect.basic.* passing tests)

Signed-off-by: Tapani Pälli 
---
   src/mesa/main/get.c  | 12 
   src/mesa/main/get_hash_params.py |  2 ++
   2 files changed, 14 insertions(+)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index a881bc5..9898197 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -138,6 +138,7 @@ enum value_extra {
  EXTRA_API_GL_CORE,
  EXTRA_API_ES2,
  EXTRA_API_ES3,
+   EXTRA_API_ES31,
  EXTRA_NEW_BUFFERS,
  EXTRA_NEW_FRAG_CLAMP,
  EXTRA_VALID_DRAW_BUFFER,
@@ -348,6 +349,12 @@ static const int
extra_ARB_shader_image_load_store_and_geometry_shader[] = {
  EXTRA_END
   };

+static const int extra_ARB_draw_indirect_es31[] = {
+   EXT(ARB_draw_indirect),
+   EXTRA_API_ES31,
+   EXTRA_END
+};
+
   EXTRA_EXT(ARB_texture_cube_map);
   EXTRA_EXT(EXT_texture_array);
   EXTRA_EXT(NV_fog_distance);
@@ -1078,6 +1085,11 @@ check_extra(struct gl_context *ctx, const char
*func, const struct value_desc *d
if (_mesa_is_gles3(ctx))
   api_found = GL_TRUE;
break;
+  case EXTRA_API_ES31:
+ api_check = GL_TRUE;
+ if (_mesa_is_gles31(ctx))
+api_found = GL_TRUE;
+ break;
 case EXTRA_API_GL:
api_check = GL_TRUE;
if (_mesa_is_desktop_gl(ctx))
diff --git a/src/mesa/main/get_hash_params.py
b/src/mesa/main/get_hash_params.py
index 41cb2c1..998efe8 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -407,6 +407,8 @@ descriptor=[
   { "apis": ["GL", "GL_CORE", "GLES3"], "params": [
   # GL_ARB_sampler_objects / GL 3.3 / GLES 3.0
 [ "SAMPLER_BINDING", "LOC_CUSTOM, TYPE_INT, GL_SAMPLER_BINDING,
NO_EXTRA" ],
+# GL_ARB_draw_indirect / GLES 3.1
+  [ "DRAW_INDIRECT_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0,
extra_ARB_draw_indirect_es31" ],
   ]},

   # Remaining enums are only in OpenGL


___
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 1/7] mesa/es3.1: enable DRAW_INDIRECT_BUFFER_BINDING for gles3.1

2015-05-13 Thread Ian Romanick
On 05/06/2015 03:19 AM, Tapani Pälli wrote:
> I've just noticed that this is wrong, sorry :/ We should to make a new
> section for some of the enums that are only in GL core and ES31,
> DRAW_INDIRECT_BUFFER_BINDING is one of these cases .. so this patch is
> broken. Same may apply for some of your patches, there should not be
> duplicates but only one entry per enum in the correct API section.

Hm... as far as I can tell, the primary benefit of that would be faster
rejection of GLES 3.1 enums in GLES 3.0 contexts.  Maybe it will also
reduce hash collisions?  It doesn't look like there are any extensions
part of 3.1 that we will exposed in 3.0 or earlier, so adding a new API
section shouldn't cause more churn later.

Maybe Kristian can comment, since the get-hash is his creation.

> (Otherwise, enabling these getters for ES3.1 is correct thing todo.)
> 
> 
> On 05/06/2015 11:53 AM, Marta Lofstedt wrote:
>> From: Tapani Pälli 
>>
>> (increases ES31-CTS.draw_indirect.basic.* passing tests)
>>
>> Signed-off-by: Tapani Pälli 
>> ---
>>   src/mesa/main/get.c  | 12 
>>   src/mesa/main/get_hash_params.py |  2 ++
>>   2 files changed, 14 insertions(+)
>>
>> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
>> index a881bc5..9898197 100644
>> --- a/src/mesa/main/get.c
>> +++ b/src/mesa/main/get.c
>> @@ -138,6 +138,7 @@ enum value_extra {
>>  EXTRA_API_GL_CORE,
>>  EXTRA_API_ES2,
>>  EXTRA_API_ES3,
>> +   EXTRA_API_ES31,
>>  EXTRA_NEW_BUFFERS,
>>  EXTRA_NEW_FRAG_CLAMP,
>>  EXTRA_VALID_DRAW_BUFFER,
>> @@ -348,6 +349,12 @@ static const int
>> extra_ARB_shader_image_load_store_and_geometry_shader[] = {
>>  EXTRA_END
>>   };
>>
>> +static const int extra_ARB_draw_indirect_es31[] = {
>> +   EXT(ARB_draw_indirect),
>> +   EXTRA_API_ES31,
>> +   EXTRA_END
>> +};
>> +
>>   EXTRA_EXT(ARB_texture_cube_map);
>>   EXTRA_EXT(EXT_texture_array);
>>   EXTRA_EXT(NV_fog_distance);
>> @@ -1078,6 +1085,11 @@ check_extra(struct gl_context *ctx, const char
>> *func, const struct value_desc *d
>>if (_mesa_is_gles3(ctx))
>>   api_found = GL_TRUE;
>>break;
>> +  case EXTRA_API_ES31:
>> + api_check = GL_TRUE;
>> + if (_mesa_is_gles31(ctx))
>> +api_found = GL_TRUE;
>> + break;
>> case EXTRA_API_GL:
>>api_check = GL_TRUE;
>>if (_mesa_is_desktop_gl(ctx))
>> diff --git a/src/mesa/main/get_hash_params.py
>> b/src/mesa/main/get_hash_params.py
>> index 41cb2c1..998efe8 100644
>> --- a/src/mesa/main/get_hash_params.py
>> +++ b/src/mesa/main/get_hash_params.py
>> @@ -407,6 +407,8 @@ descriptor=[
>>   { "apis": ["GL", "GL_CORE", "GLES3"], "params": [
>>   # GL_ARB_sampler_objects / GL 3.3 / GLES 3.0
>> [ "SAMPLER_BINDING", "LOC_CUSTOM, TYPE_INT, GL_SAMPLER_BINDING,
>> NO_EXTRA" ],
>> +# GL_ARB_draw_indirect / GLES 3.1
>> +  [ "DRAW_INDIRECT_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0,
>> extra_ARB_draw_indirect_es31" ],
>>   ]},
>>
>>   # Remaining enums are only in OpenGL
>>
> ___
> 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 1/7] mesa/es3.1: enable DRAW_INDIRECT_BUFFER_BINDING for gles3.1

2015-05-06 Thread Lofstedt, Marta
That's OK, Tapani, I will fix up "my" patches once I see what reception you 
patch gets.

/Marta

> -Original Message-
> From: Palli, Tapani
> Sent: Wednesday, May 6, 2015 12:19 PM
> To: Lofstedt, Marta
> Cc: mesa-dev@lists.freedesktop.org
> Subject: Re: [PATCH 1/7] mesa/es3.1: enable
> DRAW_INDIRECT_BUFFER_BINDING for gles3.1
> 
> I've just noticed that this is wrong, sorry :/ We should to make a new section
> for some of the enums that are only in GL core and ES31,
> DRAW_INDIRECT_BUFFER_BINDING is one of these cases .. so this patch is
> broken. Same may apply for some of your patches, there should not be
> duplicates but only one entry per enum in the correct API section.
> 
> (Otherwise, enabling these getters for ES3.1 is correct thing todo.)
> 
> 
> On 05/06/2015 11:53 AM, Marta Lofstedt wrote:
> > From: Tapani Pälli 
> >
> > (increases ES31-CTS.draw_indirect.basic.* passing tests)
> >
> > Signed-off-by: Tapani Pälli 
> > ---
> >   src/mesa/main/get.c  | 12 
> >   src/mesa/main/get_hash_params.py |  2 ++
> >   2 files changed, 14 insertions(+)
> >
> > diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index
> > a881bc5..9898197 100644
> > --- a/src/mesa/main/get.c
> > +++ b/src/mesa/main/get.c
> > @@ -138,6 +138,7 @@ enum value_extra {
> >  EXTRA_API_GL_CORE,
> >  EXTRA_API_ES2,
> >  EXTRA_API_ES3,
> > +   EXTRA_API_ES31,
> >  EXTRA_NEW_BUFFERS,
> >  EXTRA_NEW_FRAG_CLAMP,
> >  EXTRA_VALID_DRAW_BUFFER,
> > @@ -348,6 +349,12 @@ static const int
> extra_ARB_shader_image_load_store_and_geometry_shader[] = {
> >  EXTRA_END
> >   };
> >
> > +static const int extra_ARB_draw_indirect_es31[] = {
> > +   EXT(ARB_draw_indirect),
> > +   EXTRA_API_ES31,
> > +   EXTRA_END
> > +};
> > +
> >   EXTRA_EXT(ARB_texture_cube_map);
> >   EXTRA_EXT(EXT_texture_array);
> >   EXTRA_EXT(NV_fog_distance);
> > @@ -1078,6 +1085,11 @@ check_extra(struct gl_context *ctx, const char
> *func, const struct value_desc *d
> >if (_mesa_is_gles3(ctx))
> >   api_found = GL_TRUE;
> >  break;
> > +  case EXTRA_API_ES31:
> > + api_check = GL_TRUE;
> > + if (_mesa_is_gles31(ctx))
> > +api_found = GL_TRUE;
> > +break;
> > case EXTRA_API_GL:
> >api_check = GL_TRUE;
> >if (_mesa_is_desktop_gl(ctx)) diff --git
> > a/src/mesa/main/get_hash_params.py
> b/src/mesa/main/get_hash_params.py
> > index 41cb2c1..998efe8 100644
> > --- a/src/mesa/main/get_hash_params.py
> > +++ b/src/mesa/main/get_hash_params.py
> > @@ -407,6 +407,8 @@ descriptor=[
> >   { "apis": ["GL", "GL_CORE", "GLES3"], "params": [
> >   # GL_ARB_sampler_objects / GL 3.3 / GLES 3.0
> > [ "SAMPLER_BINDING", "LOC_CUSTOM, TYPE_INT,
> GL_SAMPLER_BINDING,
> > NO_EXTRA" ],
> > +# GL_ARB_draw_indirect / GLES 3.1
> > +  [ "DRAW_INDIRECT_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0,
> > +extra_ARB_draw_indirect_es31" ],
> >   ]},
> >
> >   # Remaining enums are only in OpenGL
> >
--
Intel Sweden AB
Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden
Registration Number: 556189-6027

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/7] mesa/es3.1: enable DRAW_INDIRECT_BUFFER_BINDING for gles3.1

2015-05-06 Thread Tapani Pälli
I've just noticed that this is wrong, sorry :/ We should to make a new 
section for some of the enums that are only in GL core and ES31, 
DRAW_INDIRECT_BUFFER_BINDING is one of these cases .. so this patch is 
broken. Same may apply for some of your patches, there should not be 
duplicates but only one entry per enum in the correct API section.


(Otherwise, enabling these getters for ES3.1 is correct thing todo.)


On 05/06/2015 11:53 AM, Marta Lofstedt wrote:

From: Tapani Pälli 

(increases ES31-CTS.draw_indirect.basic.* passing tests)

Signed-off-by: Tapani Pälli 
---
  src/mesa/main/get.c  | 12 
  src/mesa/main/get_hash_params.py |  2 ++
  2 files changed, 14 insertions(+)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index a881bc5..9898197 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -138,6 +138,7 @@ enum value_extra {
 EXTRA_API_GL_CORE,
 EXTRA_API_ES2,
 EXTRA_API_ES3,
+   EXTRA_API_ES31,
 EXTRA_NEW_BUFFERS,
 EXTRA_NEW_FRAG_CLAMP,
 EXTRA_VALID_DRAW_BUFFER,
@@ -348,6 +349,12 @@ static const int 
extra_ARB_shader_image_load_store_and_geometry_shader[] = {
 EXTRA_END
  };

+static const int extra_ARB_draw_indirect_es31[] = {
+   EXT(ARB_draw_indirect),
+   EXTRA_API_ES31,
+   EXTRA_END
+};
+
  EXTRA_EXT(ARB_texture_cube_map);
  EXTRA_EXT(EXT_texture_array);
  EXTRA_EXT(NV_fog_distance);
@@ -1078,6 +1085,11 @@ check_extra(struct gl_context *ctx, const char *func, 
const struct value_desc *d
   if (_mesa_is_gles3(ctx))
  api_found = GL_TRUE;
 break;
+  case EXTRA_API_ES31:
+ api_check = GL_TRUE;
+ if (_mesa_is_gles31(ctx))
+api_found = GL_TRUE;
+break;
case EXTRA_API_GL:
   api_check = GL_TRUE;
   if (_mesa_is_desktop_gl(ctx))
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 41cb2c1..998efe8 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -407,6 +407,8 @@ descriptor=[
  { "apis": ["GL", "GL_CORE", "GLES3"], "params": [
  # GL_ARB_sampler_objects / GL 3.3 / GLES 3.0
[ "SAMPLER_BINDING", "LOC_CUSTOM, TYPE_INT, GL_SAMPLER_BINDING, NO_EXTRA" ],
+# GL_ARB_draw_indirect / GLES 3.1
+  [ "DRAW_INDIRECT_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0, 
extra_ARB_draw_indirect_es31" ],
  ]},

  # Remaining enums are only in OpenGL


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


[Mesa-dev] [PATCH 1/7] mesa/es3.1: enable DRAW_INDIRECT_BUFFER_BINDING for gles3.1

2015-05-06 Thread Marta Lofstedt
From: Tapani Pälli 

(increases ES31-CTS.draw_indirect.basic.* passing tests)

Signed-off-by: Tapani Pälli 
---
 src/mesa/main/get.c  | 12 
 src/mesa/main/get_hash_params.py |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index a881bc5..9898197 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -138,6 +138,7 @@ enum value_extra {
EXTRA_API_GL_CORE,
EXTRA_API_ES2,
EXTRA_API_ES3,
+   EXTRA_API_ES31,
EXTRA_NEW_BUFFERS, 
EXTRA_NEW_FRAG_CLAMP,
EXTRA_VALID_DRAW_BUFFER,
@@ -348,6 +349,12 @@ static const int 
extra_ARB_shader_image_load_store_and_geometry_shader[] = {
EXTRA_END
 };
 
+static const int extra_ARB_draw_indirect_es31[] = {
+   EXT(ARB_draw_indirect),
+   EXTRA_API_ES31,
+   EXTRA_END
+};
+
 EXTRA_EXT(ARB_texture_cube_map);
 EXTRA_EXT(EXT_texture_array);
 EXTRA_EXT(NV_fog_distance);
@@ -1078,6 +1085,11 @@ check_extra(struct gl_context *ctx, const char *func, 
const struct value_desc *d
  if (_mesa_is_gles3(ctx))
 api_found = GL_TRUE;
 break;
+  case EXTRA_API_ES31:
+ api_check = GL_TRUE;
+ if (_mesa_is_gles31(ctx))
+api_found = GL_TRUE;
+break;
   case EXTRA_API_GL:
  api_check = GL_TRUE;
  if (_mesa_is_desktop_gl(ctx))
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 41cb2c1..998efe8 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -407,6 +407,8 @@ descriptor=[
 { "apis": ["GL", "GL_CORE", "GLES3"], "params": [
 # GL_ARB_sampler_objects / GL 3.3 / GLES 3.0
   [ "SAMPLER_BINDING", "LOC_CUSTOM, TYPE_INT, GL_SAMPLER_BINDING, NO_EXTRA" ],
+# GL_ARB_draw_indirect / GLES 3.1
+  [ "DRAW_INDIRECT_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0, 
extra_ARB_draw_indirect_es31" ],
 ]},
 
 # Remaining enums are only in OpenGL
-- 
1.9.1

--
Intel Sweden AB
Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden
Registration Number: 556189-6027

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev