mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 22:10:38 +02:00
mesa: fix DXT1 support with EXT_texture_compression_dxt1
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11987 Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31540>
This commit is contained in:
parent
271fdedc5a
commit
a3c03b6a96
1 changed files with 4 additions and 1 deletions
|
|
@ -1336,7 +1336,10 @@ _mesa_is_compressed_format(const struct gl_context *ctx, GLenum format)
|
|||
switch (_mesa_get_format_layout(m_format)) {
|
||||
case MESA_FORMAT_LAYOUT_S3TC:
|
||||
if (!_mesa_is_format_srgb(m_format)) {
|
||||
return _mesa_has_EXT_texture_compression_s3tc(ctx);
|
||||
return _mesa_has_EXT_texture_compression_s3tc(ctx) ||
|
||||
(_mesa_has_EXT_texture_compression_dxt1(ctx) &&
|
||||
(m_format == PIPE_FORMAT_DXT1_RGB ||
|
||||
m_format == PIPE_FORMAT_DXT1_RGBA));
|
||||
} else {
|
||||
return (_mesa_has_EXT_texture_sRGB(ctx) ||
|
||||
_mesa_has_EXT_texture_compression_s3tc_srgb(ctx)) &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue