[Mesa-dev] [PATCH] mesa: allow EXT_texture_compression_s3tc on ES2
erik.faye-lund at collabora.com
Tue Oct 23 04:11:06 UTC 2018
On Thu, 2018-10-18 at 14:31 -0400, Ilia Mirkin wrote:
> On Thu, Oct 18, 2018 at 2:26 PM Erik Faye-Lund
> <erik.faye-lund at collabora.com> wrote:
> > On Oct 18, 2018 18:21, Ilia Mirkin <imirkin at alum.mit.edu> 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
> <internalformat> parameter of TexImage2D, CompressedTexImage2D
> the <format>
> parameter of CompressedTexSubImage2D.
> and in the ES 2 section of the modifications:
> Modify Section 3.7.2, Alternate Texture Image Specification
> (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,
> update region specified in TexSubImage2D must be aligned to 4x4
> pixel blocks. If <xoffset> or <yoffset> are not multiples of 4 an
> INVALID_OPERATION error is generated. If <width> is not a
> of 4 and <xoffset> + <width> is not equal to the width of the LOD
> then an INVALID_OPERATION error is generated. If <height> is not
> a multiple of 4 and <yoffset> + <height> 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.
More information about the mesa-dev