[Mesa-dev] [PATCH v2 2/8] mesa: do not enable KHR_debug for ES 1.0

Timothy Arceri timothy.arceri at collabora.com
Fri Nov 27 13:40:51 PST 2015


On Thu, 2015-11-26 at 14:08 +0000, Emil Velikov wrote:
> On 26 November 2015 at 04:39, Timothy Arceri
> <timothy.arceri at collabora.com> wrote:
> > On Thu, 2015-11-26 at 00:36 +0000, Emil Velikov wrote:
> > > The extension requires (cough implements) GetPointervKHR (alias
> > > of
> > > GetPointerv) which in itself is available for ES 1.1 enabled
> > > mesa.
> > > 
> > > Anyone willing to fish around and implement it for ES 1.0 is more
> > > than
> > > welcome to revert this commit. Until then lets restrict things.
> > > 
> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93048
> > > Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> > > ---
> > >  src/mapi/glapi/gen/KHR_debug.xml | 20 ++++++++++----------
> > >  src/mesa/main/extensions_table.h |  2 +-
> > >  2 files changed, 11 insertions(+), 11 deletions(-)
> > > 
> > > diff --git a/src/mapi/glapi/gen/KHR_debug.xml
> > > b/src/mapi/glapi/gen/KHR_debug.xml
> > > index 431a788..50daba3 100644
> > > --- a/src/mapi/glapi/gen/KHR_debug.xml
> > > +++ b/src/mapi/glapi/gen/KHR_debug.xml
> > > @@ -146,7 +146,7 @@
> > >    </function>
> > > 
> > >    <!-- ES extension has different suffixes -->
> > > -  <function name="DebugMessageControlKHR"
> > > alias="DebugMessageControl" es1="1.0" es2="2.0">
> > > +  <function name="DebugMessageControlKHR"
> > > alias="DebugMessageControl" es1="1.1" es2="2.0">
> > >      <param name="source" type="GLenum"/>
> > >      <param name="type" type="GLenum"/>
> > >      <param name="severity" type="GLenum"/>
> > > @@ -155,7 +155,7 @@
> > >      <param name="enabled" type="GLboolean"/>
> > >    </function>
> > > 
> > > -  <function name="DebugMessageInsertKHR"
> > > alias="DebugMessageInsert"
> > > es1="1.0" es2="2.0">
> > > +  <function name="DebugMessageInsertKHR"
> > > alias="DebugMessageInsert"
> > > es1="1.1" es2="2.0">
> > >      <param name="source" type="GLenum"/>
> > >      <param name="type" type="GLenum"/>
> > >      <param name="id" type="GLuint"/>
> > > @@ -164,12 +164,12 @@
> > >      <param name="buf" type="const GLchar *"/>
> > >    </function>
> > > 
> > > -  <function name="DebugMessageCallbackKHR"
> > > alias="DebugMessageCallback" es1="1.0" es2="2.0">
> > > +  <function name="DebugMessageCallbackKHR"
> > > alias="DebugMessageCallback" es1="1.1" es2="2.0">
> > >      <param name="callback" type="GLDEBUGPROC"/>
> > >      <param name="userParam" type="const GLvoid *"/>
> > >    </function>
> > > 
> > > -  <function name="GetDebugMessageLogKHR"
> > > alias="GetDebugMessageLog"
> > > es1="1.0" es2="2.0">
> > > +  <function name="GetDebugMessageLogKHR"
> > > alias="GetDebugMessageLog"
> > > es1="1.1" es2="2.0">
> > >      <return type="GLuint"/>
> > >      <param name="count" type="GLuint"/>
> > >      <param name="bufsize" type="GLsizei"/>
> > > @@ -186,23 +186,23 @@
> > >      <param name="params" type="GLvoid **" output="true"/>
> > >    </function>
> > > 
> > > -  <function name="PushDebugGroupKHR" alias="PushDebugGroup"
> > > es1="1.0" es2="2.0">
> > > +  <function name="PushDebugGroupKHR" alias="PushDebugGroup"
> > > es1="1.1" es2="2.0">
> > >      <param name="source" type="GLenum"/>
> > >      <param name="id" type="GLuint"/>
> > >      <param name="length" type="GLsizei"/>
> > >      <param name="message" type="const GLchar *"/>
> > >    </function>
> > > 
> > > -  <function name="PopDebugGroupKHR" alias="PopDebugGroup"
> > > es1="1.0"
> > > es2="2.0"/>
> > > +  <function name="PopDebugGroupKHR" alias="PopDebugGroup"
> > > es1="1.1"
> > > es2="2.0"/>
> > > 
> > > -  <function name="ObjectLabelKHR" alias="ObjectLabel" es1="1.0"
> > > es2="2.0">
> > > +  <function name="ObjectLabelKHR" alias="ObjectLabel" es1="1.1"
> > > es2="2.0">
> > >      <param name="identifier" type="GLenum"/>
> > >      <param name="name" type="GLuint"/>
> > >      <param name="length" type="GLsizei"/>
> > >      <param name="label" type="const GLchar *"/>
> > >    </function>
> > > 
> > > -  <function name="GetObjectLabelKHR" alias="GetObjectLabel"
> > > es1="1.0" es2="2.0">
> > > +  <function name="GetObjectLabelKHR" alias="GetObjectLabel"
> > > es1="1.1" es2="2.0">
> > >      <param name="identifier" type="GLenum"/>
> > >      <param name="name" type="GLuint"/>
> > >      <param name="bufSize" type="GLsizei"/>
> > > @@ -210,13 +210,13 @@
> > >      <param name="label" type="GLchar *"/>
> > >    </function>
> > > 
> > > -  <function name="ObjectPtrLabelKHR" alias="ObjectPtrLabel"
> > > es1="1.0" es2="2.0">
> > > +  <function name="ObjectPtrLabelKHR" alias="ObjectPtrLabel"
> > > es1="1.1" es2="2.0">
> > >      <param name="ptr" type="const GLvoid *"/>
> > >      <param name="length" type="GLsizei"/>
> > >      <param name="label" type="const GLchar *"/>
> > >    </function>
> > > 
> > > -  <function name="GetObjectPtrLabelKHR"
> > > alias="GetObjectPtrLabel"
> > > es1="1.0" es2="2.0">
> > > +  <function name="GetObjectPtrLabelKHR"
> > > alias="GetObjectPtrLabel"
> > > es1="1.1" es2="2.0">
> > >      <param name="ptr" type="const GLvoid *"/>
> > >      <param name="bufSize" type="GLsizei"/>
> > >      <param name="length" type="GLsizei *"/>
> > > diff --git a/src/mesa/main/extensions_table.h
> > > b/src/mesa/main/extensions_table.h
> > > index 051d69a..52a4ed6 100644
> > > --- a/src/mesa/main/extensions_table.h
> > > +++ b/src/mesa/main/extensions_table.h
> > > @@ -258,7 +258,7 @@ EXT(INGR_blend_func_separate                ,
> > > EXT_blend_func_separate
> > >  EXT(INTEL_performance_query                 ,
> > > INTEL_performance_query                , GLL, GLC,  x , ES2,
> > > 2013)
> > > 
> > >  EXT(KHR_context_flush_control               , dummy_true
> > >                  , GLL, GLC,  x , ES2, 2014)
> > > -EXT(KHR_debug                               , dummy_true
> > >                  , GLL, GLC, ES1, ES2, 2012)
> > > +EXT(KHR_debug                               , dummy_true
> > >                  , GLL, GLC,  11, ES2, 2012)
> > 
> > What is this table used for?
> Two things 1) the classic "should we print the extension name in
> glGetString(GL_EXTENSIONS)" and more accurate
> _mesa_has_$extension_name. Latter is a new addition due to some bugs.
> 
> > And why do we use 11 here?
> > 
> > The top of the file defines GLL, GLC, ES1 and ES2 as 0 and x as ~0
> > why
> > isn't this also 0?
> > 
> 
> GLL, GLC... are "enable on any version of $API", while x is "always
> disable for $API". Alternatively a number represents the minimum
> required version for the said API.

In that case it seems ok.

Reviewed-by: Timothy Arceri <timothy.arceri at collabora.com>

> 
> -Emil


More information about the mesa-dev mailing list