[Mesa-stable] [Mesa-dev] [PATCH] mesa: Don't advertise GL_OES_read_format in core profile

Kenneth Graunke kenneth at whitecape.org
Tue Jan 24 07:12:02 UTC 2017


On Monday, January 23, 2017 11:23:13 AM PST Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
> 
> OpenGL ES implementations are not allowed to ship ARB extensions, and
> OpenGL implementations are not allowed to ship OES extensions.
> 
> The functionality is also included in GL_ARB_ES2_compatibility.  Ever
> OpenGL core-profile driver currently exposes both extensions.  I don't
> know of any applications that explicitly check for GL_OES_read_format,
> so removing it seems very unlikely to cause problems.  No functionality
> is removed.
> 
> I have left this extension in place for compatibility profile.  There
> are still OpenGL 1.x drivers in Mesa, and adding code to check for
> compatibility profile and not GL_ARB_ES2_compatibility for
> GL_IMPLEMENTATION_COLOR_READ_TYPE and GL_IMPLEMENTATION_COLOR_READ_FORMAT
> just feels dumb.
> 
> Three other other alternatives considered:
> 
>  - Remove the string from compatibility profile drivers but leave the
>    functionality in place.
> 
>  - Add a flag to expose the extension string, and set it in every OpenGL
>    driver that does not expose GL_ARB_ES2_compatibility (and those
>    drivers only).  I tried this.  You can't have two instances of an
>    extension in the extension table (one dummy_true for ES1 and one with
>    a flag for compatibility profile), so the implementation requires a
>    bit of effort.
> 
>  - Only expose the extension in compatibility if the version is less
>    than 2.0.  I didn't see an easy way to do this.
> 
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/mesa/main/extensions_table.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
> index 91918c2..b12a9af 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -364,7 +364,7 @@ EXT(OES_point_size_array                    , dummy_true
>  EXT(OES_point_sprite                        , ARB_point_sprite                       ,  x ,  x , ES1,  x , 2004)
>  EXT(OES_primitive_bounding_box              , OES_primitive_bounding_box             ,  x ,  x ,  x ,  31, 2014)
>  EXT(OES_query_matrix                        , dummy_true                             ,  x ,  x , ES1,  x , 2003)
> -EXT(OES_read_format                         , dummy_true                             , GLL, GLC, ES1,  x , 2003)
> +EXT(OES_read_format                         , dummy_true                             , GLL,  x , ES1,  x , 2003)
>  EXT(OES_rgb8_rgba8                          , dummy_true                             ,  x ,  x , ES1, ES2, 2005)
>  EXT(OES_sample_shading                      , OES_sample_variables                   ,  x ,  x ,  x ,  30, 2014)
>  EXT(OES_sample_variables                    , OES_sample_variables                   ,  x ,  x ,  x ,  30, 2014)
> 

Thanks for doing this, Ian.  Seems like a good start - we probably ought
to drop it for legacy GL as well...but I agree that adding extra checks
seems dumb.  And there's no conformance for that...so...*shrug*.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20170123/f280fac9/attachment.sig>


More information about the mesa-stable mailing list