From 908f817918fb14a12887f942b8358a5c648b3f92 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 6 Aug 2018 00:29:00 -0400 Subject: mesa: expose EXT_texture_compression_bptc in GLES tested by piglit. v2: rebase Reviewed-by: Ilia Mirkin (v1) Reviewed-by: Erik Faye-Lund --- src/mesa/main/glformats.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/glformats.c') diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index a63ccc0e5ba..3a916009735 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -1388,7 +1388,8 @@ _mesa_is_compressed_format(const struct gl_context *ctx, GLenum format) case MESA_FORMAT_LAYOUT_ETC2: return _mesa_is_gles3(ctx) || _mesa_has_ARB_ES3_compatibility(ctx); case MESA_FORMAT_LAYOUT_BPTC: - return _mesa_has_ARB_texture_compression_bptc(ctx); + return _mesa_has_ARB_texture_compression_bptc(ctx) || + _mesa_has_EXT_texture_compression_bptc(ctx); case MESA_FORMAT_LAYOUT_ASTC: return _mesa_has_KHR_texture_compression_astc_ldr(ctx); default: @@ -2846,6 +2847,11 @@ _mesa_gles_error_check_format_and_type(const struct gl_context *ctx, if (ctx->Version <= 20) return GL_INVALID_OPERATION; break; + case GL_COMPRESSED_RGBA_BPTC_UNORM: + case GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM: + if (!_mesa_has_EXT_texture_compression_bptc(ctx)) + return GL_INVALID_OPERATION; + break; default: return GL_INVALID_OPERATION; } @@ -3050,6 +3056,11 @@ _mesa_gles_error_check_format_and_type(const struct gl_context *ctx, case GL_RGB: if (_mesa_has_OES_texture_float(ctx) && internalFormat == format) break; + case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT: + case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT: + if (!_mesa_has_EXT_texture_compression_bptc(ctx)) + return GL_INVALID_OPERATION; + break; default: return GL_INVALID_OPERATION; } -- cgit v1.2.3