From 98f6ff65234203efb56252c00a0e3c78411f6dc4 Mon Sep 17 00:00:00 2001 From: Kenneth Russell Date: Wed, 4 Sep 2024 22:28:37 -0700 Subject: [PATCH 1/2] Clarify GLES/WebGL difference with uninitialized compressed textures. Fixes #3686. --- specs/latest/2.0/index.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/specs/latest/2.0/index.html b/specs/latest/2.0/index.html index 27fb563c6..aeba54ff2 100644 --- a/specs/latest/2.0/index.html +++ b/specs/latest/2.0/index.html @@ -4467,6 +4467,19 @@

Generic TRANSFORM_FEEDBACK_BUFFE A similar change was made in OpenGL ES 3.2. +

Uninitialized Compressed Textures

+ +

+ In OpenGL ES 2.0 the specification omitted declaring whether it should be possible to create a + compressed 2D texture with uninitialized data. In WebGL 1.0, this is explicitly disallowed. +

+

+ In OpenGL ES 3.0 it is explicitly allowed to create a compressed 2D texture with uninitialized + data by passing null to glCompressedTexImage2D. In WebGL 2.0, + however, this is still explicitly disallowed. Users can call texStorage2D to work + around this functional difference. +

+

References

From a7f1587073c82b78618a01782d401cf7d274ee67 Mon Sep 17 00:00:00 2001 From: Kenneth Russell Date: Wed, 4 Sep 2024 22:54:44 -0700 Subject: [PATCH 2/2] Address feedback from Alexey Knyazev --- specs/latest/2.0/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specs/latest/2.0/index.html b/specs/latest/2.0/index.html index aeba54ff2..9be424090 100644 --- a/specs/latest/2.0/index.html +++ b/specs/latest/2.0/index.html @@ -4476,8 +4476,10 @@

Uninitialized Compressed Texture

In OpenGL ES 3.0 it is explicitly allowed to create a compressed 2D texture with uninitialized data by passing null to glCompressedTexImage2D. In WebGL 2.0, - however, this is still explicitly disallowed. Users can call texStorage2D to work - around this functional difference. + however, this is still explicitly disallowed. Users can use texStorage2D with a + compressed internal format to allocate zero-initialized compressed textures; these textures + are however immutable, and not completely compatible with textures allocated + via compressedTexImage2D.