Re: [Mesa-dev] [PATCH] mesa: allow EXT_texture_compression_s3tc on ES2

2018-10-24 Thread Marek Olšák
On Wed, Oct 24, 2018 at 12:34 PM Erik Faye-Lund <
erik.faye-l...@collabora.com> wrote:

> On Thu, 2018-10-18 at 15:42 -0400, Marek Olšák wrote:
> > I think you need something like this:
> >
>
> https://cgit.freedesktop.org/~mareko/mesa/commit/?h=amd-extension-pack=ad774f9db1d735811a8d830ad90a2f8208aa0a7b
> >
>
> Thanks, this looks correct to me.
>
> I've ported some of the piglit s3tc tests to gles2, and they all seem
> to pass with your patch:
>
> https://patchwork.freedesktop.org/series/51467/
>
> Do you mind if I add a "Tested-by"-tag and submit a v2 with your patch
> instead?
>

Feel free to do it.

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


Re: [Mesa-dev] [PATCH] mesa: allow EXT_texture_compression_s3tc on ES2

2018-10-24 Thread Erik Faye-Lund
On Thu, 2018-10-18 at 15:42 -0400, Marek Olšák wrote:
> I think you need something like this:
> 
https://cgit.freedesktop.org/~mareko/mesa/commit/?h=amd-extension-pack=ad774f9db1d735811a8d830ad90a2f8208aa0a7b
> 

Thanks, this looks correct to me.

I've ported some of the piglit s3tc tests to gles2, and they all seem
to pass with your patch:

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

Do you mind if I add a "Tested-by"-tag and submit a v2 with your patch
instead?

> I also have:
> rgtc: 
> https://cgit.freedesktop.org/~mareko/mesa/commit/?h=amd-extension-pack=c9c0ffc2d40f0119fb31bf0515f321cd877090dd
> bptc: 
> https://cgit.freedesktop.org/~mareko/mesa/commit/?h=amd-extension-pack=111255b6f8b85119da2c5d29dc19abc422fd7a12
> 
> and no time to test them.
> 
> Marek
> 
> On Thu, Oct 18, 2018 at 11:05 AM Erik Faye-Lund <
> erik.faye-l...@collabora.com> wrote:
> > The extension is written against both GL 1.2 and GLES 2.0, so let's
> > also enable it on GLES 2.0.
> > 
> > Signed-off-by: Erik Faye-Lund 
> > ---
> >  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 09bf923bd0e..47db1583135 100644
> > --- a/src/mesa/main/extensions_table.h
> > +++ b/src/mesa/main/extensions_table.h
> > @@ -278,7 +278,7 @@ EXT(EXT_texture_buffer  ,
> > OES_texture_buffer
> >  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_s3tc,
> > EXT_texture_compression_s3tc   , GLL, GLC,  x ,  x , 2000)
> > +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)

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


Re: [Mesa-dev] [PATCH] mesa: allow EXT_texture_compression_s3tc on ES2

2018-10-22 Thread Erik Faye-Lund
On Thu, 2018-10-18 at 14:31 -0400, Ilia Mirkin wrote:
> On Thu, Oct 18, 2018 at 2:26 PM Erik Faye-Lund
>  wrote:
> > On Oct 18, 2018 18:21, Ilia Mirkin  wrote:
> > 
> > Have you verified that this works OK on GLES2? This extension
> > enables
> > online compression, which isn't normally available in GLES, and I
> > wouldn't be surprised if the current mesa TexImage handlers prevent
> > it.
> > 
> > The way I read the extension spec, it doesn't enable online
> > compression on gles2. And from testing, it seems like mesa does the
> > right thing. I'll double check, though...
> 
> """
> In extended OpenGL ES 2.0.25 these new tokens are accepted by the
>  parameter of TexImage2D, CompressedTexImage2D
> and
> the 
> parameter of CompressedTexSubImage2D.
> """
> 
> and in the ES 2 section of the modifications:
> 
> """
> Modify Section 3.7.2, Alternate Texture Image Specification
> Commands
> 
> (add to the end of section)
> 
> When the internal format of the texture object is
> COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT,
> COMPRESSED_RGBA_S3TC_DXT3_EXT, or COMPRESSED_RGBA_S3TC_DXT5_EXT,
> the
> update region specified in TexSubImage2D must be aligned to 4x4
> pixel blocks. If  or  are not multiples of 4 an
> INVALID_OPERATION error is generated. If  is not a
> multiple
> of 4 and  +  is not equal to the width of the LOD
> then an INVALID_OPERATION error is generated.  If  is not
> a multiple of 4 and  +  is not equal to the
> height of the LOD then an INVALID_OPERATION error is generated.
> """
> 
> Since you can pass the compressed internal format to TexImage2D, that
> implies online compression.
> 

Right. Yeah, I think you're right, and this needs some more work.

Thanks for pointing that out.

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


Re: [Mesa-dev] [PATCH] mesa: allow EXT_texture_compression_s3tc on ES2

2018-10-18 Thread Marek Olšák
I think you need something like this:
https://cgit.freedesktop.org/~mareko/mesa/commit/?h=amd-extension-pack=ad774f9db1d735811a8d830ad90a2f8208aa0a7b

I also have:
rgtc:
https://cgit.freedesktop.org/~mareko/mesa/commit/?h=amd-extension-pack=c9c0ffc2d40f0119fb31bf0515f321cd877090dd
bptc:
https://cgit.freedesktop.org/~mareko/mesa/commit/?h=amd-extension-pack=111255b6f8b85119da2c5d29dc19abc422fd7a12

and no time to test them.

Marek

On Thu, Oct 18, 2018 at 11:05 AM Erik Faye-Lund <
erik.faye-l...@collabora.com> wrote:

> The extension is written against both GL 1.2 and GLES 2.0, so let's
> also enable it on GLES 2.0.
>
> Signed-off-by: Erik Faye-Lund 
> ---
>  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 09bf923bd0e..47db1583135 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -278,7 +278,7 @@ EXT(EXT_texture_buffer  ,
> OES_texture_buffer
>  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_s3tc,
> EXT_texture_compression_s3tc   , GLL, GLC,  x ,  x , 2000)
> +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)
> --
> 2.17.1
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: allow EXT_texture_compression_s3tc on ES2

2018-10-18 Thread Ilia Mirkin
On Thu, Oct 18, 2018 at 2:26 PM Erik Faye-Lund
 wrote:
> On Oct 18, 2018 18:21, Ilia Mirkin  wrote:
>
> Have you verified that this works OK on GLES2? This extension enables
> online compression, which isn't normally available in GLES, and I
> wouldn't be surprised if the current mesa TexImage handlers prevent
> it.
>
> The way I read the extension spec, it doesn't enable online compression on 
> gles2. And from testing, it seems like mesa does the right thing. I'll double 
> check, though...

"""
In extended OpenGL ES 2.0.25 these new tokens are accepted by the
 parameter of TexImage2D, CompressedTexImage2D and
the 
parameter of CompressedTexSubImage2D.
"""

and in the ES 2 section of the modifications:

"""
Modify Section 3.7.2, Alternate Texture Image Specification Commands

(add to the end of section)

When the internal format of the texture object is
COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT,
COMPRESSED_RGBA_S3TC_DXT3_EXT, or COMPRESSED_RGBA_S3TC_DXT5_EXT, the
update region specified in TexSubImage2D must be aligned to 4x4
pixel blocks. If  or  are not multiples of 4 an
INVALID_OPERATION error is generated. If  is not a multiple
of 4 and  +  is not equal to the width of the LOD
then an INVALID_OPERATION error is generated.  If  is not
a multiple of 4 and  +  is not equal to the
height of the LOD then an INVALID_OPERATION error is generated.
"""

Since you can pass the compressed internal format to TexImage2D, that
implies online compression.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: allow EXT_texture_compression_s3tc on ES2

2018-10-18 Thread Erik Faye-Lund
On Oct 18, 2018 18:21, Ilia Mirkin  wrote:Have you verified that this works OK on GLES2? This extension enables

online compression, which isn't normally available in GLES, and I

wouldn't be surprised if the current mesa TexImage handlers prevent

it.


The way I read the extension spec, it doesn't enable online compression on gles2. And from testing, it seems like mesa does the right thing. I'll double check, though...
  -ilia

On Thu, Oct 18, 2018 at 11:05 AM Erik Faye-Lund

 wrote:

>

> The extension is written against both GL 1.2 and GLES 2.0, so let's

> also enable it on GLES 2.0.

>

> Signed-off-by: Erik Faye-Lund 

> ---

>  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 09bf923bd0e..47db1583135 100644

> --- a/src/mesa/main/extensions_table.h

> +++ b/src/mesa/main/extensions_table.h

> @@ -278,7 +278,7 @@ EXT(EXT_texture_buffer  , OES_texture_buffer

>  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_s3tc    , EXT_texture_compression_s3tc   , GLL, GLC,  x ,  x , 2000)

> +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)

> --

> 2.17.1

>

> ___

> mesa-dev mailing list

> mesa-dev@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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


Re: [Mesa-dev] [PATCH] mesa: allow EXT_texture_compression_s3tc on ES2

2018-10-18 Thread Ilia Mirkin
Have you verified that this works OK on GLES2? This extension enables
online compression, which isn't normally available in GLES, and I
wouldn't be surprised if the current mesa TexImage handlers prevent
it.

  -ilia
On Thu, Oct 18, 2018 at 11:05 AM Erik Faye-Lund
 wrote:
>
> The extension is written against both GL 1.2 and GLES 2.0, so let's
> also enable it on GLES 2.0.
>
> Signed-off-by: Erik Faye-Lund 
> ---
>  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 09bf923bd0e..47db1583135 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -278,7 +278,7 @@ EXT(EXT_texture_buffer  , 
> OES_texture_buffer
>  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_s3tc, EXT_texture_compression_s3tc   
> , GLL, GLC,  x ,  x , 2000)
> +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)
> --
> 2.17.1
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev