[Mesa-dev] [PATCH 1/3] mesa: expose EXT_texture_compression_rgtc on GLES

Erik Faye-Lund erik.faye-lund at collabora.com
Thu Nov 29 09:33:46 UTC 2018


On Wed, 2018-11-28 at 20:22 -0500, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> The spec was modified to support GLES. Tested by piglit.
> ---
>  docs/relnotes/19.0.0.html        |  1 +
>  src/mesa/main/extensions_table.h |  2 +-
>  src/mesa/main/glformats.c        | 19 +++++++++++++------
>  src/mesa/main/texcompress.c      |  9 +++++++++
>  4 files changed, 24 insertions(+), 7 deletions(-)
> 
> diff --git a/docs/relnotes/19.0.0.html b/docs/relnotes/19.0.0.html
> index 920cf803f5d..50cdda6cbc7 100644
> --- a/docs/relnotes/19.0.0.html
> +++ b/docs/relnotes/19.0.0.html
> @@ -33,20 +33,21 @@ Compatibility contexts may report a lower version
> depending on each driver.
>  <h2>SHA256 checksums</h2>
>  <pre>
>  TBD.
>  </pre>
>  
>  
>  <h2>New features</h2>
>  
>  <ul>
>  <li>GL_EXT_shader_implicit_conversions on all drivers (ES
> extension).</li>
> +<li>GL_EXT_texture_compression_rgtc on all GL 3.0 drivers (ES
> extension).<li>
>  <li>GL_EXT_texture_view on drivers supporting texture views (ES
> extension).<li>
>  <li>GL_OES_texture_view on drivers supporting texture views (ES
> extension).</li>
>  </ul>
>  
>  <h2>Bug fixes</h2>
>  
>  <ul>
>  <li>TBD</li>
>  </ul>
>  
> diff --git a/src/mesa/main/extensions_table.h
> b/src/mesa/main/extensions_table.h
> index 4f2707b65a4..dd7a4d45079 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -271,21 +271,21 @@ EXT(EXT_stencil_wrap                        ,
> dummy_true
>  EXT(EXT_subtexture                          ,
> dummy_true                             , GLL,  x ,  x ,  x , 1995)
>  EXT(EXT_tessellation_point_size             ,
> ARB_tessellation_shader                ,  x ,  x ,  x ,  31, 2013)
>  EXT(EXT_tessellation_shader                 ,
> ARB_tessellation_shader                ,  x ,  x ,  x ,  31, 2013)
>  EXT(EXT_texture                             ,
> dummy_true                             , GLL,  x ,  x ,  x , 1996)
>  EXT(EXT_texture3D                           ,
> dummy_true                             , GLL,  x ,  x ,  x , 1996)
>  EXT(EXT_texture_array                       ,
> EXT_texture_array                      , GLL, GLC,  x ,  x , 2006)
>  EXT(EXT_texture_border_clamp                ,
> ARB_texture_border_clamp               ,  x ,  x ,  x , ES2, 2014)
>  EXT(EXT_texture_buffer                      ,
> OES_texture_buffer                     ,  x ,  x ,  x ,  31, 2014)
>  EXT(EXT_texture_compression_dxt1            ,
> ANGLE_texture_compression_dxt          , GLL, GLC, ES1, ES2, 2004)
>  EXT(EXT_texture_compression_latc            ,
> EXT_texture_compression_latc           , GLL,  x ,  x ,  x , 2006)
> -EXT(EXT_texture_compression_rgtc            ,
> ARB_texture_compression_rgtc           , GLL, GLC,  x ,  x , 2004)
> +EXT(EXT_texture_compression_rgtc            ,
> ARB_texture_compression_rgtc           , GLL, GLC,  x ,  30, 2004)
>  EXT(EXT_texture_compression_s3tc            ,
> EXT_texture_compression_s3tc           , GLL, GLC,  x , ES2, 2000)
>  EXT(EXT_texture_cube_map                    ,
> ARB_texture_cube_map                   , GLL,  x ,  x ,  x , 2001)
>  EXT(EXT_texture_cube_map_array              ,
> OES_texture_cube_map_array             ,  x ,  x ,  x ,  31, 2014)
>  EXT(EXT_texture_edge_clamp                  ,
> dummy_true                             , GLL,  x ,  x ,  x , 1997)
>  EXT(EXT_texture_env_add                     ,
> dummy_true                             , GLL,  x ,  x ,  x , 1999)
>  EXT(EXT_texture_env_combine                 ,
> dummy_true                             , GLL,  x ,  x ,  x , 2000)
>  EXT(EXT_texture_env_dot3                    ,
> EXT_texture_env_dot3                   , GLL,  x ,  x ,  x , 2000)
>  EXT(EXT_texture_filter_anisotropic          ,
> EXT_texture_filter_anisotropic         , GLL, GLC, ES1, ES2, 1999)
>  EXT(EXT_texture_format_BGRA8888             ,
> dummy_true                             ,  x ,  x , ES1, ES2, 2005)
>  EXT(EXT_texture_integer                     ,
> EXT_texture_integer                    , GLL, GLC,  x ,  x , 2006)
> diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
> index 6cdc7818756..bacaa9519ca 100644
> --- a/src/mesa/main/glformats.c
> +++ b/src/mesa/main/glformats.c
> @@ -1379,22 +1379,21 @@ _mesa_is_compressed_format(const struct
> gl_context *ctx, GLenum format)
>           return ctx->Extensions.ANGLE_texture_compression_dxt;
>        } else {
>           return _mesa_is_desktop_gl(ctx)
>              && ctx->Extensions.EXT_texture_sRGB
>              && ctx->Extensions.EXT_texture_compression_s3tc;
>        }
>     case MESA_FORMAT_LAYOUT_FXT1:
>        return _mesa_is_desktop_gl(ctx)
>           && ctx->Extensions.TDFX_texture_compression_FXT1;
>     case MESA_FORMAT_LAYOUT_RGTC:
> -      return _mesa_is_desktop_gl(ctx)
> -         && ctx->Extensions.ARB_texture_compression_rgtc;
> +      return ctx->Extensions.ARB_texture_compression_rgtc;

This enables the extension on GLES 1.x as well (same goes for most
hunks in this patch). In fact, wanting to expose this very extension is
what motivated me to send out this series:

https://patchwork.freedesktop.org/series/52689/

I would apprechiate it if we could get that series reviewed and merged
before we try to tackle this on top...



More information about the mesa-dev mailing list