summaryrefslogtreecommitdiff
path: root/src/mesa/main/texcompress.c
diff options
context:
space:
mode:
authorNanley Chery <nanley.g.chery@intel.com>2015-05-18 16:30:30 -0700
committerNanley Chery <nanley.g.chery@intel.com>2015-08-26 14:36:42 -0700
commit582ce1ea976a16aa8f32ff72cb2fecb00186e253 (patch)
tree5158e4db6c87aea54999d5a56281cc80a86d20e6 /src/mesa/main/texcompress.c
parente9fd8e154fdb0394cbaed5e14ac52e689a020ebe (diff)
mesa: don't enable online compression for ASTC formats
In agreement with the ASTC spec, this makes calls to TexImage*D unsuccessful. Implied by the spec, Generate[Texture]Mipmap and [Copy]Tex[Sub]Image*D calls must be unsuccessful as well. v2. actually force attempts to compress online to fail. v3. indentation (Matt). v4. update copytexture_error_check to account for CopyTexImage*D (Chad). Reviewed-by: Chad Versace <chad.versace@intel.com> Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Diffstat (limited to 'src/mesa/main/texcompress.c')
-rw-r--r--src/mesa/main/texcompress.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index edfb03625c2..c028daa46e4 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -229,6 +229,28 @@ _mesa_gl_compressed_format_base_format(GLenum format)
* what GL_NUM_COMPRESSED_TEXTURE_FORMATS and
* GL_COMPRESSED_TEXTURE_FORMATS return."
*
+ * The KHR_texture_compression_astc_hdr spec says:
+ *
+ * "Interactions with OpenGL 4.2
+ *
+ * OpenGL 4.2 supports the feature that compressed textures can be
+ * compressed online, by passing the compressed texture format enum as
+ * the internal format when uploading a texture using TexImage1D,
+ * TexImage2D or TexImage3D (see Section 3.9.3, Texture Image
+ * Specification, subsection Encoding of Special Internal Formats).
+ *
+ * Due to the complexity of the ASTC compression algorithm, it is not
+ * usually suitable for online use, and therefore ASTC support will be
+ * limited to pre-compressed textures only. Where on-device compression
+ * is required, a domain-specific limited compressor will typically
+ * be used, and this is therefore not suitable for implementation in
+ * the driver.
+ *
+ * In particular, the ASTC format specifiers will not be added to
+ * Table 3.14, and thus will not be accepted by the TexImage*D
+ * functions, and will not be returned by the (already deprecated)
+ * COMPRESSED_TEXTURE_FORMATS query."
+ *
* There is no formal spec for GL_ATI_texture_compression_3dc. Since the
* formats added by this extension are luminance-alpha formats, it is
* reasonable to expect them to follow the same rules as