[Mesa-dev] [PATCH] mesa: allow EXT_texture_compression_s3tc on ES2
Ilia Mirkin
imirkin at alum.mit.edu
Thu Oct 18 18:31:02 UTC 2018
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 and
the <format>
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 <xoffset> or <yoffset> are not multiples of 4 an
INVALID_OPERATION error is generated. If <width> is not a multiple
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.
More information about the mesa-dev
mailing list