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@amd.com>
/* 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;