mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
mesa: etc2 online compression is unsupported, don't attempt it
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 8ee3cdde04)
This commit is contained in:
parent
76a2950c1e
commit
e7de53fefd
3 changed files with 27 additions and 0 deletions
|
|
@ -906,6 +906,29 @@ _mesa_is_astc_format(GLenum internalFormat)
|
||||||
is_astc_3d_format(internalFormat);
|
is_astc_3d_format(internalFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test if the given format is an ETC2 format.
|
||||||
|
*/
|
||||||
|
GLboolean
|
||||||
|
_mesa_is_etc2_format(GLenum internalFormat)
|
||||||
|
{
|
||||||
|
switch (internalFormat) {
|
||||||
|
case GL_COMPRESSED_RGB8_ETC2:
|
||||||
|
case GL_COMPRESSED_SRGB8_ETC2:
|
||||||
|
case GL_COMPRESSED_RGBA8_ETC2_EAC:
|
||||||
|
case GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
|
||||||
|
case GL_COMPRESSED_R11_EAC:
|
||||||
|
case GL_COMPRESSED_RG11_EAC:
|
||||||
|
case GL_COMPRESSED_SIGNED_R11_EAC:
|
||||||
|
case GL_COMPRESSED_SIGNED_RG11_EAC:
|
||||||
|
case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
|
||||||
|
case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if the given format is an integer (non-normalized) format.
|
* Test if the given format is an integer (non-normalized) format.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,9 @@ _mesa_bytes_per_vertex_attrib(GLint comps, GLenum type);
|
||||||
extern GLboolean
|
extern GLboolean
|
||||||
_mesa_is_astc_format(GLenum internalFormat);
|
_mesa_is_astc_format(GLenum internalFormat);
|
||||||
|
|
||||||
|
extern GLboolean
|
||||||
|
_mesa_is_etc2_format(GLenum internalFormat);
|
||||||
|
|
||||||
extern GLboolean
|
extern GLboolean
|
||||||
_mesa_is_type_unsigned(GLenum type);
|
_mesa_is_type_unsigned(GLenum type);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1300,6 +1300,7 @@ bool
|
||||||
_mesa_format_no_online_compression(const struct gl_context *ctx, GLenum format)
|
_mesa_format_no_online_compression(const struct gl_context *ctx, GLenum format)
|
||||||
{
|
{
|
||||||
return _mesa_is_astc_format(format) ||
|
return _mesa_is_astc_format(format) ||
|
||||||
|
_mesa_is_etc2_format(format) ||
|
||||||
compressedteximage_only_format(ctx, format);
|
compressedteximage_only_format(ctx, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue