Mesa (master): mesa/formatquery: remove online compression check on is_resource_supported
Alejandro Pinheiro
apinheiro at kemper.freedesktop.org
Tue May 8 06:22:06 UTC 2018
Module: Mesa
Branch: master
Commit: b6648798cf3c4b0f970c468aed7ac1ee7eb82109
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6648798cf3c4b0f970c468aed7ac1ee7eb82109
Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date: Fri May 4 16:44:44 2018 +0200
mesa/formatquery: remove online compression check on is_resource_supported
is_resource_supported returns if the combination of
target/internalformat is supported in at least one operation. Online
compression is only mandatory for glTexImage2D. Some formats doesn't
support online compression, but can be used in any case, with
glCompressed*D methods.
Without this commit, ETC2 internalformats were returning FALSE, even
for the drivers supporting it. So any other query (like
TEXTURE_COMPRESSED) was returning FALSE/NONE instead of the proper
value.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/mesa/main/formatquery.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c
index 3b000fac5c..84b5f512ba 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -501,8 +501,7 @@ _is_resource_supported(struct gl_context *ctx, GLenum target,
/* additional checks for compressed textures */
if (_mesa_is_compressed_format(ctx, internalformat) &&
- (!_mesa_target_can_be_compressed(ctx, target, internalformat, NULL) ||
- _mesa_format_no_online_compression(internalformat)))
+ !_mesa_target_can_be_compressed(ctx, target, internalformat, NULL))
return false;
break;
More information about the mesa-commit
mailing list